Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to combine multiple selects?

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


2 Answers

use commas to separate them :

#body_splash,
#body_main {
  width: 100%;
  height: 100%;
  display: none;
  opacity: 0;
}
like image 142
Mushr00m Avatar answered Dec 16 '25 12:12

Mushr00m


Seperate multiple selectors with a comma

#body_splash, #body_main {
  width: 100%;
  height: 100%;
  display: none;
  opacity: 0;
}
like image 40
Richard Hamilton Avatar answered Dec 16 '25 14:12

Richard Hamilton



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!