0

My current page looks like this:

http://www.shrani.si/f/a/GT/3hC4YcIR/image4.jpg

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:

http://www.shrani.si/?b/CE/jwJ7poJ/image5.jpg

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.

enter image description here

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.

2
  • You mean you want a horizontal scrollbar at the bottom of the window? Commented Sep 5, 2011 at 10:29
  • Yes I'm sorry. horizontal scrollbar. Edited original post. Commented Sep 5, 2011 at 10:30

1 Answer 1

3

You want to take a look at the overflow CSS property: http://www.w3schools.com/cssref/pr_pos_overflow.asp

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.