Results 1 to 3 of 3

Thread: <div> float

  1. #1
    Registered GCT13's Avatar
    Join Date
    Aug 2003
    Location
    NYC
    Posts
    480

    <div> float

    Code:
    <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.
    ....

  2. #2
    Registered
    Join Date
    Nov 2003
    Posts
    100
    do your spans have a css class/id? If not, why even use them?

  3. #3
    Registered GCT13's Avatar
    Join Date
    Aug 2003
    Location
    NYC
    Posts
    480
    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.
    ....

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •