-1
可能重複:
how to create a table layout with float in cssCSS浮子與寬度百分比
#inner
{
height:700px;
}
div.content
{
float:left;
width:95%;
}
div.content span.first
{
display:block;
float:left;
width:25%;
overflow:hidden;
}
div.content span.second
{
clear:both;
display:block;
float:right;
width:25%;
}
div.content span.third
{
clear:both;
display:block;
float:right;
width:25%;
}
</style>
<body>
<div id="outer">
<div id="inner">
<div class="content">
<span class="first">
HELLO
</span>
</div>
<div class="content">
<span class="second">
pRERNA
</span>
</div>
<div class="content">
<span class="third">
gOLANI
</span>
</div>
工作時像素正在工作,但不是百分比爲什麼?我想創建三個相等寬度的列。如果外部元素爲72%。我想創建72/3的寬度,即24%的寬度。
請解釋一下你在問什麼,讓更多的人可以幫助你! – imakeitpretty 2012-07-17 18:03:44