startbootstrap-sb-admin-2 icon indicating copy to clipboard operation
startbootstrap-sb-admin-2 copied to clipboard

CSS code to fixed navbar and sidebar

Open AbidKhairyAK opened this issue 6 years ago • 6 comments

i just wanna share my css code that fixed the sidebar and navbar. hope you add it to your main css file.

this is the code:

#wrapper {
	position: fixed;
	overflow: hidden;
	top: 0; right: 0; bottom: 0; left: 0;
}
nav.navbar {
	position: sticky;
	position: -webkit-sticky;
	top: 0px;
}

AbidKhairyAK avatar Apr 06 '19 14:04 AbidKhairyAK

Thank For Code. You Saved My Lots of time.

vivekpandiaraj avatar Apr 08 '19 04:04 vivekpandiaraj

Add a z-index in the nav.navbar to see if it is displayed forward in the case of scroll.

nav.navbar {
	position: sticky;
	position: -webkit-sticky;
	top: 0px;
	z-index: 999;
}

lucaspontarolo avatar Jun 11 '19 16:06 lucaspontarolo

Thank For Code.

jamesallan93 avatar Jun 30 '19 02:06 jamesallan93

This code works. But I just noticed that it affects the display of the Modal and the Scroll To Top button...

veslorens avatar Jul 21 '19 11:07 veslorens

For those who have problem with modal - solution: https://stackoverflow.com/questions/32459337/how-to-remove-bootstrap-modal-overlay It's the .modal-backdrop which is broken through the commands.

andreasmatuszewski avatar Oct 31 '19 18:10 andreasmatuszewski

After fixing elements, the line position is not saved after page refresh

visavi avatar Feb 13 '20 09:02 visavi