WordPress.org

Support

Support » Themes and Templates » CSS Help: Full Width Header and Footer, but Centered Content?

CSS Help: Full Width Header and Footer, but Centered Content?

  • 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?

Viewing 3 replies - 1 through 3 (of 3 total)
  • Separate your site into three section or give the wrapper 100% width and center the main content with specific width.

    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>
    Shailesh

    @shaileshsavaliya

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

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘CSS Help: Full Width Header and Footer, but Centered Content?’ is closed to new replies.
Skip to toolbar