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

design-is

macrumors 65816
Original poster
Oct 17, 2007
1,219
1
London / U.K.
Hi all

I'm working on a new site. I've done a few, but it's not my regular job so I tend to forget some things in between and have to confirm them or look them up again.

This time, I can't for the life of me remember how to pinpoint a nested object.

For example I want to only apply a style to an image, with .home class, within a div with the id of #header.

Is it

Code:
#header img.home { styles }
?

Thanks all :) Gotta hate these blonde moments...

Doug
 
That looks right. It be applied to the following,

HTML:
<div id="header">
...
<img class="home" src="..." alt="..." />
...
</div>
 
Wirelessly posted (Mozilla/5.0 (iPhone; U; CPU iPhone OS 2_2_1 like Mac OS X; en-us) AppleWebKit/525.18.1 (KHTML, like Gecko) Version/3.1.1 Mobile/5H11 Safari/525.20)

Excellent - thanks for the confirmation & continued help :)
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.