firefox problem, html not rendered correctly

  • Thread starter Thread starter Jeff
  • Start date Start date
J

Jeff

hi

asp.net 2.0

This markup is not rended as I want it to be rendered on firefox. Okay, as
you see from the markup below the div jalla is 20 pixels higher than the
image control. That I specified cause I'm asked to fill a red space of 20
pixels high under the picture

So when I test this in IE7 (which gives the correct output, however maybe
there the error is and not in firefox), then a space 20pixels high with a
red color is shown under the picture. But that doesn't happend on firefox,
on firefox there is no red space under the picture. Instead on firefox the
space is above the picture--> which results in the "Endre" hyperlink gets
placed in a red background......

<div style="width:765px; margin-left:auto; margin-right:auto;
margin-top:5px; position:relative;">

<div id="divEdit" runat="server" visible="false" style=" float:right;">
<asp:HyperLink ID="hlEdit" runat="server">Endre</asp:HyperLink>
</div>
<div id="jalla" style="background-color:Red; height:270px;
width:765px;">
<asp:Image ID="Image2" runat="server" Height="250" Width="765" />
</div>

what I do wrong?
 
i assume when you make the link div visible, it displays in the second
div. this is correct, (ie is wrong - in this case a pretty bad bug).
when a div has a float, it adds no height to its parent, but spans into
the following content area(s). so it should be in the red div, and the
image (being a block content) will follow it.

you probably want to clear the float, so it will not extend into the
next content area.

<div id="divEdit"
runat="server"
visible="false" style="float:right;">
<asp:HyperLink ID="hlEdit" runat="server">Endre</asp:HyperLink>
</div>
<div style="clear:both"></div>


-- bruce (sqlwork.com)
 
Back
Top