html - Navigation, moving second level of my nav few pixels to the left -
i have navigation:
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.
Comments
Post a Comment