3 replies [Last post]
S8nsick66
S8nsick66's picture
Offline
Regular
Sweden
Last seen: 13 years 16 weeks ago
Sweden
Timezone: GMT+1
Joined: 2006-11-17
Posts: 39
Points: 0

Hello!

On my site, a definition list in a div (the one with the green dashed border (#news)) gets wrong in IE. (There's two dt's and dd's on each line - should be one)

Link: http://www.kicab.se/index_dennis.php
(sometimes there seems to be problems with the server, reload if you get a 500 error)

The dd's and dt's have percentage widths and floats to the left, and the code can't be all bad since it looks right in FF. Here it is:

body#index #news { float:right; width:42%; border: dashed 2px #006330; padding: 20px 5px 20px 20px; margin-left: 20px; }

#news dt {
float:left;
width: 20%;
}

#news dd {
float:left;
width: 75%;
margin-bottom:5px;
}

I hope someone can give me a pointer in the right direction. Thanks in advance, and my apologies if you get a lot of 500-errors on the page.

Dennis

Tyssen
Tyssen's picture
Offline
Moderator
Brisbane
Last seen: 6 years 6 weeks ago
Brisbane
Timezone: GMT+10
Joined: 2004-05-01
Posts: 8201
Points: 1386

Did you fix this? Looks the

Did you fix this? Looks the same in IE6 and FF.

How to get help
Post a link. If you can't post a link, jsFiddle it.
My blog | My older articles | CSS Reference

S8nsick66
S8nsick66's picture
Offline
Regular
Sweden
Last seen: 13 years 16 weeks ago
Sweden
Timezone: GMT+1
Joined: 2006-11-17
Posts: 39
Points: 0

How odd! I could have sworn

How odd! I could have sworn that div#news was much wider (like all across the body) on IE6 but now it looks good, and I didn't change the code! Strange, but in a good way!

IE7 is still a problem though, the div gets way too wide and don't display the dd/dt's on one line each. Looks right in FF/IE6 (I guess Smile )

So there are float problems in IE7 that IE6 doesn't have?

S8nsick66
S8nsick66's picture
Offline
Regular
Sweden
Last seen: 13 years 16 weeks ago
Sweden
Timezone: GMT+1
Joined: 2006-11-17
Posts: 39
Points: 0

Well, it was easy! (after

Well, it was easy!
(after hours of testing different clear and display values at random Smile )

The containing div was a float without a width, so giving it width:100% fixed everyhing!

Sorry for taking your time with such a foolish mistake.

Dennis