开发者

How to customize list/menu?

开发者 https://www.devze.com 2023-02-09 04:23 出处:网络
Wel开发者_如何学Pythonl. i am hoping to find a solution to customize List/Menu with CSS which is also cross browser compatible.Neat CSS menu creator: http://www.cssmenumaker.com/, or you could always

Wel开发者_如何学Pythonl. i am hoping to find a solution to customize List/Menu with CSS which is also cross browser compatible.


Neat CSS menu creator: http://www.cssmenumaker.com/, or you could always google 'CSS Menu'


The markup might go something like this:

<ul>
<li><a href="#">Link Text</a></li>
<li><a href="#">Link Text</a></li>
</ul>

If horizontal menu is needed, you have to float <li>s by giving them fixed width.

li { 
width: 100px; /*Fixed width is important to float, because li is a block level element*/
float: left;
}

If vertical menu is needed, just give a width to <ul> according to your layout

adding display:block; to the <a> will greatly improve the usablity of menus, since it makes the whole <li>s clickable links

0

精彩评论

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