Flux rss
 

CSS - Style sheets

Introduction to style sheets

The concept of style sheets first appeared in 1996 when the W3C published a new recommendation entitled "Cascading Style Sheets", or CSS for short.

The principle behind style sheets involves using a single document to store the page layout characteristics associated with groups of elements. All it entails is defining by name a set of page layout definitions and characteristics, and invoking those names to apply them to a piece of text. For example, you can set your section titles to all show up in Arial font, coloured green, in italics.

Style sheets were developed in order to compensate for the shortcomings of HTML when it comes to page layout and design. HTML does have a number of tags for modifying layouts and defining text styles, but every element has its own style, independent of the surrounding elements. Using style sheets, whenever the look of a site containing hundreds of web pages needs to be changed, all that is required is to edit the style sheet definitions in one place to change the appearance of the entire site!

They are called "Cascading Style Sheets" because you can define multiple sheets, and the styles can all be applied to the pages (with a predefined system for resolving conflicts).

Style sheets can be used:

  • to achieve a uniform look throughout the site, by invoking a single style definition on every page;
  • to change one aspect throughout a website just by editing a few lines;
  • to make HTML code more readable, as styles are defined separately;
  • to let pages load more quickly, since there is less HTML on each page;
  • to position page elements in a more uniform manner.

CSS 2.0

Since 12 May 1998, the standard CSS 2.0 has been the standard in effect. CSS2 adds many new features to the preceding standard (1.0), including:

  • Consideration for how a document will be rendered by different media (such as a screen, a printer, braille, voice synthesisers, etc.);
  • Adding sound features for the blind and visually impaired;
  • Manipulating cursors;
  • Managing overflow and element visibility

Browser compatibility

Despite the W3C's recommendations, all browsers do not render style sheets the same way. The earliest browser to have integrated style sheets was Microsoft Internet Explorer 3.0, and the use of style sheets become more widespread with versions 4.0 and higher of Internet Explorer and Netscape Navigator.

Browsers which support style sheets:

  • Microsoft Internet Explorer 3.0 (partially)
  • Microsoft Internet Explorer 4.x
  • Microsoft Internet Explorer 5.x
  • Microsoft Internet Explorer 6.x
  • Netscape Navigator 4.x
  • Netscape Navigator 6.x
  • Netscape Navigator 7.x
  • Mozilla x.x
  • Firefox x.x
  • Opera 5.x
  • Opera 6.x
  • Opera 7.x
  • Camino 0.8x
  • Safari 1.xx

See also

The website ZenGarden shows the power of style sheets by allowing you to choose different styles to apply to the same content.

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.

Results for

Style sheets - Introduction The concept of style sheets first appeared in 1996 when the W3C published a new recommendation entitled "Cascading Style Sheets", or CSS for short. The principle behind style sheets involves using a single document to store the page layout... en.kioskea.net/css/cssintro.php3
CSS - 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 recommendations used by the... en.kioskea.net/css/cssimplant.php3
HTML 4.0 - Positioning elements Using style sheets along with the and tags, you can specify the location of text or images down to the pixel. This is possible with versions 4 and higher of Netscape and Internet Explorer; however, the technique is still problematic and... en.kioskea.net/css/cssposition.php3

Results for

Create CSS easilyCreate 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... en.kioskea.net/faq/sujet-593-create-css-easily
How to count number of words in MS Words sheet!How to count number of words in MS Words sheet! It is quite simple to count the number of words in a Microsoft word sheet. This tip might be very useful for example, if you wish to make a presentation on Microsoft word for an approximate number... en.kioskea.net/faq/sujet-354-how-to-count-number-of-words-in-ms-words-sheet
[Shell]Create a file having a specific sizeShell]Create a file having a specific size The dd command allows you to create "empty" file of desired size, creating these arbitrary heavy files, may be useful for testing purposes. Use command below: dd if=/dev/zero of=file_to... en.kioskea.net/faq/sujet-787-shell-create-a-file-having-a-specific-size

Results for

Compare cell a1 to entire A col in sheet2 (Solved)Hello, I have been trying to compare sheet1 A2 to sheet2 A2 through A500 and if it exists somewhere in sheet2's a col then copy that entire row to a new sheet. I have experimented with many bits of macro code from others but so far no real... en.kioskea.net/forum/affich-21245-compare-cell-a1-to-entire-a-col-in-sheet2
To prepare Attendence Report with Excel sheet (Solved)Hello, I will describe what I want to do . I have 60 residents working in our department. They attend morning report everyday. So I have prepared excel sheet( Named Attendance Table) which has column A1:A60 with names of residents B1:B60 with... en.kioskea.net/forum/affich-22740-to-prepare-attendence-report-with-excel-sheet
Copy data into next empty cell in new sheetHello, I am trying to make a 2 sheet workbook which has the input details in Sheet1 A1 and this is changed weekly but the info in this cell should then be inserted into the first blank cell in Column A in Sheet 2. I have tried this code (below) but it... en.kioskea.net/forum/affich-16567-copy-data-into-next-empty-cell-in-new-sheet

Results for

Download Vista Live Shell Pack - PinkIf you want to have Vista on your computer but your shape is not rather powerful or if simply you cannot have to be paid this version yet? Then resolution is to change the appearance of your good old XP. Vista Live Shell Pack is a topic of office... en.kioskea.net/telecharger/telecharger-771-vista-live-shell-pack-pink
Download Electric SheepElectric Sheep is a screen of wakefulness source open created by Scott Draves. He can be installed on any operating system Windows or Mac.During the alerting of your computer, the screen of wakefulness is displayed and the computer is connected to... en.kioskea.net/telecharger/telecharger-753-electric-sheep
Download ShellExViewShellEXView is a free tool used to install and manage shell extensions in Windows.Shell extensions enable users to view program specific menus when right clicking various file types.The ShellExView utility displays the details of shell extensions... en.kioskea.net/telecharger/telecharger-884-shellexview

Results for

CSS - 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. Style... en.kioskea.net/css/css-unites.php3
CSS - Style 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 specifying a selected tag (as with... en.kioskea.net/css/cssclass.php3
CSS - Style syntax Defining a style is done using simple text rules for describing the aspects of page elements. A CSS rule is characterised by two main elements: A type selector, for specifying which tags in the document the style applies to; A style declaration,... en.kioskea.net/css/csssyntax.php3