div height in IE

Discussion in 'HTML' started by =?ISO-8859-1?Q?L=FCpher_Cypher?=, Oct 12, 2004.

  1. Hi,
    I have a structure like this in the page:

    <div style="position:relative;width:164px;height:48px;">
    <div
    style="position:relative;left:14px;top:13px;width:175px;height:33px;">
    <img src="..">
    </div>
    <div
    style="position:relative;left:0px;top:-33px;width:164px;height:48px;">
    </div>
    </div>

    Now, when I load this in NS-compatible browser, everything is fine and
    the outer div's height is 48px. However, when I load this in IE(6), the
    second inner div causes the outer div to increase height (I suspect by
    48px). The whole thing is in a table cell, thus causing it to grow
    vertically and adding blank space (actually, I have a third div in there
    and it's height is 120px, so the change is quite noticable). Anyone
    knows how to fix this thing?

    PS: I try to follow closely w3c and I've noticed that whatever I try in
    NS-compatible browsers works just fine, as it is supposed to work
    according to w3c, and IE often screws things up.. The last addition to
    my "know-why"'s is that when linking external javascripts, apparently I
    *need* to separately close the tag (i.e., <script... src=...></script>),
    whereas <script... src=.../> should work just fine. Spent about 20
    minutes trying to figure out what's wrong with the page - no errors or
    anything, just a blank page.

    Thanks,
    Lüph
    =?ISO-8859-1?Q?L=FCpher_Cypher?=, Oct 12, 2004
    #1
    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. HJ
    Replies:
    5
    Views:
    834
    Jonathan N. Little
    Sep 1, 2006
  2. K Viltersten

    <div ... /> and <div ...></div>

    K Viltersten, Mar 30, 2009, in forum: ASP .Net
    Replies:
    4
    Views:
    728
  3. muggslab

    Div Height = Image height. help

    muggslab, Feb 1, 2010, in forum: HTML and CSS
    Replies:
    1
    Views:
    853
    muggslab
    Feb 1, 2010
  4. Don Vaillancourt

    How to tell height of div where height is not set?

    Don Vaillancourt, Jan 28, 2005, in forum: Javascript
    Replies:
    8
    Views:
    133
    Dietmar Meier
    Jan 31, 2005
  5. Replies:
    0
    Views:
    114
Loading...

Share This Page