CSS Selectors Revisited!
Tag:
a{text-decoration:none}
removes all underlines for anchors.
*{color:white}
sets the font color to white in ALL elements
ID:
#outercontainer { width:1020px}
sets the html object with id="outercontainer" to a width of 1020 pixels.
Class:
.box {width:120px;min-height:220px}
sets html obhjects with class="box to a width of 120 pixels and a MINIMUM height of 220 pixels (no max height so they can go as tall as the content needs).
Compound:
.linkbox a
would target all anchors inside an html object of class "linkbox."
a:hover
would target anchor tags when a user is hovering over that anchor.
#menu *
would target all elements/objects inside the element IDed as "menu"
Compound example expanded... Links!
This box is a class named linkbox. The school links are inside a normal paragraph, Newspaper links are inside li which are inside a url.
Corresponding css instructions in the stylesheet target:
.linkbox
and
.linkbox a
and
.linkbox ul a
and
.linkbox ul a:hover
Schools:
UCLA
USC
CSULB