In my site, I have a topBar. I want this to be full screen, but I want the vertical page scrollbar to be shown, like the header for StackOverflow.
My css is:
#topBar
{
background: black
color: #fff;
height: 60px;
width:100%;
padding:10px;
top:0px;
left:0px;
position: fixed;
z-index:1;
}
How can I achieve this?
Did you override the body's initial margin values?
Also, to force show a vertical scroll bar, you can do:
overflow-y: scroll;
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.