开发者

Why do my absolute positioned ul's change width?

开发者 https://www.devze.com 2023-03-19 12:58 出处:网络
http://jsfiddle.net/seXjp/ If you mouse over \"one\" \"two\" or \"three\" you\'ll see a menu pops up from each.

http://jsfiddle.net/seXjp/

If you mouse over "one" "two" or "three" you'll see a menu pops up from each.

When they're animating up the right hand side seems to be cut off about 10px.

When they've finished, suddenly those 10px come back!开发者_高级运维

Any ideas why this happens?

Thanks


You have some box model errors.

The width of .upmenu ul should be 110px (100px + 2*5px padding of .upmenu li) and the .upmenu ul li should have no horizontal padding when using width: 100%.

Here an Update

edit

In fact you are using centered text, you could also set the horizontal padding to 0 for .upmenu li and you will be fine using 100px or 100% width's.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号