| | |
text wrap around the image
Please support our ASP.NET advertiser: Intel Parallel Studio Home
![]() |
•
•
Join Date: Sep 2007
Posts: 1,080
Reputation:
Solved Threads: 68
yes it is. it's a css style called float. this will have a weird effect on your image as text will be really close to it. I would suggest using this as the style property:
that will keep the image on the left hand side with text wrapping around it. "float:right" will make it on the right hand side. If you want it on the right hand side, change padding-right to padding-left.
ASP.NET Syntax (Toggle Plain Text)
style="padding-right:5px;padding-bottom:5px;float:left;"
•
•
•
•
yes it is. it's a css style called float. this will have a weird effect on your image as text will be really close to it. I would suggest using this as the style property:
that will keep the image on the left hand side with text wrapping around it. "float:right" will make it on the right hand side. If you want it on the right hand side, change padding-right to padding-left.ASP.NET Syntax (Toggle Plain Text)
style="padding-right:5px;padding-bottom:5px;float:left;"
hi
thanks again for reply me. as i mentioned earlier my text value and image are coming from database. To show them on aspx page i need control. i used Text area for text in a <td> and in next <td> image.
as you suggest me i assigned the style tag to text area and make both img and text area in same <td>. But not get the result as want.
Then i also tried by directly witting text value (from database) in a Div and Style as you said. But again i am not getting what i want. i.e text warped around image. and also when i used Div it is not showing the indentations inputed. So.... i am still failed and searching the solution. Can you do something in this !!

Thanks for reply again.
•
•
Join Date: Sep 2007
Posts: 1,080
Reputation:
Solved Threads: 68
you do not need a control for database info, so you know. Is it going to be in a repeater, datalist, etc? If so, then you don't need any additional controls. If not, then keep in mind of the formatting of how the controls work. This should work fine for you:
ASP.NET Syntax (Toggle Plain Text)
<script ....> Sub ..... ltlPicture.Text = "<img src=""" & databaseresult & """ style=""padding-right:8px;padding-bottom:8px;float:left;"" alt=""""" />" ltlDescription.Text = databseoutput End Sub </script> <html> <body> <asp:Literal ID="ltlPicture" runat="server" /> <asp:Literal ID="ltlDescription" runat="server" /> </body> </html>
Last edited by SheSaidImaPregy; Jan 18th, 2008 at 10:04 am.
•
•
•
•
you do not need a control for database info, so you know. Is it going to be in a repeater, datalist, etc? If so, then you don't need any additional controls. If not, then keep in mind of the formatting of how the controls work. This should work fine for you:
ASP.NET Syntax (Toggle Plain Text)
<script ....> Sub ..... ltlPicture.Text = "<img src=""" & databaseresult & """ style=""padding-right:8px;padding-bottom:8px;float:left;"" alt=""""" />" ltlDescription.Text = databseoutput End Sub </script> <html> <body> <asp:Literal ID="ltlPicture" runat="server" /> <asp:Literal ID="ltlDescription" runat="server" /> </body> </html>
---------------------------------------------------------------------------------
Hi!
thanks for reply. you are right. by setting style tag i am getting the result text wrap around the image. thanks. But still not exact.
What i get is as in this pic......
Attachment 4849
What i want is as in this pic......
Attachment 4850
i think now what exactly i am searching is clear. Thanks.. Have a good day.
(if unable to open images then plz find the attached zip files.)ZIP_IMG.zip
Last edited by sbv; Jan 19th, 2008 at 5:51 am.
Hi,
GM.
Here is the HTML code.
<TR>
<td align="center">
<asp:Image id="imgTm" runat="server" width="200px" style="padding-right:8px;padding-bottom:8px;float:left;" ></asp:Image><TEXTAREA id="txtaTDtl" style="BORDER-RIGHT: gray 1px; BORDER-TOP: gray 1px; TEXT-JUSTIFY: newspaper; FONT-SIZE: 10pt; OVERFLOW: visible; BORDER-LEFT: gray 1px; TEXT-INDENT: 30pt; BORDER-BOTTOM: gray 1px; FONT-FAMILY: 'Century Gothic'; HEIGHT: 2000px; TEXT-ALIGN: justify" name="txtaTDtl" rows="51" cols="59" runat="server" readOnly wrap="hard"></TEXTAREA>
</TD>
</TR>
And nothing more than this.
GM.
Here is the HTML code.
<TR>
<td align="center">
<asp:Image id="imgTm" runat="server" width="200px" style="padding-right:8px;padding-bottom:8px;float:left;" ></asp:Image><TEXTAREA id="txtaTDtl" style="BORDER-RIGHT: gray 1px; BORDER-TOP: gray 1px; TEXT-JUSTIFY: newspaper; FONT-SIZE: 10pt; OVERFLOW: visible; BORDER-LEFT: gray 1px; TEXT-INDENT: 30pt; BORDER-BOTTOM: gray 1px; FONT-FAMILY: 'Century Gothic'; HEIGHT: 2000px; TEXT-ALIGN: justify" name="txtaTDtl" rows="51" cols="59" runat="server" readOnly wrap="hard"></TEXTAREA>
</TD>
</TR>
And nothing more than this.
•
•
Join Date: Sep 2007
Posts: 1,080
Reputation:
Solved Threads: 68
That's why, you have everything going into a text area. Does it have to be in a text area? I mean, is it going to be edited? If it isn't, remove the text area and insert the text into the page 
Something like this would work well:
You have to refrain from the fields, and divs unless your image is inside the div. And if you look at the end of the tags, they end with "/>" which tells the server that the tag ends there. ending your tags with "/>" is the same as "></asp:Image>".

Something like this would work well:
ASP.NET Syntax (Toggle Plain Text)
<TR> <td align="center"> <asp:Image id="imgTm" runat="server" width="200px" style="padding-right:8px;padding-bottom:8px;float:left;" /><asp:Literal ID="txtaTDtl" style="BORDER-RIGHT: gray 1px; BORDER-TOP: gray 1px; TEXT-JUSTIFY: newspaper; FONT-SIZE: 10pt; OVERFLOW: visible; BORDER-LEFT: gray 1px; TEXT-INDENT: 30pt; BORDER-BOTTOM: gray 1px; FONT-FAMILY: 'Century Gothic'; HEIGHT: 2000px; TEXT-ALIGN: justify" name="txtaTDtl" runat="server" wrap="hard" /> </TD> </TR>
![]() |
Similar Threads
- Dreamweaver wrapping text around Pics (Site Layout and Usability)
- css background image problem (HTML and CSS)
- HTML Div Help (HTML and CSS)
- Web page jumping down when browser window is shortened (HTML and CSS)
- Easy? Image in Form content? (JavaScript / DHTML / AJAX)
- hi all need help reg button images (HTML and CSS)
- floating problem (HTML and CSS)
- Border-top-image no worky (HTML and CSS)
- Rounded Corners? (HTML and CSS)
Other Threads in the ASP.NET Forum
- Previous Thread: JSON to class object
- Next Thread: shoppingcart
| Thread Tools | Search this Thread |
Tag cloud for ASP.NET
.net 2.0 ajax alltypeofvideos anathor appliances application asp asp.net bc30451 beginner box browser button c# cac checkbox commonfunctions control dataaccesslayer database datagridview datagridviewcheckbox datalist deployment development dgv dialog dropdownlist dynamic dynamically edit embeddingactivexcontrol expose feedback fileuploader fill findcontrol flash form formatdecimal formview google gridview gudi iis image javascript list listbox login microsoft mobile mouse mssql news novell numerical opera panelmasterpagebuttoncontrols parent project radio redirect registration relationaldatabases reportemail richtextbox save schoolproject search security select sessionvariables silverlight smoobjects software sql-server sqlserver2005 ssl suse textbox tracking treeview unauthorized validatedate validation vb.net video videos vista visualstudio web webapplications webdevelopemnt webdevelopment webprogramming webservice xsl youareanotmemberofthedebuggerusers






