Can you select an element with CSS that has a certain id and a certain class?
Something like this I suppose:
#id.class { color: blue; } Can you select an element with CSS that has a certain id and a certain class?
Something like this I suppose:
#id.class { color: blue; } Let's say you have a class people. Their background-color is white. But if you refer to special people like alice or bob, you can use IDs to make them look special.
.people { background-color: white; } .people#alice { text-transform: capitalize; } .people#bob { text-transform: uppercase; } What are your intentions? If you want to have a generic people class and special alice and bob you could also use:
CSS:
.people { background-color: white; } #alice { text-transform: capitalize; } #bob { text-transform: uppercase; } and HTML:
<div class="people" id="alice">Alice</div> <div class="people" id="bob">Bob</div> <people> elements.#id.class and .class#id select exactly the same element.