- This topic is empty.
Viewing 3 posts - 1 through 3 (of 3 total)
Viewing 3 posts - 1 through 3 (of 3 total)
- The forum ‘CSS’ is closed to new topics and replies.
The forums ran from 2008-2020 and are now closed and viewable here as an archive.
Hi.
I am making a menu which has position fixed but for some reason when I fixed it it only works on Fire Fox and not Google chrome or IE
Any thoughts why?
Hi.
I am making a menu which has position fixed but for some reason when I fixed it it only works on Fire Fox and not Google chrome or IE
Any thoughts why?
@media (min-width: 768px) {
#menu-sidebar {
position: fixed;
top: 0;
left: 0;
bottom: 0;
z-index: 1000;
display: block;
padding: 70px 20px 20px;
background-color: #f5f5f5;
border-right: 1px solid #eee;
}
}
Codepen or a live link please.
After working it out I found out why with position fixed I had widths to do this when adding side bar on left and content on right All working now.
@media (min-width:768px) {
#menu-sidebar {
margin-left: -25%;
left: 25%;
width: 25%;
position: fixed;
height: 100%;
border-radius: 0;
border: none;
background-color: #111;
overflow-y: auto;
}
}
@media (min-width:992px) {
#menu-sidebar {
margin-left: -16.666666666666664%;
left: 16.666666666666664%;
width: 16.666666666666664%;
position: fixed;
height: 100%;
border-radius: 0;
border: none;
background-color: #111;
overflow-y: auto;
}
}
All working now.