1 Flashcards
What attributes does need for a CSS stylesheet?
type=”text/css”;
rel=”stylesheet”;
href=”stylesheet.css”
What tag is used in table header cells?
What is CSS syntax for a given element?
selector {
property: value;
}
What are the options for font-size?
[and a common standard]
px - pixel; pt - point (1/72 inch); em (1=base size); %(100= base size)
[set body with %, use em throughout rest]
Syntax for trying multiple fonts in CSS
[backup fonts in CSS]
font-family: font1, font2, font3;
[sans-serif, serif, cursive]
How do you style nested HTML elements in CSS?
[syntax for direct children]
<div> <div> <p> blah </p> </div> </div>
is:
div div p { property: value; }
[div > p { property: value; }
what do the id and class selectors look like?
id: #id_name { }
class: .class_name { }
CSS syntax for psuedo selectors?
selector:psuedo_class_selector {
propert: value;
}
four possible values for the display property
block; inline-block; inline; none
[full width; inline full width that can share; only takes as much room as it needs; disappears from page]
what elements are the inline display value better suited for
those that are blocks by default: headers and paragraphs, eg
what are the layers in the box model
margin
border
padding
content
syntax for defining, say, margins all at once
margin: 1px 2px 3px 4px [clockwise from top]
what does clear do
moves an element below any floating elements
{clear :both/left/right}
position values
static [default]; relative [starting point is where it normally would fall in flow]; inherit []; fixed [stays in same place on page]; absolute [goes to the origin of first non-static ancestor element (or html by default)]
Syntax: nth-child psuedo-selector
element:nth-child(4) {
}