WordPress.org

Ready to get started?Download WordPress

Forums

CSS Help: Full Width Header and Footer, but Centered Content? (4 posts)

  1. pantone
    Member
    Posted 2 years ago #

    I am trying to figure out how to keep my content (blog posts and right sidebar) centered, while having a full width header and footer.

    I currently have a wrapper in my CSS so therefore everything is centered. When I remove the wrapper, it gives me the full width header and footer that I need, but it also moves my content so that it is no longer centered.

    How would I go about fixing this?

  2. shirazdrum
    Member
    Posted 2 years ago #

    Separate your site into three section or give the wrapper 100% width and center the main content with specific width.

  3. Tarsem Singh
    Member
    Posted 2 years ago #

    Sample Code

    <style>
    #outer_wrapper{width:100%; background: #1c66ab;} /** for 100% width ***/
    #wrapper{width:1000px; margin:0px auto;} /** for 1000px width center centered***/
    </style>
    
    <div id="outer_wrapper">
       <div class="wrapper">
         <!-- Centered Header content-->
       </div>
    </div>
    
     <div class="wapper">
      <!-- you can add here sidebars-->
     </div>
  4. Shail
    Member
    Posted 2 years ago #

    If you post your site link here than it would be easy to solve...

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.