2
我有这样的代码:HTML DIV inline-block的
<div style="margin-top: 5px"></div>
<div style="width:175px; height: 25px; margin: 0 auto; background-color:#fff;">
<div style="font-weight: bold; text-align: center; width: 175px; height: 50px; margin:0; font-family: 'Droid Sans', sans-serif; color:#666666; font-size:12px; border:0; height:100%; line-height: 25px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;">
Top 5 Números Sorteados
</div>
</div>
<center>
<div style="margin-top: 1.5px"></div>
<div style="display:inline-block; width:55px; height: 100%; background-color:#fff; ">
<div style="font-weight: bold; text-align: center; width: 55px; height: 100%; font-family: 'Droid Sans', sans-serif; color:#666666; font-size:12px; height:100%; line-height: 25px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;">
<p>1.</p>
<p>2.</p>
<p>3.</p>
<p>4.</p>
<p>5.</p>
</div>
</div>
<div style="display:inline-block; width:56px; height: 100%; background-color:#fff; ">
<div style="font-weight: bold; text-align: center; width: 56px; height: 100%; font-family: 'Droid Sans', sans-serif; color:#666666; font-size:12px; height:100%; line-height: 25px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;">
<p>1.</p>
<p>2.</p>
<p>3.</p>
<p>4.</p>
<p>5.</p>
</div>
</div>
<div style="display:inline-block; width:55px; height: 100%; background-color:#fff; ">
<div style="font-weight: bold; text-align: center; width: 55px; height: 100%; font-family: 'Droid Sans', sans-serif; color:#666666; font-size:12px; height:100%; line-height: 25px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;">
<p>1.</p>
<p>2.</p>
<p>3.</p>
<p>4.</p>
<p>5.</p>
</div>
</div>
</center>
这给了我下面的输出:http://jsfiddle.net/VmBR7/
我想知道我怎么能做出3个div的是直列没有这种一种边界。我一直在寻找样式选项,但找不到任何可以产生该样式的选项。谢谢
首先:不要使用inline(样式属性)样式。它变得混乱,以后很难改变。改为在头部或外部样式表中使用内部样式表。 –
'
感谢您的提示。我没有在我正在做的项目中使用bgcolor,只是用它来使div可见 –