Selecting object, img and embed element in a certain ID

Discussion in 'CSS' started by papa_face, Oct 11, 2009.

  1. #1
    Hey,

    I have this code:
    
    #videobox-column1 img, embed, object
    	{
    	margin:10px 0 0 11px;	
    	}
    
    Code (markup):
    This code makes the style properties apply to all img, embed and object element on the web page.
    How do I make it specific so that they only apply to the img, embed, object elements in the videobox-column1 ID?
     
    papa_face, Oct 11, 2009 IP
  2. Dan Schulz

    Dan Schulz Peon

    Messages:
    6,032
    Likes Received:
    436
    Best Answers:
    0
    Trophy Points:
    0
    #2
    Add the ID to the style rules, like so:

    
    #videobox-column1 img, #videobox-column1 embed, #videobox-column1 object {
    	margin: 10px 0 0 11px;
    }
    
    Code (markup):
     
    Dan Schulz, Oct 11, 2009 IP
  3. papa_face

    papa_face Notable Member

    Messages:
    2,237
    Likes Received:
    67
    Best Answers:
    1
    Trophy Points:
    285
    #3
    Thanks :)
    That worked!
     
    papa_face, Oct 11, 2009 IP
  4. Dan Schulz

    Dan Schulz Peon

    Messages:
    6,032
    Likes Received:
    436
    Best Answers:
    0
    Trophy Points:
    0
    #4
    You're welcome.
     
    Dan Schulz, Oct 11, 2009 IP