<tr >
<td><div id="wrap"><c:out value = "User ID"/>
<c:out value = "User Name"/>
<c:out value = "User Answer"/></div></td>
</tr>
#wrap{
width: 90%;
max-width: 1200 px;
margin: 20px auto;
}
O / P:用户ID用户名用户答案
但是,我想要UserID,用户名和用户答案之间的间距
我该怎么办?我是HTML / CSS的新手
答案 0 :(得分:0)
试试这个,虽然我还没有测试过这个
.title{
margin-right: 20px;
float: left;
}
<tr >
<td>
<div id="wrap">
<div class="title"><c:out value = "User ID"/></div>
<div class="title"><c:out value = "User Name"/></div>
<div class="title"><c:out value = "User Answer"/></div>
</div>
</td>
</tr>
编辑:
这很有效。看看jsfiddle 如果你想增加空间,那么只需改变&#34; margin-right&#34;的值。更大的价值。