background preloader

CSS

Facebook Twitter

Background. The background of your website is very important, so please spend some time with this tutorial. If you are aiming for a professional website, a good rule of thumb is to use a light background with dark text. However, if you're just making a website for pleasure, then any kind of color combination is acceptable. With CSS, you are able to set the background color or image of any CSS element.

In addition, you have control over how the background image is displayed. You may choose to have it repeat horizontally, vertically, or in neither direction. You may also choose to have the background remain in a fixed position, or have it scroll as it does normally. As you have seen throughout Tizag Tutorials, many different background colors are present. CSS Code: Display: This is a <h4>with a white background This is a <p> with a background using the hexadecimal value of #1078E1 This is an unordered list with an RGB value of 149, 206, 145 Let's begin with a default CSS background image.

Necessary Image: CSS background-repeat property. Multiple Class / ID and Class Selectors. Les sélecteurs. 5.1 La reconnaissance d'un motif En CSS, des règles de reconnaissance de motifs déterminent les règles de style qui s'appliquent aux éléments de l'arbre du document. Ces motifs, nommés sélecteurs, sont variés, allant du simple nom d'un élément jusqu'aux riches motifs contextuels. Quand toutes les conditions d'un motif sont vérifiées pour un élément donné, celui-ci est retenu par le sélecteur. Dans un sélecteur, la sensibilité à la casse d'un nom d'élément du document dépend du langage utilisé pour le document.

Par exemple, ceux-ci sont insensibles à la casse en HTML, par contre, ils le sont en XML. Cette table résume la syntaxe du sélecteur de CSS2 : 5.2 La syntaxe des sélecteurs Un sélecteur simple est soit un sélecteur de type, soit un sélecteur universel immédiatement suivi par un sélecteur d'attribut, un sélecteur d'ID ou une pseudo-classes, zéro ou plusieurs de ceux-ci, dans n'importe quel ordre.

Sélecteur combinateurs sont : les caractères blancs et les caractères ">" et "+". Sujets [att] Step by step CSS float tutorial. Floatutorial takes you through the basics of floating elements such as images, drop caps, next and back buttons, image galleries, inline lists and multi-column layouts. General info Tutorial 1. Floating an image to the right Float an image to the right of a block of text and apply a border to the image.

Tutorial 2. Floating an image and caption Float an image and caption to the right of a block of text and apply borders using Descendant Selectors. Tutorial 3. Float a series of images down the right side of the page, with content flowing beside them. Tutorial 4. Float a series of thumbnail images and captions to achieve an image gallery. Tutorial 5. Float a simple list into rollover "back" and next "buttons". Tutorial 6. Float a simple list, converting it into a horizontal navigation bar. Tutorial 7. Float a scaleable drop cap to the left, resize it and adjust line-heights to suit your needs.

Tutorial 8. Float a left nav to achieve a two column layout with header and footer. Tutorial 9.