开发者

Tabbed Navigation Using a List

开发者 https://www.devze.com 2022-12-18 14:37 出处:网络
What is the best way to adjust the li elements to fill the entire width of the div the tab bar w开发者_如何转开发ill be located in?i\'d prefer not to have to use width:33%, but this works.

What is the best way to adjust the li elements to fill the entire width of the div the tab bar w开发者_如何转开发ill be located in?


i'd prefer not to have to use width:33%, but this works.

<html>
<head>
    <style type="text/css">
        div.menuTop {width:400px;border:1px solid red;}
        div.menuTop li  {float:left; width:33%; border:1px solid green;}
    </style>
</head>
<body>
    <div class="menuTop">
        <li>one</li>
        <li>two</li>
        <li>three</li>
        <div style="clear:both;"></div>
    </div>
</body>

hope that helps.

0

精彩评论

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

关注公众号