user1702964 user1702964 - 1 month ago 20
CSS Question

Applying CSS styles to all elements inside a DIV

I would like to apply a CSS file to a concrete DIV in my page. This is the page structure:

<link rel="stylesheet" href="style.css" />
...
<body>
<div id="pagina-page" data-role="page">
...
<div id="applyCSS">
(all the elements here must follow a concrete CSS rules)
</div>
...
</body>


I tried to apply the rules of the CSS file editing it like this (the CSS file is so large):

#applyCSS * { (For all the elements inside "applyCSS" DIV:)
.ui-bar-a {
...
...
}
.ui-bar-a .ui-link-inherit {
...
}
...
}


But that solution doesn't work. So, how can I do that?

Answer

You could try:

#applyCSS .ui-bar-a {property:value}
#applyCSS .ui-bar-a .ui-link-inherit {property:value}

Etc, etc... Is that what you're looking for?

Comments