Hello I need help for adding a scrollbar at div id header , I try it but it doesnt work. First I want a answer why it doesnt work and second answer for fix t
- Your code seems to work fine: JSFiddle.. Probably you don't have enough content in the div to make a scrollbar in the div.razemauze– razemauze2015-02-02 09:01:59 +00:00Commented Feb 2, 2015 at 9:01
- <img>prntscr.com/602qaf</img> you can see this ss , I think I have enought content. style of body affect in scrollbar? body { margin: 0; padding: 0; border: 0; overflow:hidden; height: 100% }Klevi– Klevi2015-02-02 09:07:45 +00:00Commented Feb 2, 2015 at 9:07
- As long as you have specified overflow in the header (as you have), then the body shouldn't override it.. But you are missing a semi-colon after the height in your body css.razemauze– razemauze2015-02-02 11:20:31 +00:00Commented Feb 2, 2015 at 11:20
- what you suggest me?Klevi– Klevi2015-02-02 11:33:37 +00:00Commented Feb 2, 2015 at 11:33
Add a comment |
2 Answers
#header{ top:0px; width:1023px; position:fixed; overflow:auto; height: 100px; } change overflow:auto to overflow:scroll
1 Comment
Klevi
Doesnt work again , i can show you the code of body how it look if helps you
I found your HTML in another thread you have created, and put it into a JSFiddle.
The problem is that your divs inside the header is fixed. Set it as relative like this, and the problem should be solved:
#headerLeft{ top:0; position:relative; left:0px; width:630px; height:100px; } See JSFiddle.
1 Comment
Klevi
it works now , but the problem is that i want only 1 scrollbar for all main page. look at screenshot there are 3 scrollbar . prntscr.com/60419r