# Using all 3 CSS selectors at once

**URL:** <https://forum.kirupa.com/t/using-all-3-css-selectors-at-once/304486>\
**Category:** web dev\
**Created:** [February 8, 2010, 8:34pm UTC](https://forum.kirupa.com/t/using-all-3-css-selectors-at-once/304486 "2010-02-08T20:34:46Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![NeoDreamer](https://avatars.discourse-cdn.com/v4/letter/n/ccd318/32.png) [@NeoDreamer](https://forum.kirupa.com/u/NeoDreamer)\
**Post date:** [February 8, 2010, 8:34pm UTC](https://forum.kirupa.com/t/using-all-3-css-selectors-at-once/304486/1 "2010-02-08T20:34:46Z")

</div>

It seems like I can’t trigger the hover state when my CSS is too complicated. What is the correct way to write all 3 CSS selectors in one definition?

```auto

/* works */
#id.class {
   opacity: 0.5;
}

/* doesn't work */
#id.class:hover {
   opacity: 1.0;
}

```
