WDD : Implementation (CSS) Flashcards
Inline CSS
This is when the CSS command is inside a specific tag.
Internal CSS
This is when the CSS code is saved in the individual web page code.
This CSS can only be accessed by the web page.
Can make the coding FOR THIS PAGE ONLY more efficient.
External CSS
This is when the CSS code is saved in a separate file.
This CSS can be accessed by any web page
Can make coding FOR MANY WEB PAGES more effecient.
Makes ensuring conistency FOR MANY PAGES easier.
Control appearance and positioning:
display:block
an element uses the entire width of its container
Control appearance and positioning:
display:inline
an elemnt uses only as much width as necessary
Control appearance and positioning:
Display:none
an elemnt is not visible
Control appearance and positioning:
float: left
float: right
Displays the element to the left/right hand side of other elements
Control appearance and positioning:
clear:both
States that an element is not allowed to floar on the LEFT or RIGHT side.
Control appearance and positioning:
Margin
A transparent area around the outside of an element.
Margins can be declared as :
margin = Margin is declared on all 4 sides
margin-top = Margin is decalred on the top
margin-right = Margin is decalred on the right
margin-bottom = Margin is declared on the bottom
margin-left= Margin is declared on the left
These properties may have the values:
auto (calculated by the browser) is normally used to positiona an element in the middle of the browser’s window or within another element.
length (usually in pixels)
Control appearance and positioning:
Padding
A transperent area inside the edge of an element.
Paddings can be declared as: padding padding-top padding-right padding-bottom padding-left
These properties may have the value:
length (usually in pixels)
Control appearance and positioning:
Width and height
These allow for the size of an element to be defined
Measured as either
Percentage
Pixels
Centimetres
Creating Horizontal Navigational Bars
- Remove bullter points
nav li {list-style-type:none} - Positioning list items horizonataly
nav ul li {float:left} - Spacing out each item
nav ul li {float:left; width:100px; text-allign:center;} - Creating clickable boxes
nav ul li a {display:block} - Add colour to clickable boxes when hover
nav ul li a:hover {background-color:blue ;color:white}