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

  • SEARCH
  • Home
  • 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 6573733
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T15:10:16+00:00 2026-05-25T15:10:16+00:00

I have some problem about css layout. I wrote the code like below: <!DOCTYPE

  • 0

I have some problem about css layout.

I wrote the code like below:

<!DOCTYPE html>
<html>
<head>
<meta name="viewport" content="initial-scale=1.0, user-scalable=no" />
</head>
<style>
html { height:100%; margin: 0px; padding: 0px; }
body {
  height: 100%;
  padding: 0px;
  margin: 0px;
  font-family: Verdana, helvetica, arial, sans-serif;
  font-size: 68.75%;
  background: #fff;
  color: #333;
}  
#header {
  position: absolute;
  width:100%;
  background: #c0c0c0;
  height: 100px;
}
#wrapper {
  height: 100%;
  width: 100%;
}
#content {
  position: relative;
  margin-left: 370px;
  background: #ffdab9;
  height: 100%;
}
#sidebar {
  position: absolute;
  background: #eee8aa;
  width: 370px;
  height: 100%;
}
</style>
<body>
<div id="header">header</div>
<div id="wrapper">
  <div id="sidebar">sidebar</div>
  <div id="content">content</div>
</div>
</body>
</html>

then, the thing what I want to do is

  1. “header”‘s height is 100 pixel.
  2. “sidebar(left side)”‘s width id 370 pixel.
  3. “content(right side)”‘s width is relative.
  4. When I control the browser smaller, I do not want browser to make “scroll bar”.
    like http://maps.google.com. google maps never make scroll bar when any resizing browser.

num.4 is most important that I told.

If the goal is made it, my code can be fixed all. Please give me any help.

  • 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-05-25T15:10:17+00:00Added an answer on May 25, 2026 at 3:10 pm

    I think you need two css changes (also see my jsfiddle):

    add overflow: hidden to body

    body {
        ...
        overflow: hidden;
    }
    

    change position to relative in #header:

    #header {
        position: relative;
        ...
    }
    

    === UPDATE ===

    There are (at least) three possible solutions, but none is perfect:

    1.) Your example site from google calculates the (content) height at the beginning and after each resize with javascript.
    Negative: not css only, you need a script.

    2.) Add the height of the header (here 100px) to the css bottom definition of all elements in the sidebar and content (see demo2).
    Negative: if the header height changes, you have to update all bottom definitions too.

    #words { 
        bottom: 102px; 
        ...
    }
    

    3.) Use the css function calc for the #wrapper to calculate the real height (see demo3).
    Negative: at the moment it works only with firefox4 (and above) and IE9.

    #wrapper {
        ...
        height: calc(100% - 100px);
        height: -moz-calc(100% - 100px);
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have some problem with my cfml website. I have used the below code
I have some problem with my code public IQueryable<PageItems> GetPageById(Guid Id) { var xml
iPhone Safari seems to have some sort of problem whereby a page with css
my aspx (html) code is like below : this is first button (something that
I have a question about how to present some structured data using HTML. I
I have some questions about basic CSS that I was unable to understand or
I have some HTML code which displays 9 images with fancybox styles. I duplicated
I am very new to C and I have some problems learning about pointers.
We have some performance problems with one of our applications. I thought about using
I have some problem with Jquery Autocomplete plugin ( http://bassistance.de/jquery-plugins/jquery-plugin-autocomplete/ ) I got it

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.