Web Standards: Conclusion

The best way to learn how to design with CSS is by looking at examples. Whenever you see a cool page, choose View Source and see if it's using CSS or tables for its layout. If it's using CSS, take a look at how it achieves its look. Keep an eye out for sites with CSS and XHTML badges on them. Download the html file and the css file and make changes. Rip it apart and figure out how it works. This is also a good way to learn new CSS properties, since I could not hope to cover all of them here.

Tips & Tricks

When laying out pages with CSS, it is useful to draw up a diagram of how you want the page to look first, either on paper or on the computer, so that you have something to work towards. Let's face it, typing pixel values into a stylesheet is not a very good environment to be creative in. The other advantage of having a diagram is that as soon as you get your CSS to look like the diagram, you know you're done (though you may have to make some tweaks to get it to work in other browsers). I encourage you to use Firefox or Safari while testing your pages, then go back and test them in IE later. This way you won't get confused about whether your CSS is wrong or IE is wrong.

Also, Macromedia Dreamweaver (available from software.brown.edu) can generate CSS and XHTML code for you. Although you will still need to do a lot of coding by hand, it can make the learning curve a lot shallower. It also has a nice code editor that will color-code your CSS and XHTML. To use its built in graphical CSS editor, go to the menu Text > CSS Styles.

For Mac users, Safari has a useful feature called the Activity Window. If you go to the menu Window > Activity, Safari will display for each page you have open a list of every image, stylesheet file, etc. that were accessed while loading the page. This makes downloading whole web pages easier.

Also, I did a page awhile ago for an gathering that takes place annually. At the time, I used a table-based layout for the page, and I've almost finished converting the layout to CSS. Here is a link to the table-based version, and a link to the CSS-based version (which is not quite complete). You are welcome to compare the source code of the two pages.

Questions? Comments? E-mail me: Owen_Strain@brown.edu.

Free Samples!

I am working on creating several CSS-based designs that you can use and modify to suit your (noncommercial) needs. See the copyright information at the bottom of this page for details.

Links

>>> Continue to Examples >>>