firefox problem, html not rendered correctly

Discussion in 'ASP .Net' started by Jeff, Apr 20, 2009.

  1. Jeff

    Jeff Guest

    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?
     
    Jeff, Apr 20, 2009
    #1
    1. Advertising

  2. Jeff

    bruce barker Guest

    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)


    Jeff wrote:
    > 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?
    >
    >
     
    bruce barker, Apr 20, 2009
    #2
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Assimalyst
    Replies:
    0
    Views:
    399
    Assimalyst
    Mar 24, 2006
  2. markymark
    Replies:
    5
    Views:
    541
    Jonathan N. Little
    Sep 2, 2006
  3. Tarscher
    Replies:
    12
    Views:
    689
    dorayme
    Jun 15, 2008
  4. André
    Replies:
    4
    Views:
    481
    André
    Jun 19, 2008
  5. Steve Nobody

    Dynamic controls not rendered correctly....

    Steve Nobody, Feb 11, 2010, in forum: ASP .Net Web Controls
    Replies:
    1
    Views:
    739
    Steve Nobody
    Feb 11, 2010
Loading...

Share This Page