Latest News

16-July-2008
New design concept for vishwebdesign.com Well, yeah..I'm thinking of either modifying the existing template or create a new design for vishwebdesign. I'm short of ideas these days. I'm also thinking of mixing things up, using some new technologies, implementing mootools or yui maybe. I'll give it some time..
Vishal Beersye

CSS Articles at vishwebdesign Home for Vishal Beersye on web

Cascading Style Sheets (CSS) is the language used to style web pages, the texts, the images, for positioning elements. I'll just go quickly over the basics i guess you should know before reading my articles about css. We have two types of selectors:

  1. class; example of a class selector - .myclassred
  2. id; example of an id selector - #myidred

Classes, denoted by the dot before the classname, and ids are denoted by the '#' before the name.

Go through my articles section below to know more about xhtml and css designing.

Specificity of classes and ids

Note that classes can be multiple on a page but ids must not. IDs are unique, so even if you put multiple ids and find that your design looking ok, you should know that this is bad practice.

  • Multiple ids will lead you to a complicated design that you will have many problems to update.
  • It is bad practice, and when you try validating your page at W3C, you will see that your xhtml markup is invalid.

Lots of designers are not much concerned about the usability and validity of a page, using multiple ids on a page. Try keeping things simple. When you have attributes that you wish to assign to multiple elements, use classes, and for unique elements, use ids and inheritance.

Useful CSS & XHTML Articles and Links