[wp-hackers] Styling of "post date"
Mike Little
journalized at gmail.com
Sat Sep 11 23:51:45 UTC 2004
On Sun, 12 Sep 2004 00:36:51 +0100, Allan Mertner <amwp at mertner.com> wrote:
> Mike Little wrote:
>
> >
> >But then you lose the *semantic* meaning of that part of the markup
> >(the fact that it is a second level heading). That would be a bad
> >thing.
> >
> >The correct way to style the date does not involve any changes to your template!
> >
> >
> It does, if you have more than one h2 tag inside the content - say,
> inside a blog post. Adding a class specifier to allow the css to target
> this element specifically would make sense: it adds readability to the
> stylesheet and allows you to target your style to *that* element only.
>
>
But then an h2 inside a post will be contained within a div of the
class storycontent
Thus
#content div.storycontent h2 { color: blue;}
will style the h2's within a post, again without changing the template.
Mike
--
Mike Little
http://zed1.com/journalized/
More information about the hackers
mailing list