图片在左,文字在右 CSS如何写呢?
想要的效果如图
看不到你的效果图。
你说的是文字图片混排吧? 图片在左,文字在右。
设置放置图片的DIV CSS属性:
float:left;
HTML code:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=shift_jis" />
<title>Untitled Document</title>
<style type="text/css">
img {
float: left;
}
p{
padding-left: 340px;
}
</style>
</head>
<body>
<div><img src="message/images/index_img_01.jpg" alt="" /><p>THIS IS A SAMPLE THIS IS A SAMPLE THIS IS A SAMPLE THIS IS A SAMPLE THIS IS A SAMPLE THIS IS A SAMPLE THIS IS A SAMPLE THIS IS A SAMPLE THIS IS A SAMPLE THIS IS A SAMPLE THIS IS A SAMPLE THIS IS A SAMPLE THIS IS A SAMPLE THIS IS A SAMPLE THIS IS A SAMPLE THIS IS A SAMPLE THIS IS A SAMPLE THIS IS A SAMPLE THIS IS A SAMPLE THIS IS A SAMPLE THIS IS A SAMPLE THIS IS A SAMPLE THIS IS A SAMPLE THIS IS A SAMPLE THIS IS A SAMPLE THIS IS A SAMPLE THIS IS A SAMPLE THIS IS A SAMPLE THIS IS A SAMPLE THIS IS A SAMPLE THIS IS A SAMPLE THIS IS A SAMPLE THIS IS A SAMPLE THIS IS A SAMP
相关问答:
皮肤和样式表都可以设置控件的外观,具体有什么区别呢?
skin 是asp.net 体系的 就相当于<asp:TextBox> 对应于<input type="text">
你把皮肤当成衣服,把样式表当成化妆品就容易理解了
......
css制作的弹出菜单,鼠标移出后菜单消失,我现在想让鼠标移出后菜单保留。就像伊利公司(www.yili.com)一样。
是不是要改菜单弹出的js或css代码。代码如下:就是不知如何改?
function menuFix()
{var sfEls = doc ......
刚才在别处看到一个关于js+css来控制网页显示的问题,如何写自动判断是百度蜘蛛还是人浏览呢
就是百度蜘蛛访问的是一个页面,而人看到的是另一个页面
希望高手帮助
不会,帮你顶一下
不懂,有待学习!
唉~~ ......
请问html中哪些标签的哪些属性默认状态下是能够被子代所继承的?比如我写了如下代码:
<ul>
<li id="first"><a href="#">帮助</a></li& ......
我在母板页里写了下面这段style:
<style type="text/css">
.ListHead2
{
background-color: #E0E3E8;
......