我似乎不能并排放置一个徽标和一张桌子,但彼此之间的距离不是很近。我能够实现这一目标的唯一方法是使用表格,但图像和表格变得非常接近。我想要页面中间的表格,以及表格和左侧屏幕远端之间的徽标。
像这样
标志表
这是现在的样子
标识
- -桌子
<div id="header" style="height:15%;width:100%;">
<img src="/e-com/images/logo.jpg" style="margin-left:15%;margin-top:5%"/>
<table border="1" width="44" style="margin-left:30%;float:top;">
<tr>
<td><h1><a href="home">Home</a></h1></td>
<td><h1><a href="home">Home</a></h1></td>
<td><h1><a href="home">Home</a></h1></td>
</tr>
</table>
</div>
Run Code Online (Sandbox Code Playgroud)
使用两个div并设置向左浮动
<div id="header" style="height:15%;width:100%;">
<div style='float:left'>
<img src="/e-com/images/logo.jpg" style="margin-left:15%;margin-top:5%"/>
</div>
<div style='float:leftt'>
<table border="1" width="44" style="margin-left:30%;float:top;">
<tr>
<td><h1><a href="home">Home</a></h1></td>
<td><h1><a href="home">Home</a></h1></td>
<td><h1><a href="home">Home</a></h1></td>
</tr>
</table>
</div>
</div>
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
21903 次 |
| 最近记录: |