SitePoint Sponsor

User Tag List

Results 1 to 3 of 3
  1. #1
    SitePoint Enthusiast
    Join Date
    Sep 2006
    Posts
    93
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    How to keep columns from wrapping with css?

    Is there a way to keep the content area div (div.main) and the right sidebar (div.navboxright) from wrapping when the browser window is scaled with a div or some other means, besides using a table, in the following link? Thanks in advance for any help.

    Please review link

  2. #2
    Non-Member deathshadow's Avatar
    Join Date
    Jul 2006
    Location
    Dublin, NH
    Posts
    901
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    add:

    body {
    width: 762px;
    }

    to your CSS, will force the content to remain fixed width - since you appear to be using a fixed width layout. If that automatically forces something down, check that your floats and non-floats all add up to the correct width.

    In addition, if you want to center it on all screens (a good idea with fixed layouts) you can add 'margin:0px auto;' to the body css.

    Enjoy.

  3. #3
    SitePoint Enthusiast
    Join Date
    Sep 2006
    Posts
    93
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by deathshadow
    add:

    body {
    width: 762px;
    }

    to your CSS, will force the content to remain fixed width - since you appear to be using a fixed width layout. If that automatically forces something down, check that your floats and non-floats all add up to the correct width.

    In addition, if you want to center it on all screens (a good idea with fixed layouts) you can add 'margin:0px auto;' to the body css.

    Enjoy.
    That appears to work nicely, Deathshadow, thanks.


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
  •