Hi everyone, I'm currently facing a puzzling issue and not sure what's causing it.
Sometimes the elements I've set as inline-blocks cooperate as expected, but then when I refresh the browser, they suddenly decide to misbehave.
Below is my HTML:
<div class="col-md-8 col-sm-8 col-lg-8">
<div class="listing-container">
<h3 class="model-listing-title clearfix">2011 (11) Mercedes-Benz C Class C250 CDI BlueEFFICIENCY Sport 4dr Auto</h3>
<h3 class="price-listing clearfix">£17,998</h3>
</div>
<div class="listing-container-spec">
<img src="media/img/mercedes-test.jpg" alt="mercedes-benz"/>
</div>
</div>
Here is my CSS:
.listing-container {
background-color:#dddddd;
padding:0;
border-radius:6px 6px 0 0;
-moz-box-shadow:inset 0 0 10px #000000;
-webkit-box-shadow:inset 0 0 10px #000000;
box-shadow:inset 0 0 5px #9e9e9e;
padding:1px 10px;
overflow:auto;
}
.listing-container-spec {
background-color:#153066;
width:100%;
height:auto;
display:block;
position:relative;
}
.listing-container-spec img {
max-width:60%;
}
.model-listing-title {
font: 600 1.5em 'Open Sans', sans-serif;
margin-top:0.1em;
display:inline-block;
width:75%;
}
.price-listing {
font: 700 2em 'Open Sans', sans-serif;
margin-top:0.1em;
display:inline-block;
float:right;
margin-top:0.1em;
}
This is how it should appear:
After a few reloads:
I'm using Bootstrap, by the way. But interestingly, the code works fine on JSFiddle, yet on my live site, the positioning changes almost every time I refresh.
Any insights into why this might be happening?
Check out the live example here: