SitePoint Sponsor

User Tag List

Results 1 to 2 of 2
  1. #1
    SitePoint Zealot
    Join Date
    Jun 2004
    Location
    Belgium
    Posts
    133
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Question table to div problem

    hello,

    I'm trying to replace some tables by divs on my site, but I have a problem here. The following is what my brain produced:

    <div style="float: left; font-weight: bold">Links</div>
    <div style="float: right; text-align: right">"My pages text"</div>
    <a href="http://www.hockenheimring.de/">Hockenheim, Germany</a> :: Hockenheim GP

    The problem is that the text after the divs (namely "Hockenh...") is now on the same line as the text displayed by the div elements.

    How would I get it underneath it? Thanks

  2. #2
    Non-Member Egor's Avatar
    Join Date
    Jan 2004
    Location
    Melbourne, Australia
    Posts
    7,305
    Mentioned
    1 Post(s)
    Tagged
    1 Thread(s)
    Hi,
    You need to clear your floats:

    Code:
    <div style="float: left; font-weight: bold">Links</div>
    <div style="float: right; text-align: right">"My pages text"</div>
    <p style="clear: both;"><a href="http://www.hockenheimring.de/">Hockenheim, Germany</a> :: Hockenheim GP</p>


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
  •