Replacing class="alignright" etc Was: Re: [wp-hackers] Linking stylesheet to RSS feeds

Jeremy Clarke jer at
Fri Jun 19 01:18:54 GMT 2009

On Thu, Jun 18, 2009 at 8:01 PM, Lynne Pope<lynne.pope at> wrote:
> And, for me, this has nothing to do with accessibility and everything to do
> with usability - there are some really badly designed sites out there that
> seem to put design above readability!

I doubt any of these problems are caused by aligning photos inside
post text using float: I know the kind of issues you are talking
about, but they are usually caused by bad text formatting choices. I'd
NEVER try to impose my text formatting choices on someone reading an
RSS feed (i hate even doing it with email), but that's a really
different issue from alignment.

>> I mean, in the context of
>> a blog post .alignright is almost structural for the content. An image
>> that's .alignright has a very specific semantic relationship with the
>> paragraph that follows it (e.g. it might say 'the photo to the right'
>> in the text).
> Those two classes aren't semantic. There is nothing about alignright that
> says it must align to the right. It's not always aligned or floated to the
> right even in WordPress core, which overrides it and flips it around for
> sites that use RTL.

To be clear, I wasn't saying that .alignright is itself actually a
semantic bit of markup. Rather I was saying that the use of
.alignright inside of a post is more than just a style decision, its a
structural content decision, and thus semantic in the *intent* of the
person using it on a photo . The fact that WP swaps the actual float
for RTL is a perfect example: it is working with the intended semantic
meaning of the right alignment rather than a specific style one.
You're right that there's nothing in class="alignright" that says it
needs to float right, but its still an incredibly useful convention,
and the way the WP post editor presents it is more about post
structure and layout than about style.

On some level I'm just bemoaning the lack of an actual XHTML property
that lets you control alignment, because I think alignment IS a
structural issue within site content. Sure, <center> was a bad idea,
but the fact is that when we are creating mixed-media content (photos,
videos, pullquotes) we naturally want ways to control left and right
alignment. Removing align="left" from html was a good idea because
it's not how you should set up your site's sidebar, but its a shame
because now our posts end up looking like 1995 when they're viewed
using modern tools. I think it's pretty logically sound to say that
right alignment of photos in a blog post is more than a 'style' issue,
it's part of the content of the post. It just happens that CSS 'style'
is the only means of achieving right alignment.

I think if nothing else floating of images deserves a spot as an
exception to the rule against inline styles in posts. I also doubt you
would even notice, let alone be upset or find usability problems with
a  feed that used basic floating and margins on images to make the
layout nicer (unless you get upset on principal, which is valid but
probably not productive ;)

Jeremy Clarke
Code and Design |

More information about the wp-hackers mailing list