html - Navigation, moving second level of my nav few pixels to the left -


i have navigation:

http://jsfiddle.net/xdnd9/

it works fine, move fdsa 10 pixels left. if add left: -10px; in there, position in left of screen. if change position relative, crashes list. how position sub-list 10px left?

edit: sine see wasn't clear, want move fdsa <- way

add following:

ul > li {     display: inline-block;     position: relative; } 

and

ul > li:hover ul{     display: block;     position: absolute;     left: -10px; } 

position: relative makes absolute positioning of nested elements being calculated relatively element, left: -10px; no longer moves inner elements next left side of screen.

demo


Comments

Popular posts from this blog

css - Which browser returns the correct result for getBoundingClientRect of an SVG element? -

gcc - Calling fftR4() in c from assembly -

Function that returns a formatted array in VBA -