我想在彼此之间有2列。在第一个应该是一个背景图像。与图像的“最小”大小。其他2应该有相同的大小。带有文本换行符的3列
如果我写了一个文本,div
应该在他的一个换行。
其实我不喜欢这样
<style type="text/css">
body
{
background-color:#484848;
}
#wrapper
{
width: auto;
margin: 0 auto;
display: inline-block;
}
.col
{
display: block;
background: #FFF;
float: left;
height: 200px;
width:100%;
}
</style>
<body>
<div id="wrapper">
<div class="col" style=
"background-image:url(img/Logo.jpg);
width:101px;
height:200px;
background-repeat:no-repeat;"><--! in same line actually -->
</div>
<div class="col">
<table border="0">
<tr>
<td>username</td>
<td><input type="text"></td>
</tr>
<tr>
<td>password</td>
<td><input type="password"></td>
</tr>
<tr>
<td></td>
<td><input type="submit" value="login"></td>
</tr>
</table>
</div>
<div class="col">
text
</div>
</div>
</body>
,但它确实很糟糕......
如果你不想被“格”标签创建的突破,用“跨度”的标签,而不是 – jondinham
我想通过div标签打破,但它不工作:( – Roby