I have a div on my page that should have some small divs inside it, with a line of text, images and another line of text, everything centered.
But by some weird reason, the div doesn't wrap around the text even if floated, it looks like it haves the same width as the full-scale image, instead of wrapping around the now smaller image.
<div id="real">
<div class="relspn">
Title:<br/>
<img src="img.png"/><br/>
Another text
</div>
<div class="relspn">
Title:<br/>
<img src="img.png"/><img src="img.png"/><br/>
Another Text Another Text
</div>
</div>
Something like that, but, it doesnt matter if I float the divs, set them as inline-blocks or even inline, the div doesn't gets smaller than the full image.
Here's the css:
#real {
float: right;
position:relative;
width:96%;
padding:20px 0;
}
.relspn {
position:relative;
text-align:center;
float:left;
padding:0.2%;
}
.relspn img {
position:relative;
display:inline;
width:10%;
}
I don't know what's happening, help.
Edit:
http://jsfiddle.net/3SkZV/1/
Updated now, I wrote the div class wrong in the example. >.>
Updated the Fiddle too