Marty Andrews

artful code

Monday, February 2, 2004

My CSS adventure

I spent some time on the weekend learning about cascading style sheets and applying my new skills to my own website. The look is not that different, but lots of stuff has changed.The most dramatic change on the site was the banner and navigation. My original version had about 75 lines of HTML code. This included a couple of tables with lots of rows, background colour manipulation and some text style changes as well. Yhe new version is about 15 lines of HTML code with no tables, colours or style definition (everything is now in the stylesheet). Check out the listamatic for some other ideas on navigation menus with CSS.Coming second in terms of major change was the menu items on the right-hand side of the blog. They use to all be tables as well, but now each section is just text wrapped in a div tag to get the effect.The rest of the stuff was mainly making sure I was using "natural" HTML code (ie. paragraphs and headings etc). Then styles were just declared for those elements.I like the result. It seems visually more structured to me with much less code. I changed the whole site (except the wiki) in about a day, and it seems much more maintainable to me too.

No comments:

Post a Comment