诚求DIV+CSS代码?

来源:百度知道 编辑:UC知道 时间:2024/05/17 00:05:07
请问怎样写DIV+CSS代码才能达到以下效果:
<table width="950" border="0">
<tr>
<td colspan="3" align="right">首页   导航1   导航2   导航3</td>
</tr>
<tr>
<td width="212"><img src="/img/logo.gif" width="189" height="75" /></td>
<td width="510" align="center">广告</td>
<td width="214" align="center" valign="middle"><p>11111</p>
<p>22222</p>
<p>333333</p></td>
</tr>
<tr>
<td> </td>
<td> </td>
<td> </td>
</tr>
</table>
关键是那个logo图片怎样跟那个广告排在一排.谢谢!
我要把它全部换成div+css的代码,不想用表格.

<div style="width:950px; overflow:hidden;">
<div style="width:100%; text-align:right;">首页 导航1 导航2 导航3</div>
<div style="width:212px; float:left"><img src="/img/logo.gif" width="189" height="75" /></div>
<div style="width:510px; float:left; text-align:center;">广告</div>
<div style="width:214px; float:left; text-align:center;">
<p>11111</p>
<p>22222</p>
<p>333333</p></div>
</div>
你可以把STYLE属性单写入文件,通过<div class="类">来调用也OK的。

想在哪个标签上作用上CSS样式
可以在标签中加一个ID属性
例如<table width="950" border="0" id=1>

然后在CSS文件中写
#1{ css样式}

这样就可以是想CSS样式布局了!

<div id=1>首页 导航1 导航2 导航3</div>

<div id=2><img src="/img/logo.gif" width="189&quo