- This topic is empty.
Viewing 4 posts - 1 through 4 (of 4 total)
Viewing 4 posts - 1 through 4 (of 4 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.
I am currently having an issue with my navigation bar. It changes positions at random when the page is refreshed. The nav is inside header . I can not figure out the problem. Here is the all the Code for the nav.
#list-nav {
padding: 10px 20px 20px 40px;
margin-left: -40px;
margin-top: -1px;
display: inline-block;
position: absolute;
text-shadow: 0 4px 6px rgba(0,0,0,.4);
}
#list-nav a{
margin-right: 90px;
text-decoration: none;
color: black;
font-size: 22px;
}
#list-nav a:hover {
color: white;
}
a:nth-child(-n+3)
{
margin-right: 60px !important;
}
a:nth-child(3)
{
margin-right: 45px !important;
}
And here is the HTML
Header HTML
Header CSS
#header {
height: 150px;
padding-top: 10px;
}
thanks @jurotek. the problem was the negative margin.
changed the
margin-left: -40px;
to
margin-left: 20px;
the point of the negative margin was to align the anchors with parts of the background image but i then added the :nth-child selector to fix that but left the negative margin up by accident.
Well it worked for a while but it is still falling underneath the logo. http://d.pr/i/mVY0 (how it is suppose to be) how it changes http://d.pr/i/bYK2 . I also just noticed that when the nav-bar moves it moves the facebook button as well.