Tuesday, March 22, 2011

Media queries for standard devices

Targeting different devices via @media in CSS:
Media Queries for Standard Devices

Safari Firebug alternative

How to show the developer console on Safari:
Under Preferences, go to the Advanced tab and check "Show Develop menu in menu bar".
Display/unhide the menu bar.
Click on "Develop" on the menu bar and click "Show Web Inspector".

jTweetsAnywhere: a jQuery Twitter Widget

Found jTweetsAnywhere while looking for a plug-in that guards against exceeding Twitter's rate limits.  Haven't tried it yet, but putting it here to remember for later.

HTML5 Resources

A Brief History of Markup (up to HTML5)

The first chapter of "HTML5 for Web Designers" by Jeremy Keith.

Friday, March 18, 2011

Targeting :first-child on IE6

This article shows a way to target the :first-child pseudoclass on IE6 using an expression to check if previousSibling is null, like so:

table.mytable td
{text-align: expression(this.previousSibling==null?'center':'left');}


Another way I've found is to use the childNodes of the element's parentNode, which is useful for targeting multiple columns in a table (yes, it's a table, but it's being used to display real tabular data in the case I'm working on), and when the col tag isn't enough to style the columns:

table.mytable td
{text-align: expression(this==this.parentNode.childNodes[0]?'center':'left');}