I'm working on a blog section of my homepage and having issues with the formatting. I want to display two blocks in the same row(side by side) and I want that row to stay in the normal flow of the page. To do this I have both of the boxes in a container box. Relevant code:
#container1 {
display: block;
position: static;
margin-bottom: 20px;
border-width: 1px;
border-style: solid;
}
#pgPhoto {
padding: 10px;
display: inline-block;
width: 20%;
border-width: 10px;
border-style: outset;
}
#statement {
padding-left: 30px;
padding-right: 30px;
display: inline-block;
float: right;
border-width: 10px;
border-style: outset;
}
#post1 {
display: block;
border-width: 10px;
border-style: outset;
}
<div id="container1">
<div id="pgPhoto">
<!--this is just a box right now-->
</div>
<div id="statement">
<p1>
<em class="bold">Statement:</em> Some Text
</p1>
</div>
</div>
<div id="post1">
The post1 block overlaps the boxes above when they're floated. From what I understand this would be normal because they're taken out of the normal flow and the way around this is to make a container box that includes both of the side-by-side boxes. But it seems like floating the boxes inside of the container block also takes the container block out of the flow? Also is "display: inline-block;" supposed to make blocks display side-by-side? Because I can't get that to work properly either.