For each post box, I want the thumbnail to float to the left and the text to float to the right. I do not want the thumb to wrap around the text.
Here is my html code:
<div class="post-container">
<div class="post-thumb"><img src="thumb.jpg" /></div>
<div class="post-title">Post title</div>
<div class="post-content"><p>post description description description etc etc etc</p></div>
</div>
I’ve tried a few ways and still can’t get it to work… the text won’t show on the right…
Here’s my CSS code:
.post-container{
margin: 20px 20px 0 0;
border:5px solid #333;
}
.post-thumb img {
float: left;
clear:left;
}
.post-content {
float:right;
}
Is this what you’re after?
h3(header) tag, because it’s a more semantic choice than using adiv.Live Demo #1
Live Demo #2 (with header at top, not sure if you wanted that)
HTML:
CSS: