Simon Willison’s Weblog

Subscribe

155 items tagged “css”

2003

Safari conditional comments

The current extended discussion over whether or not Safari should have some kind of specific CSS blocking technique built in (sparked off by Mark Pilgrim) reminds me of a relatively unpublicised feature of Internet Explorer called conditional comments. These specially crafted HTML comments allow web authors to specifically hide code from versions of IE, or alternatively to hide code from any browsers that are not a specified version of IE. Here’s how they work:

[... 198 words]

2002

Blockquote citations

Inspired by Adrian Holovaty, I spent an hour this morning getting dirty with the DOM in an effort to replicate his funky CSS blockquote citations effect but with links that you can actually click on. The resulting code is now active on this weblog—check the javascript out here.

[... 86 words]

Girlfriend as a case study

I’ve been helping my girlfriend recreate her site using CSS and structural markup. She’s new to web design and has been taking to CSS like a duck to water—as a veteran of Microsoft Word globally defined styles come to her naturally and she took very little time to cotton on to the importance of seperating presentation from content. I’ve shown her tables as well but she isn’t really interested as she sees CSS as a much better solution for general presentation. I’m hoping to help run an HTML/XHTML/CSS training course at the University early next year with a heavy emphasis on structural markup, standards compliance and accessibility so it’s great to have a guinea pig to play with :)

[... 201 words]

CSS in the real world

Adrian Holovaty: CSS in the real world. Adrian uses CSS to reduce the markup for a list of news headlines by 75%:

[... 56 words]

Pretty link on Kottke

In a discussion on css-discuss recently about underlines a on links, I pointed to kottke.org as an example of clever use of CSS for links where by the link underline is a slightly later colour than the link text. Today, Jason explains the technique and the thinking behind it.