Reputation:
How can I combine these two rules into one?
#body_splash{
width: 100%;
height: 100%;
display: none;
opacity: 0;
}
#body_main{
width: 100%;
height: 100%;
display: none;
opacity: 0;
}
I tried
#body_splash #body_main
and
#body_splash#body_main
but neither worked
Upvotes: 3
Views: 50
Reputation: 2168
This will also work:
div[id^='body_']
Assuming they both have the same tag, like div, this looks for all divs with an id that starts with "body_"
Upvotes: 0
Reputation: 2356
use commas to separate them :
#body_splash,
#body_main {
width: 100%;
height: 100%;
display: none;
opacity: 0;
}
Upvotes: 4
Reputation: 26444
Seperate multiple selectors with a comma
#body_splash, #body_main {
width: 100%;
height: 100%;
display: none;
opacity: 0;
}
Upvotes: 3