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 : 09
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 3)

Pseudo-classes and Pseudo-elements

Pseudo-classes and pseudo-elements are special "classes" and "elements" that are automatically recognized by CSS-supporting browsers. Pseudo-classes distinguish among different element types (e.g., visited links and active links represent two types of anchors). Pseudo-elements refer to sub-parts of elements, such as the first letter of a paragraph.

Rules with pseudo-classes or pseudo-elements take the form

	selector:pseudo-class { property: value }

or

	selector:pseudo-element { property: value }
	

Pseudo-classes and pseudo-elements should not be specified with HTML's CLASS attribute. Normal classes may be used with pseudo-classes and pseudo-elements as follows:

	selector.class:pseudo-class { property: value }

or

	selector.class:pseudo-element { property: value }	

Anchor Pseudo-classes
Pseudo-classes can be assigned to the A element to display links, visited links and active links differently. The anchor element can give the pseudo-classes link, visited or active. A visited link could be defined to render in a different color and even a different font size and style.

An interesting effect could be to have a currently selected (or "active") link display in a slightly larger font size with a different color. Then, when the page is re-selected the visited link could display in a smaller font size with a different color. The sample style sheet might look like this:

	A:link    { color: red }	
	A:active  { color: blue; font-size: 125% }
	A:visited { color: green; font-size: 85% }

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  |   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  |   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