100%水平列表可能吗? [英] 100% Horizontal list possible ?
问题描述
大家好,
是否可以在< UL>中使用4个LI项目。将LI宽度设置为
宽度:25%使每个尺寸为其容器宽度的25%
是多少?它似乎不是这样,宽度似乎不影响李。当ul宽度为100%时,甚至是
有什么想法吗?
戴夫。
Hi all,
Is it possible to have 4 LI items in a <UL> with the LI width set to
width:25% so that each one sizes to 25% of whatever its container width
is ? It doesnt seem so, the width doesnt seem to affect the li. even
when the ul width is 100%
Any thoughts ?
Dave.
推荐答案
Dave Brown写道:
Dave Brown wrote:
大家好,
是否有可能在< 4中有4个LI项目; UL>将LI宽度设置为
宽度:25%,使每个尺寸为其容器宽度的25%?它似乎不是这样,宽度似乎不影响
li。即使当ul宽度为100%
任何想法?
戴夫。
Hi all,
Is it possible to have 4 LI items in a <UL> with the LI width set to
width:25% so that each one sizes to 25% of whatever its container
width is ? It doesnt seem so, the width doesnt seem to affect the
li. even when the ul width is 100%
Any thoughts ?
Dave.
< style type = " text / css">
ul
{
list-style:none;
width: 50%;
}
li
{
float:left;
宽度:25%;
}
< / style>
< ul>
< li>一个< / li>
< li>两个< / li>
< li>三< / li>
< li>四< / li>
< / ul>
<style type="text/css">
ul
{
list-style: none;
width: 50%;
}
li
{
float: left;
width: 25%;
}
</style>
<ul>
<li>One</li>
<li>Two</li>
<li>Three</li>
<li>Four</li>
</ul>
。 www.authoring.stylesheets ,Dave Brown写道:
in comp.infosystems.www.authoring.stylesheets, Dave Brown wrote:
大家好,
在< UL>中是否可以有4个LI项目。将LI宽度设置为
宽度:25%,使每个尺寸为其容器宽度的25%?它似乎不是这样,宽度似乎不影响李。甚至当ul宽度为100%时
有什么想法吗?
Hi all,
Is it possible to have 4 LI items in a <UL> with the LI width set to
width:25% so that each one sizes to 25% of whatever its container width
is ? It doesnt seem so, the width doesnt seem to affect the li. even
when the ul width is 100%
Any thoughts ?
URL?你究竟做了什么?
-
Lauri Raittila< http://www.iki.fi/lr> < http://www.iki.fi/zwak/fonts>
URL? What exactly did you do?
--
Lauri Raittila <http://www.iki.fi/lr> <http://www.iki.fi/zwak/fonts>
2004年11月22日星期一21:31:12 +0000,Dave Brown< da **@nospamhere.dbws.net>
写道:
On Mon, 22 Nov 2004 21:31:12 +0000, Dave Brown <da**@nospamhere.dbws.net>
wrote:
是否可以在< UL>中使用4个LI项目。将LI宽度设置为
宽度:25%,使每个尺寸为其容器宽度的25%?它似乎不是这样,宽度似乎不影响李。甚至
当ul宽度为100%时
Is it possible to have 4 LI items in a <UL> with the LI width set to
width:25% so that each one sizes to 25% of whatever its container width
is ? It doesnt seem so, the width doesnt seem to affect the li. even
when the ul width is 100%
当然可以。您需要更改li才能显示:inline;但是,否则
默认情况下它们会低于对方。
Sure it is. You need to change li to display: inline; though, otherwise
they go below each other by default.
这篇关于100%水平列表可能吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!