bbPress

Simple, Fast, Elegant

bbPress support forums » Troubleshooting

Style first post only?

(3 posts)
  • Started 11 months ago by outchy
  • Latest reply from outchy
  • This topic is resolved
  1. Is there a way to style the text of only the first post for each topic? I know how to style every alternating post but I can't figure out how to style just the first entry...

    Posted 11 months ago #
  2. You could apply the style you want for only the first li to every li, then use the + selector to modify it for all li following another li (in effect letting you style only the first one, although it's annoying that you may have to cancel styles).

    li {
    font-weight: bold; }
    li + li {
    font-weight: normal; }

    should make just the first li bold. This I think works on every browser, even IE6.

    The http://developer.mozilla.org/en/docs/CSS::first-child rule is of course the proper thing to do, but (if I recall correctly) doesn't work for IE6. (This is what I would do ... but I generally have no mercy for IE6 users anyway.)

    Posted 11 months ago #
  3. I went with the first-child option and after a lot of tinkering, I finally got it working. To hell with IE6! Thanks so much for your help, fel64

    Posted 11 months ago #

RSS feed for this topic

Reply

You must log in to post.

Code is Poetry.