CSS Wizardry archive for January, 2010


iPhone CSS—tips for building iPhone websites

With the rapid rise in mobile browsers, it has probably never been more important to ensure your sites can be handled on these platforms. By far one of the most popular such browsers is Mobile Safari on the iPhone—this is one of the easiest browsers to develop for: it runs on Webkit (meaning a lot of rich CSS3 support) and it’s only ever on one resolution and on one OS.

N.B. This article addresses iPhone development and iPhone development only. There is no reason why you cannot or should not develop for other mobile devices and platforms, Apple or otherwise. This just happens to be an iPhone only post.

The practical upshot of this is that you need to do no cross-browser testing, and can use all the CSS3 you like. This post will show you some of the basics of developing and designing websites for the iPhone and Mobile Safari.

(more…)


The three types of dash

Unbeknown to many, there are three main many types of dash, and one of the most common typographical mistakes is to use the wrong dash for the wrong job. There are actually three several different types of dash and each have their own uses. The ‘dash’ you see on your keyboard is actually a hyphen which is used as a ‘catch all’ glyph which is used for several purposes. The only reason for this is that there’s just not enough room on a keyboard for so many different dashes.

(more…)


The importance of proper punctuation

This is a short (and cheeky) post on the necessity of using proper punctuation—particularly the hyphen—and how it can completely alter the meaning of your sentence, often with ill effect. This morning, for one reason or another, I was reminded of a conversation I had with @nofunnyname last week on the subject of him buying a car. He said:

“I need to get an old ass banger.”

So, is that ‘old-ass banger’, or ‘old ass-banger’? You decide ;)


A reconsideration—in defence of <b> and <i> (or: people fear what they don’t understand)

The other day, I got to thinking about the HTML elements <b> and <i>, and wondered if they were still viably usable in production code. I’ve personally never used them before but I was aware that they existed and were still very much valid XHTML markup (even in the Strict DOCTYPE!). Wondering whether I’d avoided two elements for three years unnecessarily, I did some digging.

What the facts state

<b> and <i> are still valid, and as XHTML is just an XML serialisation of HTML, pretty much all the elements apparent in the HTML spec are true of the XHTML spec too—it is, pretty much, just the way in which these elements are written that makes them different in XHTML.

Twitter

With the help of @smashingmag I turned to Twitter and my knowledgeable followers and asked the question:

“Using <i> and <b> in (valid) XHTML (strict)… your thoughts on this would be much appreciated. #upcomingBlogPost Cheers all!” @csswizardry

(more…)


A suitable alternative—on proper use of alt attributes

Images in HTML come with a mandatory attribute used to textually describe the information displayed visually through the image. The alt attribute (not tag) is used by screenreaders etc to tell users who can’t view the actual image what it represents. It is also used in any circumstance where images can’t be loaded (slow connections, broken URIs etc).

(more…)


Search CSS Wizardry

Archives

Categories

Twitter—2089 followers

You should follow me.

Subscribe—RSS