PDA

View Full Version : <div> float



GCT13
12-06-2003, 03:50 PM
<html>
<head><title>div float</title></head>
<body>


<div style="float: right; margin-left: 3px; margin-bottom: 3px;"><img src="example.gif" border="0" alt="" /></div>

<span>Line 1.</span><br />
<span>Line 2.</span><br /><br />

</body>
</html>

In IE, the text lines don't align correctly. It appears that "Line 1" is slightly pushed to the right of Line 2. In Netscape, the text renders fine.

What seems to be the problem here? Thanks.

kdb003
12-06-2003, 05:11 PM
do your spans have a css class/id? If not, why even use them?

GCT13
12-06-2003, 05:28 PM
Originally posted by kdb003
do your spans have a css class/id? If not, why even use them? Yeah they have a class, I took them out for the example code.

I found out if I put the spans inside this: <p style="margin: 0px"></p> it fixes the problem I was having.