Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9086389
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 16, 20262026-06-16T21:28:42+00:00 2026-06-16T21:28:42+00:00

This layout is practically everywhere on the web but no one seems to have

  • 0

This layout is practically everywhere on the web but no one seems to have provide any information on how it works. I need for the content to be centered and the background needs to extend the full width of the page Example http://www.fuerstlaw.com/ (the blue bg color extends the full width). How is this done using CSS? I feel like it’s something very simple but just can’t figure it out.

Here is my code as I am just trying to at least get the header working at this link to a test page of the site http://gsringolaw.com/home

body {
    margin: 0;
    padding: 0;
}
#wrapper {
    width: 960px;
    margin: 0 auto;
}

#masthead {
    min-width: 100%;
    margin: 0px;
    padding: 0px;
    background-position: 0px 0px;
    background-color: #00304F;
    position: relative;
    z-index: 0;
}
#headertext {
    position: relative;
    width: 250px;
    height: 82px;
    font-family: Georgia, "Times New Roman", Times, serif;
    color: #FFFFFF;
    font-size: large;
    top: -41px;
    left: 704px;
}
#glow {
    height: 170px;
    background-image: url('images/glow.png');
    position: relative;
    background-repeat: no-repeat;
    background-position: center;
    top: -192px;
    left: -13px;
    width: 973px;
}


#logo {
    position: relative;
    background-image: url('images/gayleringo.png');
    background-repeat: no-repeat;
    width: 528px;
    height: 113px;
    top: 28px;
    left: 0px;
}

<div id="wrapper">
<div id="masthead" style="height: 171px">
    <div id="logo">
    </div>
    <div id="headertext" class="auto-style1">
        Louisiana: 504-975-0180<br />
        <br />
        Florida: 850-292-7059</div>
    <div id="glow">
    </div>
</div>
<div id="top_nav">
</div>
<div id="container">
    <div id="right_col">
    </div>
    <div id="page_content">
    </div>
</div>
<div id="footer">
</div>
</div>
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-16T21:28:43+00:00Added an answer on June 16, 2026 at 9:28 pm

    To achieve this you need a wrapper and the actual div that holds the content.

    <div id="wrapper">
        <div id="content">
            Content
        </div>
    </div>
    

    Then you set a background to the #wrapper and give a width and margin: 0 auto to #content to center it.

    #wrapper {
        background: red;
    }
    #content {
        width: 960px;
        margin: 0 auto;
    }
    

    The outter div, because of its display: block, will extend to 100% of the page width. Then the inner div is centered with a fixed width. So actually, the background is not from the content itself, but from the wrapper.

    What I like to do is to give the inner div a class of .inside and then apply to any div I want. For example:

    <div id="header">
        <div class="inside">
            Header
        </div>
    </div>
    <div id="main">
        <div class="inside">
            Main content
        </div>
    </div>
    <div id="footer">
        <div class="inside">
            Footer
        </div>
    </div>
    

    You can see an example here: http://codepen.io/joe/pen/bxueF

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have this layout that works correctly, a relative layout with a text view
i need to implement this layout in android..the view must be have two list
Im using this Layout to put two ImageViews one next to the other, but
I've been give this layout where I have a section, with some information. However,
I have this layout, containing a single TextView , but I would like to
I have this layout and it has several boxes that have different content for
I have this layout: <LinearLayout xmlns:android=http://schemas.android.com/apk/res/android android:layout_width=match_parent android:layout_height=wrap_content android:orientation=horizontal android:gravity=left> <LinearLayout android:layout_width=wrap_content android:layout_height=wrap_content android:orientation=horizontal>
OK I have this layout in XML & and this code, what I am
I'm using this layout to create a 2 column fluid web page. What I
I have this layout: <?xml version=1.0 encoding=utf-8?> <LinearLayout xmlns:android=http://schemas.android.com/apk/res/android android:layout_width=wrap_content android:layout_height=wrap_content > <TextView android:id=@+id/solution_title

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.