im making a nav menu that needs to adapt in width for different screen widths, i dont want the menu to scroll down the page so ive set it position:fixed; but when i try and set the left and right measure to give it some spacing from the edge of the screen it only seems to want to follow the first instruction.. either left or right which ever comes first in the css
is there something i could do with out using left and right, could i use margin instead, while using posotion:fixed; and width:auto; ?
ive made a fiddle of the problem bellow
I am not 100% sure I understand your problem. But having a width will override you setting both the left and right (and will only take one). If you just remove the width all together it will line up in the middle (or at least the correct value from the right and left).
DEMO
If you are actually looking for a fixed width & fixed on the page I would do this:
DEMO
If that is not what you wanted, let me know.