Web Design 3 Flashcards
internal stylesheet code
Defined inside the element, inside the < section of an HTML page
id #
firstname { background-color: yellow; }
class .
.intro { background-color: yellow; }
contextual selectors
example footer H1
ID #
Used 1 time per page
Class .
Used multiple times per page
a:link
Unvisited link
a:visited
Visited link
a:active
Selected Link
a:hover
Selects links on mouse over
Layout
The position property specifies the type of positioning method used for an element (relative, fixed, or absolute)
width, height, auto
To format the page
float
Positioning on the page
absolute positioning
The element is positioned realtive to its first positioned (not static) ancestor element
relative positioning
The element is positioned relative to its normal position, so “left:20px” adds 20 pixels to the element’s LEFT position