I fogli di stile As folhas de estilo Stylesheets Les feuilles de style CSS: Hojas de estilo

Font properties

Property Value Description
font-family Specific font (Arial, Times, Verdana)
Familly (serif, sans-serif, fantasy, monospace, cursive)
Defines one or more font names or font families. If multiple fonts are defined, the first one found on the user's system will be used.
font-style normal, italic, oblique Defines the writing style
font-weight lighter, normal, bold or bolder.
numeric value (100, 200, 300, 400, 500, 600, 700, 800, 900)
Defines the thickness of the font
font-size xx-small, x-small, small, medium, large, x-large, xx-large
size in points (pt), cm, %
Defines the font size
font-variant normal, small-caps Defines a variant (small capitals)
font font: Verdana, Arial, bold italic 8px; Shortcut for all properties

Text and paragraphs

Property Value Description
color "#RRGGBB" Defines the text colour
line-height line-height: 12pt; Defines line spacing
text-align left, center, right or justify Defines text alignment
text-indent text-indent: 5px; Defines indentation
text-decoration blink (blinking), underline (underlined), line-through (strikethrough), overline (overlined) or none (no decoration) Defines decoration
text-shadow text-shadow: 1px 2px 4px black; Defines a drop shadow for the text, representing, respectively, the shadow's right-shift, down-shift, blur radius, and colour.
text-transform uppercase, lowercase, or capitalize Defines the case of the text
white-space normal (text will wrap to the next line), pre (text appears with whatever blank spaces were entered), nowrap (text will not wrap) Hyphenation
word-spacing word-spacing: 6px; Defines how much space to put between words
width in points (pt), inches (in), in cm, on pixels (px), or as a % Defines the width of a text element or image
height in points (pt), inches (in), in cm, on pixels (px), or as a % Defines the height of a text element or image

Background colours

Property Value Description
background-color "#RRGGBB" Defines a background colour
background-image url(http://url) Defines a background image
background-repeat repeat, repeat-x, repeat-y, no-repeat Defines how the background image repeats
background-attachment scroll, fixed Specifies if the background image will stay in place when the screen scrolls
background-position top, middle, bottom, left, center or right Positions the image relative to the upper-left corner
background background: url(test.jpg) fixed repeat; Shortcut for background properties

Margins

Property Example Description
margin-top margin-top: 5px; Value of top margin
margin-right margin-right: 0.5em; Value of right margin
margin-bottom margin-bottom: 2pt; Value of bottom margin
margin-left margin-left: 0; Value of left margin
margin margin: 5px 0.5em 2pt 0; Shortcut for margin properties

Borders

Property Value Description
border[-top -left -bottom -right]-width in points (pt), inches (in), in cm, on pixels (px), or as a % Border thickness [for the location given]
border[-top -left -bottom -right]-color border-left-color: #RRGGBB; Border colour [for the location given]
border[-top -left -bottom -right]-style solid, dashed, dotted, double or ridge Border style [for the location given]
border-collapse collapse
separate
Adds or removes "3D" effect
Border border: 1px 0 0 2px dotted green; Global shortcut for border properties

Padding

Property Value Description
padding-top padding-top: 3px; Padding between the element and the top border
padding-right padding-right: 0.25em; Padding between the element and the right border
padding-bottom padding-bottom: 0; Padding between the element and the bottom border
padding-left padding-left: 2pt; Padding between the element and the left border
padding padding: 3px 0.25em 0 2pt; Shortcut for all padding properties

Tables

Property Value Description
border-collapse separate or collapse Merges cell borders (collapse), doesn't merge them (separate)
border-spacing border-spacing: 4px; Cell spacing
caption-side top, bottom, left or right Placing the table's caption
empty-cells show or collapse Display (show) or hide (collapse) empty cells
table-layout fixed (independent of cell content) or auto (depending on cell content) Fixed or variable width
speak-headers always (always before each cell) or once (just once) Property for the blind and visually impaired, indicating how sound behaves when reading table header cells

Lists

Property Value Description
list-style-type decimal, upper-roman, lower-latin, disc, circle, square or none Type of bullets and numbering
list-style-image list-style-image: url(image.png); Personalise bullets with an image
list-style-position inside or outside Specifies bullet indentation
list-style   Shortcut to list properties

Page layout

Property Value Description
@page @page(size: portrait) Defines print layout
size auto, landscape or portrait Printing format
margin-top margin-top: 3 cm; Top margin
margin-right margin-right: 1.5 cm; Right margin
margin-bottom margin-bottom: 1 cm; Bottom margin
margin-left margin-left: 2 cm; Left margin
marks crop (crop marks), cross (cross marks), none (no marks) Crop marks and cross marks
page-break-before Always, avoid Forces a page break before an element
page-break-after Always, avoid Forces a page break after an element
orphans orphans: 2; Avoids having orphaned lines at the end of a page. Defines the minimum number of lines of an element that are left at the bottom of a page before a page break.
widows widows: 1; Avoids having widowed lines at the end of a page. Defines the minimum number of lines of an element that are left at the top of a page after a page break.


Last update on Thursday October 16, 2008 02:43:13 PM.This document entitled « CSS - Style sheets » from Kioskea (en.kioskea.net) is made available under the Creative Commons license. You can copy, modify copies of this page, under the conditions stipulated by the licence, as this note appears clearly.
Best answers for « CSS Style sheets » in :
Declaring a style sheet (CSS) Show Declaring a style sheet Style sheets are not directly integrated into the W3C's HTML recommendations. For this reason, you need to include elements in the HTML code indicating both the type of document, meaning the version of the HTML and CSS...
CSS - Style sheets Show Font properties Property Value Description font-family Specific font (Arial, Times, Verdana) Familly (serif, sans-serif, fantasy, monospace, cursive) Defines one or more font names or font families. If multiple fonts are defined,...
Units in style sheets (CSS) Show Units With style sheets, you can use numeric values to set style properties in multiple ways: absolutely, meaning in units which are independent of the form of output (such as in centimetres); relatively, meaning in units relative to an element....
Remove the underline under the links in HTML/CSS ShowRemove the underline under the links in HTML/CSS Using CSS Using CSS via a class Using CSS online AS you may have noticed, hyperlinks are underlined in HTML (by default) It is possible to remove the underline by using the CSS Using...
Create CSS easily ShowCreate CSS easily Easy links CSS is a short term for Cascading Style Sheets. CSS is used to alter the display of the HTML coded environment. For example, using CSS can change the appearance of your scroll bar, the color, headings...
Filtering Apache logs / conditional Logging ShowFiltering Apache logs / conditional Logging Log-ins used by Apache Web server is usually very wordy, they contain all type of information (image files, style sheets, javascript, son RSS, etc.) This can be very troublesome when trying to...
Download Amaya ShowAmaya is a Web editor, developed collectively by the INRIA and the W3C, to edit and publish very simply pages containing text (in HTML or XHTML), graph (in SVG) and mathematical expressions (in MathML), the whole with style sheets CSS. Amaya is a...
Download Xenu's Link Sleuth ShowXenu's Link Sleuth is a software for checking broken links to a website. Advantage The check is performed on classic links, images, frames (frames), the Plugin, wallpapers, style sheets, applets and scripts (Javascript). It displays the...
Download SSH Secure Shell ShowSSH secure shell for workstations is a flexible client SSH allowing to connect in a secured way to remote applications. http://www.commentcamarche.net/faq/images/NHc6wz5jOYBhPXTis.png
Units in style sheets (CSS) ShowBlock elements DIV tags define blocks of elements This is a structure created to define boxes such as menus or windows. CSS offers several properties for specifying the characteristics of margins. With a good working knowledge of these properties,...
Style classes (CSS) ShowClasses and IDs Classes A web designer might want to assign different styles to the same tags. For this reason, the CSS specifications introduced the concept of classes. The definition of classes is as simple as that of styles. It involves...