On 11/17/10 2:54 PM, "John" <[email protected]> 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>
>>
>
>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.
No. you just need to style your img tag by calling it after your class
.outer img{float: left; ...}
In CSS notation by adding a space after a class(or id) indicates a
descending element (a child).
So
.class1 .class2{}
Might targt
<div class="class1">
<div class="class2">
This div
</div
</div
<div class="class2">
But not this one
</div>
______________________________________________________________________
css-discuss [[email protected]]
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/