IES: CSS-deck 14 Flashcards
border-collapse
: collapse- how different, collapsed borders should appear (visibility eval)
visibility eval: border-style value -“hidden” takes precedence
border-collapse
: collapse- how different, collapsed borders should appear (width eval)
- the greater width of two visible borders takes precedence
- Ex. two borders to collapse: one is 5 px wide, the other is 10 px wide. The 10 px border takes precedence.
border-collapse
: collapse- how different, collapsed borders should appear (style eval)
- Style eval: two visible borders of equal width - the border style of greater value takes precedence
- (border styles set in descending value order)
1. double
2. solid
3. dashed
4. dotted
5. ridge
6. outset
7. groove
8. inset
border-collapse
: collapse- how different, collapsed borders should appear (color eval)
- color eval: two visible borders of equal width and identical style- the border color of greater value takes precedence
- (value is determined in the descending status order)
1. cell
2. row
3. row group
4. column
5. column group
6. table
display
- Can accept a range of values to specify that a selected element should be treated as a table component
- (values in this range emulate the default behavior of HTML tags a browser automatically applies to table components)
- (CSS
display
value, HTML tag equivalent)
1. table,<table>
2. table-row,<tr>
3. table-header-group,<thead>
4. table-row-group,<tbody>
5. Table-footer-group,<tfoot>
6. table-column,<col>
7. table-column-group,<colgroup>
8. table-cell,<th>
or<td>
9. table-caption,<caption>
- (these values can be used to specify table features to an XML doc -browser will display as if an HTML table)
marker
- indicates the beginning of an item in a list
- typically a bullet in an
<ul>
unordered list - typically an incrementing number in an ordered list
<ol>
- (browser conducts an item count in each case, but it is usually only used with an ordered list)
list-style-type
- list? property
- Can specify an alternative type of marker for any list
- Keywords:
1. disc
2. circle
3. square - (both number and alphabetical markers display incrementing item count)
- (number marker types)
1. lower-roman
2. upper-roman
3. decimal
4. decimal-leading-zero - (alphabetical marker types)
1. lower-latin
2. upper-latin
3. lower-greek
4. armenian
5. georgian - Miscellaneous
1. none
list-style-image
- an image may be specified as a marker by stating its path in the parentheses of the url value
- Ex.
{list-style-image: url(tick.png) disc;}
- (the disc, according to this example, is specified as the alternative marker if and when the designated image is not available)
marker typical formatting
- browser creates block-level content box for the entire list
- creates inline content boxes for each list item
- automatic left margin insets list item content boxes
- Marker appears on the right edge of this margin area but outside the list item content boxes
list-style-position
- keywords:
1. “inside”
2. “outside” - (determines where markers should appear relative to the list item content boxes)
CSS shorthand: markers
- rather than separate styles for the list-style-type, list- style-image, and list-style-position
- specify a value for each as a space-separated list to the
list - style
property - (the values may appear in any order)
- (where any value is omitted, the default value will be assumed)
nested lists: list-style
- keywords/values:
1. “inherit”
2. “none” - “inherit”: specifies the nested list(s) should adopt the
list-style
of the containing element - “none”: suppresses the nested list(s) from adopting the
list-style
of the containing element - (lists of either type may be nested with their marker position and type specified independently)
A navigation bar
- a list of hyperlinks
- particular CSS style rules applied to an HTML list
- markers are removed (the
list-style-type
is specified as “none”) - browsers defaults margins and paddings are removed
- list hyperlinks styled with
display: block;
-
text-decoration: none;
- removes default underlines
Hyperlinks can indicate status by:
- adding a class for styling - to indicate the current location on the website
- adding a
:hover
pseudo-class after the selector
vertical nav bars: typically
- specify a fixed width value for the list
horizontal nav bars:
- can float the list items
- can hide the overflow to maintain visibility of the bar
pseudo-classes
- used to indicate the state of a hyperlink
1. a:link (default)
2. a:visited
3. a:hover
4. a:active
dropdown box:
- a content box that is hidden
- when the user places the cursor over an active element, the content box becomes unhidden
- at this point, the box appears to offer further information, a larger image (when cursor is over a thumbnail), or a list of clickable options
- creation:
1. active element styled withposition: relative;
2. drop-down box positioned directly beneath the active element withposition; absolute;
3. Dropdown box should have z-index value specified to place it above any existing page content
4. include a universalbox-sizing: border-box;
box-sizing: border-box;
- a universal rule
- allows padding and border to be included within the total width and height of the active element and of the drop-down box
- The default value is “content-box” (the content area is the width and height that are applied)
- if the element is specified as 100px x 100px, the content box is 100px by 100px (With the padding and border, the element will be wider and higher than 100px)
dropdown content transparency:
- to specify a background value for the drop-down content is important
- by default, the drop-down is transparent: the background value prevents the underlying, visible content to interfere with the drop-down content