DIC+CSS问题

来源:百度知道 编辑:UC知道 时间:2024/05/24 04:51:51
<style type="text/css">
div { width : 100px; height: 100px; border: thin solid red;}

blockquote { width: 125px; height: 100px;
margin-top: 50px; margin-left: 50px;
border: thin dashed black}
cite { display: block;
text-align: right;
border: none}
p { margin: 0;}
</style>

<div>
<blockquote>
<p>some text long enough to make it interesting.</p>
<cite>- anonymous</cite>
</blockquote>
</div>

你把这段代码运行一下 看看
在IE6和IE7的效果绝对不一样
还有火狐浏览器

我要求把代码给我修改完整了,在线等

<style type="text/css">
div {width:225px;height:auto;border:thin solid red;}
blockquote {width:125px;height:100px;
margin:50px;
border: thin dashed black}
cite {display:block;
text-align right;
border:none}
p {margin: 0; padding:0}
</style>

<style type="text/css">
div { width : 100px!important; height: 100px!important; border: thin solid red;}

blockquote { width: 125px!important; height: 100px!important;
margin-top: 50px; margin-left: 50px;
border: thin dashed black}
cite { display: block;
text-align: right;
border: none}
p { margin:auto;}
</style>

<div>
<blockquote>
<p>some text long enough to make it interesting.</p>
<cite>- anonymous</cite>
</blockquote>
</div>

火狐不好用,很多代码识别不了或者错位

给blockquote加上position:absolute;就行了