我正在为课堂作业写一个小网页。我想将文本保留在一列内以及我计划放置图像的段落之间。如何在不专门更改其尺寸的情况下将图像保留在列内?
CSS
body {
background-image:url("Some Image");
background-size:cover;
background-repeat:none;
}
.body-box {
display:block;
margin-left:33%;
margin-right:33%;
padding-left:3%;
padding-right:3%;
border-left:4px solid black;
border-right:4px solid black;
word-wrap:break-word;
text-align:justify;
font-family:'Lato:300',serif;
color:black;
background-color:white;
}
HTML
<div class="body-box">
<h1>Some Text</h1>
<a href="Some Image"><img src="Some Link"
alt="Something Vague" width="auto" height="auto" align="center"></a>
<h2>Some Text</h2>
<p>Some Paragraph</p>