<!-- Featured Article -->
<div class="subFeatured">
<a href="">
<img src="/images/StocksFall_100x78.jpg" width="100" alt="" title="Stocks Fall" />
<h4>U.S. Stocks Decline as Retail Sales Fall, Commodities Tumble</h4>
</a>
<p>U.S. stocks fell, dragging the Standard & Poor’s 500 Index down from a record, as government data showed retail sales unexpectedly fell in March, commodities plunged and a gauge of consumer sentiment slipped.</p>
</div>
If the <a> is floated, you could set the <p> to overflow hidden, assuming there will only be one <p>.
Wow, after all the coding talk over the years, and all deathshadow’s ranting, you are still placing an h4 inside an <a>? That’s not a great structure there, even if you try to gloss over it with an HTML5 doctype.
This is a bit more bulky code wise, but I’d do something like this:
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>thumb</title>
<style media="all">
.subFeatured {width: 400px;}
.thumb {float: right;}
.text {overflow: hidden;}
</style>
</head>
<body>
<div class="subFeatured">
<h4><a href="">U.S. Stocks Decline as Retail Sales Fall, Commodities Tumble</a></h4>
<div class="thumb"><a href=""><img src="image.gif" width="100" alt="" title="Stocks Fall"></a></div>
<div class="text"><p>U.S. stocks fell, dragging the Standard & Poor’s 500 Index down from a record, as government data showed retail sales unexpectedly fell in March, commodities plunged and a gauge of consumer sentiment slipped.</p>
<p>U.S. stocks fell, dragging the Standard & Poor’s 500 Index down from a record, as government data showed retail sales unexpectedly fell in March, commodities plunged and a gauge of consumer sentiment slipped.</p>
</div>
</div>
</body>
</html>
I don’t always remember advice I get here on SitePoint…
And I thought what I did was what DeathShadow would have recommended, i.e. give the user the ability to click either on your Article Heading or the Thumbnail… :-/
This is a bit more bulky code wise, but I’d do something like this:
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>thumb</title>
<style media="all">
.subFeatured {width: 400px;}
.thumb {float: right;}
.text {overflow: hidden;}
</style>
</head>
<body>
<div class="subFeatured">
<h4><a href="">U.S. Stocks Decline as Retail Sales Fall, Commodities Tumble</a></h4>
<div class="thumb"><a href=""><img src="image.gif" width="100" alt="" title="Stocks Fall"></a></div>
<div class="text"><p>U.S. stocks fell, dragging the Standard & Poor’s 500 Index down from a record, as government data showed retail sales unexpectedly fell in March, commodities plunged and a gauge of consumer sentiment slipped.</p>
<p>U.S. stocks fell, dragging the Standard & Poor’s 500 Index down from a record, as government data showed retail sales unexpectedly fell in March, commodities plunged and a gauge of consumer sentiment slipped.</p>
</div>
</div>
</body>
</html>
Thanks for trying to help, after adding an actual thumbnail, the end result looks pretty bad…
(I don’t want the Thumbnail sticking out like a sore thumb.)
Not to confuse the conversation, but here is a screen-shot of my two new “Article Summaries”, plus an older “Article Summary” that uses a different layout.
What do you think about how my current Summaries look?