css element, id and class identification

Discussion in 'Web Design and Development' started by design-is, Jan 28, 2009.

  1. design-is macrumors 65816

    design-is

    Joined:
    Oct 17, 2007
    Location:
    London / U.K.
    #1
    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
     
  2. angelwatt Moderator emeritus

    angelwatt

    Joined:
    Aug 16, 2005
    Location:
    USA
    #2
    That looks right. It be applied to the following,

    HTML:
    <div id="header">
    ...
    <img class="home" src="..." alt="..." />
    ...
    </div>
     
  3. design-is thread starter macrumors 65816

    design-is

    Joined:
    Oct 17, 2007
    Location:
    London / U.K.
    #3
    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 :)
     

Share This Page