开发者

How can menu items be displayed from bottom up using CSS

开发者 https://www.devze.com 2023-02-22 05:19 出处:网络
I have my menu working the way I want with the exception that menu elements are displayed from the top down as supposed to bottom up. I tried changing the CSS properties, but still can\'t get it worki

I have my menu working the way I want with the exception that menu elements are displayed from the top down as supposed to bottom up. I tried changing the CSS properties, but still can't get it working. I need my DIV container to be align on the bottom of the parent container. I used 'bottom: 0' CSS property but that doesn't have any affect using both 'position: absolute' and 'position: relative'.

How can I align all the elements within the parent DIV be displayed at bottom: 0 (bottom up)?

Then click on the Projects bottom link (refresh if you need to reset the 开发者_如何学运维menu items). I need that same behaviour I already have, just the menu items should start from the bottom up and be aligned all the way to the bottom.

Any suggestions?

Thanks,

Partizan


The best way to accomplish this is to either put the divs inside the sought after parent element. Ergo the <li> you want to associate these links with. Give the parent <li> a style of position:relative. The on hover set the position of the child div or li to abosulte and left:0;top:0;. Then from there you can style it closer or farther with margin.


Try using padding-top to push them down with an id or class on each sub menu.

Then if that fails, try using min-height: auto; on each parent.

0

精彩评论

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