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 8745257
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T11:58:40+00:00 2026-06-13T11:58:40+00:00

I am having trouble generating a HTML/CSS layout. The best way to think of

  • 0

I am having trouble generating a HTML/CSS layout. The best way to think of it is to take a normal horizontally centered page layout. Only I want one div to extend beyond the centered layout to the right edge of the browser window.

This should work fluently with browser window resizing.
The red plane in this image explains what I mean

  • 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-13T11:58:40+00:00Added an answer on June 13, 2026 at 11:58 am

    Here are two CSS-only methods to achieve layouts like this. Both have been briefly tested in IE 7/8/9 and Chrome.

    Example 1

    Here’s an example where you know the heights of all your elements.

    Demo: http://jsfiddle.net/3RDuy/2/

    HTML

    <div id="top">Top</div>
    <div id="left">Left</div>
    <div id="right">Variable Right</div>
    <div id="bottom">Bottom</div>
    

    CSS

    DIV { position: absolute; height: 100px; }
    #top { width: 400px; left: 50%; margin-left: -200px; background-color: #aaa; }
    #left{ width: 100px; left: 50%; top: 100px; margin-left: -200px; background-color: #bbb; }
    #right{ left: 50%; right: 0; top: 100px; margin-left: -100px; background-color: #aa0000; }
    #bottom{ left: 50%; width: 400px; top: 200px; margin-left: -200px; background-color: #aaa; }​
    

    Example 2

    Here’s an example where you only know the height of the top and bottom.

    Demo: http://jsfiddle.net/3RDuy/3/

    HTML

    <div id="top">Top</div>
    <div id="left">Left</div>
    <div id="right">Variable Right</div>
    <div id="bottom">Bottom</div>
    

    CSS

    DIV { position: absolute; }
    #top { width: 400px; left: 50%; margin-left: -200px; background-color: #aaa;  height: 100px; }
    #left{ width: 100px; left: 50%; top: 100px; bottom: 100px; margin-left: -200px; background-color: #bbb; }
    #right{ left: 50%; right: 0; top: 100px; margin-left: -100px; top: 100px; bottom: 100px; background-color: #aa0000; }
    #bottom{ left: 50%; width: 400px; bottom: 0; margin-left: -200px; background-color: #aaa; height: 100px; }​
    

    If you want variable heights on everything (including the ability to have a height greater than 100%) you will probably need to use JavaScript.

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

Sidebar

Related Questions

I am having trouble with Subsonic 3.0 generating an object for a table which
Having trouble accessing javascript code in a mixed html/js ajax response. jQuery ajax doc
Having trouble understanding. With the following css : .bloc .field:nth-last-child(2){ ...some values... } and
I am having some trouble generating a web form using fields specified in an
Having some trouble sending properly formatted HTML e-mail from a PHP script. I am
I'm having trouble generating two independent random sequences using the rand and srand functions.
I'm having trouble with Project Euler's problem 12. My code is correctly generating the
I'm having trouble generating a timestamp in a Windows batch file, because I get
Problem: I am having trouble generating an xpath expression that selects a node in
I'm having trouble generating a file reference in F# from a substring. I have

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.