nkaisare
10-26-2003, 02:33 PM
This is for those people who wish to use CSS-based design but are finding goings tough due to the learning curve associated with it. Here are some tips on how to get your CSS working.
1. VALIDATE your HTML and CSS:
http://validator.w3.org/
http://jigsaw.w3.org/css-validator/
Most of the times, errors get sorted out just by doing this.
2. Remove all the other styles. The problem is not with font-family and font-style. Keeping 1KB of that stuff is only going to make your job of sifting through style sheets more difficult.
3. Use background colors for the various divs you are trying to position/float. This will make it clear to you where the divs are, and how much space (width/height) they occupy.
4. Test in a good browser. Mozilla or firebird is highly recommended. Download it from one of the links provided in the left-hand bar at http://www.mozilla.org/. I personally use Opera 7.21 (http://www.opera.com/). But don't use IE because its an old browser.
5. Try to use bare-bones content. Focus on whats wrong with the way the site displays. If #left and #middle overlap, focus on them... forget that #right exists for the time being. Sort out issues one at a time.
6. ALWAYS BACK UP YOUR WORK AS YOU GO ALONG. So that if you go too far away and can't get back to the place you started, you can start over with one of your backed-up copies.
Remember:
Things that were easy with tables may not be equally easy with CSS.
Things that were impossible or too difficult with tables may be straightforward.
Think outside the box. View your page consisting of several divisions... almost like cutouts on the paper... you can then glue these individual cutouts on a canvas. You couldn't think in this manner with tables... but with CSS you can!!
The following link might be useful in debugging:
http://css-discuss.incutio.com/?page=DiagnosticCss
Moderators, can you make this post sticky?
1. VALIDATE your HTML and CSS:
http://validator.w3.org/
http://jigsaw.w3.org/css-validator/
Most of the times, errors get sorted out just by doing this.
2. Remove all the other styles. The problem is not with font-family and font-style. Keeping 1KB of that stuff is only going to make your job of sifting through style sheets more difficult.
3. Use background colors for the various divs you are trying to position/float. This will make it clear to you where the divs are, and how much space (width/height) they occupy.
4. Test in a good browser. Mozilla or firebird is highly recommended. Download it from one of the links provided in the left-hand bar at http://www.mozilla.org/. I personally use Opera 7.21 (http://www.opera.com/). But don't use IE because its an old browser.
5. Try to use bare-bones content. Focus on whats wrong with the way the site displays. If #left and #middle overlap, focus on them... forget that #right exists for the time being. Sort out issues one at a time.
6. ALWAYS BACK UP YOUR WORK AS YOU GO ALONG. So that if you go too far away and can't get back to the place you started, you can start over with one of your backed-up copies.
Remember:
Things that were easy with tables may not be equally easy with CSS.
Things that were impossible or too difficult with tables may be straightforward.
Think outside the box. View your page consisting of several divisions... almost like cutouts on the paper... you can then glue these individual cutouts on a canvas. You couldn't think in this manner with tables... but with CSS you can!!
The following link might be useful in debugging:
http://css-discuss.incutio.com/?page=DiagnosticCss
Moderators, can you make this post sticky?