Forums

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

Home Forums CSS Basic centering problem?

  • This topic is empty.
Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #33167
    Tony
    Member

    Hi all!
    I’m having a problem centering #content-width-container and these 2 which are with in it: #sidebar-content and # main-content. I’ve tried overflow and obviously margin: 0 auto, but it didn’t seem to work. As you can see the footer is centered with margin: 0 auto and works, but I don’t know why the divs mentioned above won’t center. Is it a floating problem possibly? Hoping you guys can help, thanks!

    HTML:

    >




















    Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Vestibulum tortor quam, feugiat vitae, ultricies eget, tempor sit amet, ante. Donec eu libero sit amet quam egestas semper. Aenean ultricies mi vitae est. Mauris placerat eleifend leo. Quisque sit amet est et sapien ullamcorper pharetra. Vestibulum erat wisi, condimentum sed, commodo vitae, ornare sit amet, wisi. Aenean fermentum, elit eget tincidunt condimentum, eros ipsum rutrum orci, sagittis tempus lacus enim ac dui. Donec non enim in turpis pulvinar facilisis. Ut felis. Praesent dapibus, neque id cursus faucibus, tortor neque egestas augue, eu vulputate magna eros eu erat. Aliquam erat volutpat. Nam dui mi, tincidunt quis, accumsan porttitor, facilisis luctus, metus









    Latest Forum Posts


    widget or php here













    CSS:


    html { }
    body { width: 100%; }
    #container { min-width: 1200px; width: 100%; }

    body { background: #333; }
    #header { }
    #sidebar { border-top: #363 3px solid; border-right: #363 3px solid; }
    #main-content { border-top: #363 3px solid; border-right: #363 3px solid; border-top-right-radius: 40px;}
    #footer { border-top: #363 3px solid; }
    a:link { color: #c63; }
    a:visited { color: #933; }
    a:hover { color: #f93; }
    a:active { color: #960; }


    #header-meta { display: none; }
    #header { width: 100%; }
    #header-left { float: left; }
    #header-right { float: right; }
    #header-right-container { }
    #search, #main-nav { float: right; }

    #main-nav { vertical-align: bottom; height: 10px; line-height: 10px; }
    #main-nav ul { float: left; list-style: none; }
    #main-nav ul li { display: inline; margin: 0 10px; }
    #main-nav ul li a { }

    #clear { clear: both; }

    #content-container { border: 1px #fff solid; width: 100%; }
    #content-width-container{ width: 100%; margin: 0 auto; }
    #sidebar-wrapper { float: left; width: 20%; }
    #sidebar { }
    #sidebar-content { }
    #calendar-widget { }
    #main-content { width: 79%; float: left; }


    #footer { width: 100%; clear: both; }
    #footer-width-container { margin: 0 auto; width: 80%; }
    #72603
    Tony
    Member

    thanks a ton dude! worked like a charm! I figured it was a small problem… whew!

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