此图的css代码如何写
<p>1楼 你的div中 "padding:6px 12px" 不懂</p><p><img src="561443491" /></p> 展开
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html >
<head>
<title>无标题文档</title>
<style>
ul,li
{
margin:0;
padding:0;
list-style-type:none;
}
div
{
padding:6px 12px;
width:268px;
height:90px;
line-height:23px;
font-size:12px;
}
img
{
width:112px;
height:90px;
float:left;
display:inline;
margin-right:13px;
}
</style>
</head>
<body>
<div>
<img src="左侧图片.jpg"/>
<ul>
<li>青岛宝宝咖啡厅</li>
<li>商家:<a href="#">青岛宝宝咖啡厅</a></li>
<li>人气232人</li>
<li>优惠截止:2009-2-17</li>
</ul>
</div>
</body>
</html>
复制上段代码试试看吧,适合IE6\IE7\firefox
padding:6px 12px:是根据你的这张图来的,是内边居。上、下内边居:6px;左、右内边居:12px;
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>无标题文档</title>
<style type="text/css">
div,p{ margin:0; padding:0}
.Box{ font-size:12px; line-height:24px; overflow:hidden;}
.Box img{ float:left; margin-right:10px; border:solid 1px #C6C6C6; padding:3px;}
</style>
</head>
<body>
<div class="Box">
<img src="http://web.21cp.net/aaaaa/qqqq.jpg" alt="图片" title="图片"/>
<p>青岛宝宝咖啡厅</p>
<p>商家:青岛宝宝咖啡厅</p>
<p>人气:232人</p>
<p>优惠截至:2009-2-17</p>
</div>
</body>
</html>