What Is a Mixed Selector

Q

What Is a Mixed Selector? - CSS Tutorials - Introduction To CSS Basics

✍: FYIcenter.com

A

A mixed selector is a selector that uses a combination of all other selectors. The following CSS shows some good examples:

/* selects <p class="quote"> tags */
P.quote {font-style: italic}

/* selects <p class="quote" id="onSale"> tags */
P.quote#onSale {color: red}

/* selects <p class=quote id=onSale> tags inside <table> */
TABLE P.quote#onSale {background-color: red}

/* selects <pre class=quote id=onSale> tags inside <table>
  and <pre id="onSale"> tags */
TABLE P.quote#onSale, PRE#onSale {background-color: red}

2007-05-11, 4661👍, 0💬