在我的 html 页面中,我有一个向左浮动的图像。所有文本都应该出现在图像的右侧和底部,这是按预期工作的。
我面临的唯一问题是块引用。预期结果:图片右边->开始引号-引号-结束引号。实际结果:缺少起始引号。
请注意,如果我将包括 blockquote 在内的所有文本放在一个 div 元素中并浮动它,这个问题就会消失。但我不想浮动这个元素。
如果有人可以参考此代码并提出任何解决方案,那将非常有帮助:Anshul's html
.contain img {
width: 100%;
height: 100%;
padding-right: 25px;*/
}
.main-div{
float:left;
width: 40%
}
.thin-black-border {
border-color: #686464;
border-width: 05px;
border-style: solid;
}
.header{
font: 200 80px'Oleo Script', Helvetica, sans-serif;
color: #F4E6E6;
text-shadow: 4px 4px 0px rgba(0,0,0,0.1);
}
/* =Structure
-------------------------------------------------------------- */
p {
margin-bottom: 30px;
}
p:last-child {
margin-bottom: 0;
}
/* =Blockquote
-------------------------------------------------------------- */
blockquote {
position: relative;
marign: 0px;
padding: 30px 30px;
text-align: center;
font-size: 30px;
/*display:inline-block;*/
}
blockquote:before, blockquote:after {
position: absolute;
width: 60px;
height: 60px;
font-size: 120px;
line-height: 1;
}
blockquote:before {
top: 0;
left: 0;
content: "\201C";
}
blockquote:after {
top: 0;
right: 0;
content: "\201D";
}
<body>
<div style="width:100%; height: 100px;background-color:#3B3838" >
<h1 class="text-center header">Madhubala</h1>
</div>
<div class = "main-div contain"> <img src="https://nehamalude.files.wordpress.com/2011/02/madhubala.jpg"/> </div>
<!-- If I don't comment the code below, start quotation mark shows up -->
<!--<div style="float:left; width: 60%; "> -->
<p><blockquote><span title = "Theatre Arts - American magazine"> The Biggest Star in the World - and she's not in Beverly Hills!</span></blockquote></p>
<p>Text.....</p>
<!--</div> -->
</body>