Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums CSS Floating Div floating too far right!

  • This topic is empty.
Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #27744
    reastman
    Member

    Could someone help me out? I have a floating div in right column at http://www.smbresearch.net that is floating far too far right. I have tried everything. this should be a floating div for text.. I have the LH div’s ("top" and leftCol" set to auto width with a maxwidth of 730), and I would then like the right column to be a floating div (250px max, I think) that then floats on the RH side of the page, with perhaps 150px or so as a margin above the RH div. What am I doing wrong? It is something simple, no doubt – but I have been staring at it for too long that I can no longer see the forest for the trees. Thanks much in advance for your help. I need to get this fixed! I cant figure out why it floating right off of the page.

    #70035
    takeiteasy04
    Member

    Well, one thing I saw right off the bat was:

    div#leftCol {
    width:auto
    max-width:730px;
    width: expression(document.body.clientWidth > 730 ? "730px": "auto" );}

    There’s no semi-colon to close the width: auto.

    As for the columns, what I usually do is set both columns to float: left; and then use position: relative; to add breathing room between the two.

    Plus, you may want to add a clearing div in under div#top:

    Ex:

    HTML:

    <div class="clear"></div>

    CSS:

    div.clear {
    clear: both;
    }

    #70040
    reastman
    Member

    takeiteasy04, Thanks very much for your quick response – darned "auto", who does "auto" get special treatment and able to wander around without his good friend semicolon? I need to figure out how to use position:relative, and so I shall take your suggestion under serious advisement while I figure out how to work with this. Much thanks!

Viewing 3 posts - 1 through 3 (of 3 total)
  • The forum ‘CSS’ is closed to new topics and replies.