I have this insanely frustrating issue involving an image on my home page.
I have a banner with an image that will resize itself in every frustrating way imaginable and it will not stay centered. After spending the better part of a day on this, I thought I'd ask. I've tried all kinds of things, and no for some reason, I'm unable to do @media step downs with height? The image is inherently 800px by 600px or half my normal banner size. I want it to stay centered as it resizes. My right col works fine - just text within. the css below works well when the resolution is between 1920X1080 and around 1300
html
<div class="row">
<div class="col-md-6">
<div class="bgHomeBannerImageDiv">
<img src="~/Content/Images/image.jpg" class="bgHomeBannerImage" />
</div>
</div>
<div class="col-md-6">
<h1 class="testclass">Test<h1>
</div>
</div>
css
.bgHomeBannerImageDiv {
padding:10% 25% 25% 25%;
height:600px;
width:100%;
}
.bgHomeBannerImage {
width:100%;
}
Additionally, I'm not sure why I have to use padding-top at 10% to keep it vertically centered.
Any suggestions - thanks all.