Jump to content

How do I set margin to all the child tags?


Recommended Posts

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

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 account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Create New...