5 replies [Last post]
ptekone
Offline
newbie
Last seen: 18 years 9 weeks ago
Joined: 2004-09-25
Posts: 4
Points: 0

hey guys i have been working on a simple piece of code that works perfectly in firefox but breaks in ie... not sure if its a bug... i have already done some research on hacks and it doesnt seem to conform to any of them... need help Very Happy

the idea is to semanticly mark up a <dl>. Heres the code:

the code:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style type="text/css" media="all">
dl{
font-family: Verdana, Arial, Helvetica, sans-serif;
font-size: 11px;
width: 300px;
}
dt{
float:left;
clear:both;
width:150px;
font-weight: bold;
background-color: #CCCCCC;
}
dd{
margin:0px;
float:right;
clear:right;
width:150px;
background-color: #999999;
}
</style>
</head>
<body>
<dl>
<dt>address:</dt>
<dd>line 01</dd>
<dd>line 02</dd>
<dd>state</dd>
<dd>country</dd>
<dt>contact:</dt>
<dd>phone 01</dd>
<dd>phone 02</dd>
<dt>email:</dt>
<dd>email 01</dd>
<dd>email 02</dd>
<dd>private email</dd>
</dl>
</body>
</html>

ptekone
Offline
newbie
Last seen: 18 years 9 weeks ago
Joined: 2004-09-25
Posts: 4
Points: 0

oh and its not the 3px jog bug

i forgot to add its not the 3 px float jog bug either.. its a clearing problem i think.....

iam submitting two images of the problem one is a firefox version and he other is ie

Tony
Tony's picture
Offline
Moderator
Brisbane
Last seen: 1 week 5 days ago
Brisbane
Timezone: GMT+10
Joined: 2003-03-12
Posts: 5344
Points: 2965

styled &lt;dd&gt; and &lt;dt&gt; tags.... new bug maybe????

Hi ptekone,
Have you tried just floating one of either the dt or the dd?

ptekone
Offline
newbie
Last seen: 18 years 9 weeks ago
Joined: 2004-09-25
Posts: 4
Points: 0

re:tony

yeah i have tried it but it makes it even worse.....

the code works fine in firefox and compliant browsers but not in ie.....

any ideas of a possible bug?

Tony
Tony's picture
Offline
Moderator
Brisbane
Last seen: 1 week 5 days ago
Brisbane
Timezone: GMT+10
Joined: 2003-03-12
Posts: 5344
Points: 2965

styled &lt;dd&gt; and &lt;dt&gt; tags.... new bug maybe????

Hi ptekone,
with floated elements in IE it's a good idea to set them to position:relative and display:inline;. They seem to fix many problems in IE with floats.

Hope that helps

ptekone
Offline
newbie
Last seen: 18 years 9 weeks ago
Joined: 2004-09-25
Posts: 4
Points: 0

re: tony

thanks for your help... but that didnt work either..... grrrrrr

if i could get this to work it would save me ages in displaying tables etc.....

cheers