Tutorials & Script Homepage
Style Sheets 7to13
Syntax: Part 1
Syntax: Part 2
Syntax: Part 3
Syntax: Part 4
Different Types of Style Sheets
CSS Shorthand
Style Inheritance
advertisment
advertisement
advertisement
Host With Us: HostingHelper.co.uk From Only $5.00p/m
Spotted an Error ? Let us Know
100's more FREE templates at FreeWebTemplates
Looking for a new Web Host ?
Free templates from TemplatesLand
Professional High-End Templates
TemplateBox.com more FREE templates
Free Flash Templates and Intros
advertisement
 
STYLE SHEETS NUMBER : 08
Please Click Here, and Help Keep This Site FREE to Use
 
Please click on our sponsors advert to the right if you download or use anything from this page.
Thank you for your help.

CSS Syntax (Part 2)

Basic Syntax: Contextual Selectors

Contextual selectors are merely strings of two or more simple selectors separated by white space. These selectors can be assigned normal properties and, due to the rules of cascading order, they will take precedence over simple selectors. For example, the contextual selector in

	P EM { background: yellow }

is P EM. This rule says that emphasized text within a paragraph should have a yellow background; emphasized text in a heading would be unaffected.

Properties
A property is assigned to a selector in order to manipulate its style. Examples of properties include color, margin, and font.

Values
The declaration value is an assignment that a property receives. For example, the property color could receive the value red.

Grouping
In order to decrease repetitious statements within style sheets, grouping of selectors and declarations is allowed. For example, all of the headings in a document could be given identical declarations through a grouping:

	H1, H2, H3, H4, H5, H6 { color: red; 
	                         font-family: sans-serif }

Inheritance
Virtually all selectors which are nested within selectors will inherit the property values assigned to the outer selector unless otherwise modified. For example, a color defined for the BODY will also be applied to text in a paragraph.

There are some cases where the inner selector does not inherit the surrounding selector's values, but these should stand out logically. For example, the margin-topproperty is not inherited; intuitively, a paragraph would not have the same top margin as the document body.

Comments
Comments are denoted within style sheets with the same conventions that are used in C programming. A sample CSS1 comment would be in the format:

	/* COMMENTS CANNOT BE NESTED */

CSS Syntax (Part 1) | CSS Syntax (Part 2) | CSS Syntax (Part 3) | CSS Syntax (Part 4)

Web Hosting  |  Membership website templates  |  Reliable UK Web Hosting  |  asp.net web hosting  |  Art Web Templates  |  Cheap Flight Deals  |  Free Web Hosting  |  UK Web Hosting Company  |  Coursework Writing  |  Reseller Hosting  |  tarot  |  Cheap UK Web Hosting  |  Fitness Blog  |   cell phones  |  Web Design  |  Low Cost Domain Names  |  ASP.NET Hosting  |  Website templates  |  cursos informatica  |  tienda informatica online  |  UK Link Directory  |  Austin Web Design  |  Flash Templates  |  Factory  |   Canada Web Hosting  |  Flash Intros  |  Web Templates  |  website designers  |  cheap web hosting  |  Resume templates  |  Corporate Logo Design Service  |  Bathroom Shower  |  website hosting rating  |  Website Templates  |  Bespoke Software Development  |  Domain Name Registration  |  Free Website Templates  |  web hosting services  |   Dedicated Server  |  UK Web Hosting  |  Dating Software - aeDating 4.1  |  Flash Templates  |  Website Templates  |  Power Saver  |  China Wholesale  |  Flash templates  |  cctv cameras  |  Web Hosting Companies  |  Lolita Dresse  |  china wholesale  |  Sharepoint Hosting  |  Canadian Web Hosting  |   Cheap Web Hosting Deal  |  Linux Hosting  |  Web Design uk  |  Web Hosting  |  Business web directory  |  Electronics  |  Free domain names  |  Best UK web Hosting  |  Shower Enclosures  |  

 
advertisment
advertisment
advertisment
advertisment
  Top-end templates
  Flash Templates
  Web Hosting UK
  Made-in-China.com
  Web Design Tips
  Link Bid Directory
  Web Hosting
  Web hosting reviews
  Website Design
  eCommerce Web Design
  Top web hosting
  Stock Photography
  Bildagentur
  Web Design
  Reseller Hosting
  SEO Services India
  Company Logos
  Website Templates
  Website Templates
  Web Hosting UK
  templatebox.com
  freewebtemplates.com
  templatesland.com
  topfreegraphics.com
  freegraphicland.com
  free-templates-layouts
  Logo Design Software
  Layouts4Free
  Webmaster Resoucres
  Web Templates Factory
  Free Web Templates
  Free Templates Catalog
  Web Templates
  Reseller Web Hosting
  Stock Photography
  Animations-galore.com
  4print.com.au
  Host Review
  Web Hosting Host Color
  Dedicated Servers
  FlashTemplateDesign
  ZeroDollarTemplates
  Killersites.com
  how-to-build-websites
  Build a free website
  web Hosting
  Business Logo Design
  Templates Favpage
  webmastermind.de
  flasheasy.com
  More Featured Sites