Saturday, February 11, 2006

Lesson 6: Learning Cascading Style Sheets (CSS)

Cascading Style Sheets (CSS) allow you to separate the website content (in HTML) from the presentation. CSS seems like a great idea but is not without significant problems for someone getting started. One of the biggest problems is that each browser handles CSS slightly differently. So, when you think you have everything looking perfect in Firefox, you really need to check it works well on Internet Explorer and the other popular browsers.

I began to get to grips with CSS from certain enthusiast's websites. Luckily, several of them got together and wrote an excellent book, which I would recommend buying, called Cascading Style Sheets: Separating Content from Presentation. These guys also have useful sites devoted to CSS which may be of interest (but can also drive you crazy), a couple of them are www.glish.com, and www.thenoodleincident.com/.

One of the big things with CSS is called, 'the box model' which involves using CSS boxes instead of HTML tables to provide the layout for your website. The RNIB famously did not use CSS in favour of html table layout for their site redesign. This outraged the CSS community and they set out to show how CSS was up to the job. You can follow what happened from the RNIB link and a bit of surfing. Strangely, despite their best efforts, the RNIB's layout won out as a more robust accessible design. An unhelpful result for CSS. So, CSS is in need of continual improvement but the idea of separating content from presentation in this seems to be the future, we just need to get better at it!

1 comment:

Anonymous said...

Here's another website I found that demonstrates the power of CSS with hundreds of beautiful designs. It also explains many of the good things about CSS, even though sometimes it may not be the best option.
http://www.csszengarden.com