top_header.png

Projet en cours

andre_laurendeau.jpg

Fil RSS

Blogue

Syndication


snow by jsnowfall
css

Cascading Style Sheets, ou feuilles de style en cascade.
Les feuilles de style servent à donner une forme aux éléments des pages web, et des documents structurés en général (html, xml). Actuellement, avec les nouvelles normes XHTML, les CSS permettent de séparer le contenu de la forme, permettant ainsi une meilleure accessibilité aux sites puisque le langage html ou xhtml n’est plus utilisé que pour structurer le contenu, le style de présentation étant externalisée dans une feuille de style.

 

Browser support: IE: Internet Explorer, M: Mac IE only, F: Firefox, N: Netscape.

W3C: The number in the "W3C" column indicates in which CSS recommendation the property is defined (CSS1 or CSS2).

Background

PropertyDescriptionValuesIEFNW3C
backgroundA shorthand property for setting all background properties in one declarationbackground-color
background-image
background-repeat background-attachment background-position
4161
background-attachmentSets whether a background image is fixed or scrolls with the rest of the pagescroll
fixed
4161
background-colorSets the background color of an elementcolor-rgb
color-hex
color-name
transparent
4141
background-imageSets an image as the backgroundurl(URL)
none
4141
background-positionSets the starting position of a background imagetop left
top center
top right
center left
center center
center right
bottom left
bottom center
bottom right
x% y%
xpos ypos
4161
background-repeatSets if/how a background image will be repeatedrepeat
repeat-x
repeat-y
no-repeat
4141

Border

PropertyDescriptionValuesIEFNW3C
borderA shorthand property for setting all of the properties for the four borders in one declarationborder-width
border-style
border-color
4141
border-bottomA shorthand property for setting all of the properties for the bottom border in one declarationborder-bottom-width
border-style
border-color
4161
border-bottom-colorSets the color of the bottom borderborder-color4162
border-bottom-styleSets the style of the bottom borderborder-style4162
border-bottom-widthSets the width of the bottom borderthin
medium
thick
length
4141
border-colorSets the color of the four borders, can have from one to four colorscolor4161
border-leftA shorthand property for setting all of the properties for the left border in one declarationborder-left-width
border-style
border-color
4161
border-left-colorSets the color of the left borderborder-color4162
border-left-styleSets the style of the left borderborder-style4162
border-left-widthSets the width of the left borderthin
medium
thick
length
4141
border-rightA shorthand property for setting all of the properties for the right border in one declarationborder-right-width
border-style
border-color
4161
border-right-colorSets the color of the right borderborder-color4162
border-right-styleSets the style of the right borderborder-style4162
border-right-widthSets the width of the right borderthin
medium
thick
length
4141
border-styleSets the style of the four borders, can have from one to four stylesnone
hidden
dotted
dashed
solid
double
groove
ridge
inset
outset
4161
border-topA shorthand property for setting all of the properties for the top border in one declarationborder-top-width
border-style
border-color
4161
border-top-colorSets the color of the top borderborder-color4162
border-top-styleSets the style of the top borderborder-style4162
border-top-widthSets the width of the top borderthin
medium
thick
length
4141
border-widthA shorthand property for setting the width of the four borders in one declaration, can have from one to four valuesthin
medium
thick
length
4141

Classification

PropertyDescriptionValuesIEFNW3C
clearSets the sides of an element where other floating elements are not allowedleft
right
both
none
4141
cursorSpecifies the type of cursor to be displayedurl
auto
crosshair
default
pointer
move
e-resize
ne-resize
nw-resize
n-resize
se-resize
sw-resize
s-resize
w-resize
text
wait
help
4162
displaySets how/if an element is displayednone
inline
block
list-item
run-in
compact
marker
table
inline-table
table-row-group
table-header-group
table-footer-group
table-row
table-column-group
table-column
table-cell
table-caption
4141
floatSets where an image or a text will appear in another elementleft
right
none
4141
positionPlaces an element in a static, relative, absolute or fixed positionstatic
relative
absolute
fixed
4142
visibilitySets if an element should be visible or invisiblevisible
hidden
collapse
4162

Dimension

PropertyDescriptionValuesIEFNW3C
heightSets the height of an elementauto
length
%
4161
line-heightSets the distance between linesnormal
number
length
%
4141
max-heightSets the maximum height of an elementnone
length
%
-162
max-widthSets the maximum width of an elementnone
length
%
-162
min-heightSets the minimum height of an elementlength
%
-162
min-widthSets the minimum width of an elementlength
%
-162
widthSets the width of an elementauto
%
length
  
4141

Font

PropertyDescriptionValuesIEFNW3C
font
A shorthand property for setting all of the properties for a font in one declarationfont-style
font-variant
font-weight
font-size/line-height
font-family
caption
icon
menu
message-box
small-caption
status-bar
4141
font-family
A prioritized list of font family names and/or generic family names for an elementfamily-name
generic-family
3141
font-size
Sets the size of a fontxx-small
x-small
small
medium
large
x-large
xx-large
smaller
larger
length
%
3141
font-size-adjust Specifies an aspect value for an element that will preserve the x-height of the first-choice fontnone
number
---2
font-stretch Condenses or expands the current font-familynormal
wider
narrower
ultra-condensed
extra-condensed
condensed
semi-condensed
semi-expanded
expanded
extra-expanded
ultra-expanded
---2
font-style
Sets the style of the fontnormal
italic
oblique
4141
font-variant
Displays text in a small-caps font or a normal fontnormal
small-caps
4161
font-weight
Sets the weight of a fontnormal
bold
bolder
lighter
100
200
300
400
500
600
700
800
900
4141

Generated Content

PropertyDescriptionValuesIEFNW3C
content Generates content in a document. Used with the :before and :after pseudo-elementsstring
url
counter(name)
counter(name, list-style-type)
counters(name, string)
counters(name, string, list-style-type)
attr(X)
open-quote
close-quote
no-open-quote
no-close-quote
 162
counter-increment Sets how much the counter increments on each occurrence of a selector none
identifier number
   2
counter-reset Sets the value the counter is set to on each occurrence of a selectornone
identifier number
   2
quotes Sets the type of quotation marksnone
string string
-162

List and Marker

PropertyDescriptionValuesIEFNW3C
list-styleA shorthand property for setting all of the properties for a list in one declarationlist-style-type
list-style-position
list-style-image
4161
list-style-imageSets an image as the list-item markernone
url
4161
list-style-positionSets where the list-item marker is placed in the listinside
outside
4161
list-style-typeSets the type of the list-item markernone
disc
circle
square
decimal
decimal-leading-zero
lower-roman
upper-roman
lower-alpha
upper-alpha
lower-greek
lower-latin
upper-latin
hebrew
armenian
georgian
cjk-ideographic
hiragana
katakana
hiragana-iroha
katakana-iroha 
4141
marker-offset auto
length
 172

Margin

PropertyDescriptionValuesIEFNW3C
margin A shorthand property for setting the margin properties in one declarationmargin-top
margin-right
margin-bottom
margin-left
4141

margin-bottom

Sets the bottom margin of an elementauto
length
%
4141

margin-left

Sets the left margin of an elementauto
length
%
3141

margin-right

Sets the right margin of an elementauto
length
%
3141
margin-top Sets the top margin of an elementauto
length
%
3141

Outlines

PropertyDescriptionValuesIEFNW3C
outline A shorthand property for setting all the outline properties in one declarationoutline-color
outline-style
outline-width
-1.5-2
outline-color Sets the color of the outline around an elementcolor
invert
-1.5-2
outline-style Sets the style of the outline around an elementnone
dotted
dashed
solid
double
groove
ridge
inset
outset
-1.5-2
outline-width Sets the width of the outline around an elementthin
medium
thick
length
-1.5-2

Padding

PropertyDescriptionValuesIEFNW3C
paddingA shorthand property for setting all of  the padding properties in one declarationpadding-top
padding-right
padding-bottom
padding-left
4141

padding-bottom

Sets the bottom padding of an elementlength
%
4141

padding-left

Sets the left padding of an elementlength
%
4141

padding-right

Sets the right padding of an elementlength
%
4141
padding-topSets the top padding of an elementlength
%
4141

Positioning

PropertyDescriptionValuesIEFNW3C
bottomSets how far the bottom edge of an element is above/below the bottom edge of the parent elementauto
%
length
5162
clipSets the shape of an element. The element is clipped into this shape, and displayedshape
auto
4162
leftSets how far the left edge of an element is to the right/left of the left edge of the parent elementauto
%
length
4142
overflow
Sets what happens if the content of an element overflow its areavisible
hidden
scroll
auto
4162
positionPlaces an element in a static, relative, absolute or fixed positionstatic
relative
absolute
fixed
4142
rightSets how far the right edge of an element is to the left/right of the right edge of the parent elementauto
%
length
5162
topSets how far the top edge of an element is above/below the top edge of the parent elementauto
%
length
4142
vertical-alignSets the vertical alignment of an elementbaseline
sub
super
top
text-top
middle
bottom
text-bottom
length
%
4141
z-indexSets the stack order of an elementauto
number
4162

Table

PropertyDescriptionValuesIEFNW3C
border-collapseSets whether the table borders are collapsed into a single border or detached as in standard HTMLcollapse
separate
5172
border-spacingSets the distance that separates cell borders (only for the "separated borders" model)length length5M162
caption-sideSets the position of the table captiontop
bottom
left
right
5M162
empty-cellsSets whether or not to show empty cells in a table (only for the "separated borders" model) show
hide
5M162
table-layoutSets the algorithm used to display the table cells, rows, and columnsauto
fixed
5162

Text

PropertyDescriptionValuesIEFNW3C
colorSets the color of a textcolor3141
directionSets the text directionltr
rtl
6162
line-heightSets the distance between linesnormal
number
length
%
4141
letter-spacingIncrease or decrease the space between charactersnormal
length
4161
text-alignAligns the text in an elementleft
right
center
justify
4141
text-decorationAdds decoration to textnone
underline
overline
line-through
blink
4141
text-indentIndents the first line of text in an elementlength
%
4141
text-shadow none
color
length
    
text-transformControls the letters in an elementnone
capitalize
uppercase
lowercase
4141
unicode-bidi normal
embed
bidi-override
5  2
white-spaceSets how white space inside an element is handlednormal
pre
nowrap
5141
word-spacingIncrease or decrease the space between wordsnormal
length
6161

Pseudo-classes

Pseudo-classPurposeIEFNW3C
:activeAdds special style to an activated element4181
:focusAdds special style to an element while the element has focus-1.582
:hoverAdds special style to an element when you mouse over  it4171
:linkAdds special style to an unvisited link3141
:visitedAdds special style to a visited link3141
:first-childAdds special style to an element that is the first child of some other element-172
:langAllows the author to specify a language to use in a specified element-182

Pseudo-elements

Pseudo-elementPurposeIEFNW3C
:first-letterAdds special style to the first letter of a text5181
:first-lineAdds special style to the first line of a text5181
:beforeInserts some content before an element 1.582
:afterInserts some content after an element 1.582

 

*Le lexique est tiré du site W3 school online.

La conception web c'est notre affaire, La conception web c'est notre affaire, La conception web c'est notre affaire, La conception web c'est notre affaire, La conception web c'est notre affaire,