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  |  Dallas Web Design  |  Art Web Templates  |  Cheap Flight Deals  |  Domain Name Hosting  |  Digital Camera  |  Coursework Writing  |  Reseller Hosting  |   Youth hostels  |  Web Design  |  Low Cost Domain Names  |  Burial Life Insurance  |  Website templates  |  Broadband Reseller  |  Dedicated Server  |  Business Broadband  |  Professionelt webdesign firma - webbureau  |  ATX Web Design - Texas TX  |  Flash Templates  |   tablet notebook  |  Flash Intros  |  Web Templates  |  Cheap Web Hosting  |  web hosting  |  Website Templates  |  Corporate Logo Design Service  |  UK Web Hosting  |  Website Hosting  |  Machinery moving Los Angeles  |   Free Web Hosting  |  UK Web Hosting  |  Dating Software - aeDating 4.1  |  Flash Templates  |  Website Templates  |  Power Saver  |  Website Design Quote  |  Flash templates  |  cctv cameras  |  website builder  |  Web Templates  |   Flash templates  |  Cheap Web Hosting Deal  |  Linux Hosting  |  Web Design uk  |  Web Hosting  |  Business web directory  |  Accept Credit Cards  |  Mobile Phone Contracts  |  Car Rental Deals  |  Free domain names  |  Business Email  |  Web Designer Delhi  |  

 
advertisment
advertisment
advertisment
advertisment
  Top-end templates
  Credit Cards
  Reseller web hosting UK
  free flash tutorials
  Web Hosting
  Hosting Directory
  Corporate Gifts
  Company Logos
  Christian Designs
  Website Templates
  Website Templates
  Web Hosting UK
  Free Web Templates
  Custom site design
  Domain Names
  Logo Design Pro UK
  Free Flash
  templatebox.com
  freewebtemplates.com
  templatesland.com
  topfreegraphics.com
  freegraphicland.com
  free-templates-layouts
  Ink & Toner Cartridges
  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