1

Im trying to put this nav bar in the center and above the background image (you might not be able to see the bg image in jsfiddle) but its there. If i give it a position absolute it all scrams together.

If anyone has any help that would be awesome. Im just not sure where to put it in the html to make sure its at the top as well.

Heres the fiddle: https://jsfiddle.net/98k1nv9e/

ul{
    list-style-type: none;
    border: 2px solid red;
    overflow: hidden;
    width: 530px;
    margin: 0px auto;
}

li{
    width: 120px;
    height: 40px;
    margin: 0px 4px;
    border: 2px solid white; 
    float: left;
}

a{
    display: block;
    width: 120px;
    height: 40px;
    line-height: 40px;
    text-decoration: none;
    text-align: center;
}
41 72 6c
  • 1,600
  • 5
  • 19
  • 30
  • perhaps this may help you https://stackoverflow.com/questions/2005954/center-a-positionfixed-element – Robert I Dec 01 '17 at 23:02
  • i have fixed in your jsfiddle take a look i hope that will help you https://jsfiddle.net/98k1nv9e/2/ – Ahmer Dec 02 '17 at 00:00
  • thank you @ahmer it worked. any idea what i can add so that i can target just the nav a tags. Right now there also effects my two buttons in the middle. I would like to target just the nav so i can better style them – Warren Breedlove Dec 02 '17 at 02:41
  • Edit* i actually put them in a div and gave them a class and called it out with a .classname a and it seems to work well, and not effect the other buttons – Warren Breedlove Dec 02 '17 at 02:44

0 Answers0