Grow your CSS skills. Land your dream job.

Styling Pages vs. Posts?

  • # November 17, 2009 at 3:31 pm

    I’m in the process of completing my first WP theme from scratch, but I’m having trouble with a really simple thing and I’m sure there is a simple way to solve it…but

    Using some CSS to style image thumbs on Posts (border around image), but I don’t want the border to show up on the Page images. It appears the selectors are one in the same. Is there a clean way to do this? I’d also love to style the page titles differently then the post titles, but appears to be the exact same situation, so one fix would probably work for both.

    Thx

    # November 17, 2009 at 5:34 pm

    If you use post_class() in your theme then styling different posts / pages becomes very easy.

    You could use .post h3 to style headings on a post and .page img to style images on a page. It also supports tags, categories and sticky posts.

    http://codex.wordpress.org/Migrating_Pl … mes_to_2.7

    # November 21, 2009 at 11:28 am

    Thank you, that worked.

Viewing 3 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic.

*May or may not contain any actual "CSS" or "Tricks".