The H3, image and p can all be styled due to their being inside that div: .outer h3 { font-weight: bold; } .outer img { float: left; margin-right: .5em; } .outer p { padding: 0.2em 0; }
-Tim On Wed, Nov 17, 2010 at 2:54 PM, John <j...@coffeeonmars.com> wrote: > On Nov 17, 2010, at 11:25 AM, G.Sørtun wrote: > > > Your example looks like a clear case of "divitis" - meaningless overuse of >> divs. >> >> The following... >> >> <div class="outer"> >> <h3>Title</h3> >> <img src="image_1.jpg"> >> <p>descriptive text</p> >> </div> >> >> ...would be a better and more meaningful source-code, and the use of >> class="outer" instead of ID is more correct for repeated blocks in same >> page. No problem with ID on "outer" if you're creating a new page for each >> such block though. >> >> > > Heh.."divitus"...I was afraid of that! Well, in your example then, would I > need to throw a tag around the <img src> tag to indicate image position > (float, etc) and I guess my <p> would also need that, as I want to control > where these things sit. Basically, I want to control the space around both > image and text, plus make my image top-align with that text. > > I haven't played around with your suggestion yet, but I am about to..I > wanted to send off this question right away. > > Many thanks! > > John > ______________________________________________________________________ > css-discuss [cs...@lists.css-discuss.org] > http://www.css-discuss.org/mailman/listinfo/css-d > List wiki/FAQ -- http://css-discuss.incutio.com/ > List policies -- http://css-discuss.org/policies.html > Supported by evolt.org -- http://www.evolt.org/help_support_evolt/ > -- ----------------------------------------- tim.arn...@gmail.com ______________________________________________________________________ css-discuss [cs...@lists.css-discuss.org] http://www.css-discuss.org/mailman/listinfo/css-d List wiki/FAQ -- http://css-discuss.incutio.com/ List policies -- http://css-discuss.org/policies.html Supported by evolt.org -- http://www.evolt.org/help_support_evolt/