Hi, I have a page, made is ASP .NET, in which all contents are dynamically obtained from database(DB). It has pic on right, whose address is stored in DB.and in place of pic, i display ad if no image addrss is there. i am doing it with help of ASPanel. Image in panel 1 and ad code in panel 2. If there is image, i show panel 1 and hide panel 2. else Vice versa. Now i am having trouble with layout of page. I want the text to wrap around the image. After the height of image or ad,which i have set same, the text should occupy all available space below the image too. I am pasting the code snippet below : <div> <asp:Label ID="Author" runat="server" Text="Label"></asp:Label> <br /> <asp:Label ID="Timestamp" runat="server" Text="Label"></asp:Label> <br /> <aspanel ID="Panel1" runat="server"> //Ad code here </aspanel> <aspanel ID="Panel2" runat="server"> <asp:Image ID="Image1" Width="320px" Height="268px" ImageUrl="<%=pic_url %>" runat="server" /> </aspanel> <%=body %> // retrives the body of the article from the database </div>
at the moment i am still working on the site. So its not kinda complete.. anyways, the address is http://www.ebouke.info/Articles/2/Name.aspx the db doesnt hav any entry.. so ad wd appear..
For the element around the picture remove all css(margin-left:600px;margin-right:10px;padding:10px and put just float:right; and for div where text is you don't need to put anything, text will just wrap around image. If you want image to have some margin add margin-left:XXX; I think this will help...
aahhh.. Thanks a lot.. Also can you please give me another advice. here all the text appears as one block. but from where i copied it, it had paragraphs and line breaks. So when we store it in db , does we lose all formatting ? i tried putting the content in <pre> tag but it too didnt help
Try to implement some sort of WYSIWYG editor. I see that text is in one big DIV. Maybe to put <p> tag instead of that div, but i think that that is not so great solution... Try to implement WYSIWYG editor in textbox where you paste text...