These are few tips that have helped me out in the transition from table-based web design to standards compliant css based layouts.


5 Css Tips
1) Read Thenoodleincident’s design rant.
This is the article that finally made it ‘click’ in my head about using css for layouts; it explains it clearly and in-depth on the thinking behind separating style from content.

2) Dont over-complicate layouts
Use larger images with more detail in as backgrounds and lay transparent divs over the top - this way gives you more room for browser incompatibilities and other quirks that you will learn to recognise and or avoid in future.

3) Dont go div mad!
You’re not recreating table layouts with divs; you dont need a different div for every single area - you can for example use other elements to get your desired effect. Ie You can position and style paragraphs and other page elements - it doesnt always have to be a div!

4) Semantics - how things should be done
This is something extremely important to the structure of your html, always use the correct html elements - if its a list of things, mark it up as a list - this includes your navigation.
If its pairs of things, use a definition list - remember dont worry what the default definition list looks like - you can style it how you want, you’d be surprised at the effects you can get.
Use your headers ( h1, h2 etc) correctly - dont just apply a bold style to normal text, mark it as a header and style that in your css.

5) Browser check as you go along.
Rather than creating your whole layout, then checking it and finding that its screwed in one or more browsers, which you then fix and breaks in something else. Create the header section, browser check it and fix anything thats wrong. Then create the nav, do the same. Create the body, do the same.
By breaking it down like this you dont have to wade through loads of code and styles to find the problem. Think Manageable chunks.

If you liked this Dig it!

del.icio.us:5 Tips for coding xhtml/css layouts digg:5 Tips for coding xhtml/css layouts spurl:5 Tips for coding xhtml/css layouts wists:5 Tips for coding xhtml/css layouts simpy:5 Tips for coding xhtml/css layouts newsvine:5 Tips for coding xhtml/css layouts blinklist:5 Tips for coding xhtml/css layouts furl:5 Tips for coding xhtml/css layouts reddit:5 Tips for coding xhtml/css layouts fark:5 Tips for coding xhtml/css layouts blogmarks:5 Tips for coding xhtml/css layouts Y!:5 Tips for coding xhtml/css layouts smarking:5 Tips for coding xhtml/css layouts magnolia:5 Tips for coding xhtml/css layouts segnalo:5 Tips for coding xhtml/css layouts gifttagging:5 Tips for coding xhtml/css layouts

9 Responses »

  1. please send the basic way to make my own website(send to my e-mail)ghetz23@yahoo.com

    thank’s!
    Gerry

  2. You’re joking right ?

  3. Good tips there, albeit i completely disregard the H1,h2 ect, but thats becasue i’m lazy :)

  4. very good tips.. congratz..

  5. I love the comment “don’t go div mad”. My team built a Web site a few months ago, and the original designers used a lot (but not excessive) of divs. When they handed it over, my less experienced designer decided that everything had to be a div, since she hadn’t really worked with them before. It took me about a month to explain that using <div class=”paragraph”> was not superior to using just a plain old <p>… Divs are good, but they aren’t everything.

  6. Hey whats up man. What if you have too much DIV tags in your layout what will happen?

  7. Hi Sam! Photos i send on e-mail.
    Green

  8. Hi My Name Is ivager.

  9. hi i’m asking also whats up man. What if you have too much DIV tags in your layout what will happen?

Ad-Links

Translate