Hello,
It's been awhile since the last time i used css. Now I'm back but I'm having issues trying to center my navigation bar. Any ideas on how i can fix this problem? Thanks in advance
/*================ Nav Bar ================*/
.nav-bar {
position: relative;
border-top: 1px solid $color-header-border;
background-color: $color-header;
z-index: $z-index-stickynav;
left: 50%;
right: 50%;
text-align: center;
// psuedo element sits above meganav dropdown, but below nav links
&:after {
content: '';
position: absolute;
top: 0;
right: 0;
left: 0;
bottom: 0;
background-color: $color-header;
pointer-events: none;
z-index: $z-index-nav-links - 1;
}
}
Why the position property?
The position property is normally a last resort except for minor elements. We do need to see the marked up content, as styles mean nothing without the html to apply it against.
Using position offsets was primarily a work-around for IE6's stupidity and has no business in code for a modern browser.
cheers,
gary