nadavvin Posted December 25, 2006 Share Posted December 25, 2006 HelloI want to set margine to all the content of one tag.How do I do it without mention all the posibble tags?like:#myclass div {margin-left:5px;}Thanks for your help.Nadav. Link to comment Share on other sites More sharing options...
Err Posted December 25, 2006 Share Posted December 25, 2006 <style type="text/css">div { margin-left: 10px;}div div { margin-left: 5px;}div div div { margin-left: 0px;}</style> Link to comment Share on other sites More sharing options...
boen_robot Posted December 25, 2006 Share Posted December 25, 2006 There's the universal selector, a.k.a. the start selector. Like this: #myclass * {margin-left:5px;} This will apply the style to all childs (descendants) of #myclass, no matter what element are we talking about. divs, ps, spans, you name it. Link to comment Share on other sites More sharing options...
nadavvin Posted December 26, 2006 Author Share Posted December 26, 2006 thanks Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now