I'm experiencing an issue when I set the width to auto
, the div expands to full length rather than adjusting to the width of the inner divs.
Here is the HTML code:
<div class="vidswraper">
<div>
<div class="videoimage">
<img src="images/icon1.jpg" height="100" width="100">
<p class="price">21.09</p>
</div>
</div>
<div>
<div class="videoimage">
<img src="images/icon2.jpg" height="100" width="100">
<p class="price">1.99</p>
</div>
</div>
<div>
<div class="videoimage">
<img src="images/logo.jpg" height="100" width="100">
<p class="price">12.12</p>
</div>
</div>
And here is the CSS code:
.vidwraper {
margin: 0 auto;
width: auto;
height: 110px;
}
When using inspect element, it appears that the width is not adjusting to cover the 3 divs inside the .vidswraper
container.
Please note that the inner divs are floated left and have a width of 110px.