Reputation: 3488
My current page looks like this:
I would like to do that vertical scrollbar is always showed(when the page is too large). Horizontal scrollbar should be at the bottom of browser like this:
How can I this. I hope I explained.
HTML
<body>
<div id="top">This is the top div</div>
<div id="main">
This is the main content area. This is the main content area.....
.... aaaaa...
</div>
</body>
css
body{
width: 100%;
margin: 0px;
padding: 0px;
}
#top{
text-align: center;
background-color: #FF0;
height: 100px;
position: relative;
top: 0px;
}
#main{
background-color: silver;
overflow: auto;
}
Updated
I made this: http://85.10.35.158/. The only problem is that I can't make the width of #content the same as the width of #header.
I tried with jQuery:
var width = $(document).width() - $('#header').width();
$('#content').css('width', width);
but I don't like that javascript is used for design. Is there any way it can be done with CSS. Maybe css3.
Upvotes: 0
Views: 834
Reputation: 66436
You want to take a look at the overflow CSS property: http://www.w3schools.com/cssref/pr_pos_overflow.asp
Upvotes: 3