I'm trying to center an image within a div which is designed to take up 65% of the screen horizontally on the right. Instead of doing that however, it looks like this:
Not only is the image not centered, the div seems to be much more than 65% of the width (the sidebar on the left is 35%), it keeps going.
HTML:
<div class='presskit_main_section'>
<div class="presskit_image_placeholder">
<img src="images/presskit_image_placeholder.jpg" width="55%" height="" id="image_placeholder"/>
</div>
</div>
CSS:
.presskit_main_section{
float: right;
width: 65%;
height:100vh;
display: inline-block;
padding-bottom: 100%;
margin-bottom: -100%;
}
.presskit_image_placeholder{
width: auto;
height: 15rem;
margin: 0 auto;
}
#image_placeholder{
margin: 0 auto;
}
EDIT: Here's a JSFiddle to make things easier, the images won't show up of course because they're local, but it should show the problem well: https://jsfiddle.net/ks2za0L7/