Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > HTML > div height in IE

Thread Tools

div height in IE

Posts: n/a
I have a structure like this in the page:

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

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.

Reply With Quote

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Div Height = Image height. help muggslab HTML 1 02-01-2010 07:41 PM
<div ... /> and <div ...></div> K Viltersten ASP .Net 4 03-31-2009 07:33 PM
child div blocks parent div, height problem... HJ HTML 5 09-01-2006 04:37 PM
Change height of DIV when div border set Javascript 0 09-21-2005 02:42 PM
How to tell height of div where height is not set? Don Vaillancourt Javascript 8 01-31-2005 11:32 AM