Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

macaddict23

macrumors 6502
Original poster
Jun 20, 2006
382
1
MacVille, USA
No.png


I want the bold headline above to align to the top of the image.

HTML Code:
HTML:
<div class="entry-home"><img src="image.gif"/>
<p><b>Sample Headline</b><br />
Re feumsan henit lum voloreet volobor irilit wisse dolorem zzriuscilis alisim estis eliquat. Ut vent eliquam vel ipit in ute consed dolorer cidunt accum irilis nulland rerilla facilit augiam eriureros  augiam eriureros eu feugue volorem dunt veliqui.</p>
</div>

CSS Code:
HTML:
.entry-home {
	float: left;
	width: 600px;}

.entry-home img {
	float: left;
	margin-right: 14px;}

.entry-home p {
	padding-left: 150px;}
 
I suggest altering your code just a bit to make the heading use a heading tag (<h1>-<h6>). It'd look something like this:

HTML:
<div class="entry-home">
<h1>Sample Headline</h1>
<img src="image.gif"/>
<p>Re feumsan henit lum voloreet volobor irilit wisse dolorem zzriuscilis alisim estis eliquat. Ut vent eliquam vel ipit in ute consed dolorer cidunt accum irilis nulland rerilla facilit augiam eriureros  augiam eriureros eu feugue volorem dunt veliqui.</p>
</div>

The h tags are block level so everything after it will be on a separate line. The image is still floated left, and the paragraph wraps around it. You may need to adjust the margins or padding on whatever h element you use to get it to align with whatever styles are applied to the image.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.