firefox problem, html not rendered correctly

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?
 
B

bruce barker

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)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,007
Latest member
obedient dusk

Latest Threads

Top