What to bear in mind in CSS/XHTML

no empty divs

Validate your codes on W3C.org

IDs can only be unique

instead of ids, use only classes and inheritance in your css codes

comments in your lines of codes

no styles scripts in your html pages

images to insert on web pages only if necessary

anti-aliasing of gif images for better image quality

clear:both in div

using text-indents in hyperlinks for
images and images background so that the div does not remain empty

list and list-style positions

use overflow:hidden instead of clear:both
see http://www.quirksmode.org/css/clearing.html

minimise the use of style sheets

avoid using different style sheets for different browsers; this might mean that you might not be using the right html codes and the right; avoids confusion; one of the best sorted out ways is to use conditionals in HTML to minimise the use of multiple style sheets,
i.e. <!–[if IE 6]><div id=”IE6″><![endif]–>

validate your css
use the following link http://jigsaw.w3.org/


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s