Alyka Perth
Call Alyka Perth Web Today - 92004429
HomeProfileServicesPortfolioTestimonialsWeb TipsContact Us

Tips all webmasters should know for effective Cascading Style Sheets (CSS) development.

 

Tips to Improve your Cascading Style Sheets (CSS)

 

Tip 1: Keep it simple

Keep your code simple. Webmasters who go to great lengths to create some fancy design, usually end up irritating the end user. Work through your code logically and systematically. Try to work your code from the top down, starting with the header, menu, main content and footers. Simple coding will also make it easier for you and others to change or update the coding in the future.

Tip 2: Carefully code your margins and paddings

Every browser presents margins and paddings differently. For example, the same margin code may look different on Internet Explorer than it does on Mozilla Firefox. As a result, ensure that you control the padding and margins on all the elements that you use.

Tip 3: Avoid divitus

Divitus refers to websites that have too many divs and not enough semantic html. Semantic html means using the correct html code for the job and not just using divs for everything. Be sure to use the h1, h2, p1, etc codes.

Tip 4: Avoid classitus

Classitus refers to the overuse of classes or ID codes. The following is an example of this type of overuse:

CSS

a.button{color:blue;text-decoration:none)

HTML

<ul>
<li><a class="button" href="about us">Page1</a></li>
<li><a class=”button" href="products">Page2</a></li>
<li><a class="button" href="contact us">Page3</a></li>

A better and more efficient way of coding the above is shown below. By applying an ID, you can style each anchor without having to use individual class codes.

CSS

#nav a {color:blue;text-decoration:none}

HTML

<ul id="nav">
<li><a href="about us">Page1</a></li>
<li><a href="products">Page2</a></li>
<li><a href="contact us">Page3</a></li>

Tip 5: Validate Your Code

Use the validator (http://jigsaw.w3.org/css-validator) to validate your CSS at every opportunity. If you are fairly new to CSS, try to use the validator as frequently as possible to ensure that you get your code right.

 



Alyka Web Design Home  |   About Alyka Web Designing Perth  |   Web Development Services Perth  |   Content Management System Perth
Search Engine Optimisation Perth  |   Strategic Web Consultation Perth  |   Alyka Web Design work and clients  |   Contact Alyka Web Designers

#
home  |  profile  |  services  |  portfolio  |  testimonials  |  web tips  |  contact us  |  sitemap  |  privacy

Copyright � 2006 - 2010, Alyka Pty Ltd. Professional Perth Web Designers

#
Microsoft Silverlight Application and Silverlight Website online .NET 3.5, dot net 3.5, ASP, C#, C sharp programming
why dot NET v3.5 and silverlight?