Forums

categories background (5 posts)

  1. ugua
    Member
    Posted 3 years ago #

    Hi,

    I have a cell containing post title and categories.
    I have 3 categories in total and I'd like to have each CELL in a different color.
    How do I do that?

    Thank u guys.

  2. petit
    Member
    Posted 3 years ago #

    If by CELL, you mean some containing HTML block, like a <div> or <li>, you could possibly use a PHP if statement to give the blocks different CSS classes, e.g. <div class="some-cat">.
    Then in you stylesheet set the background or whatever property, using these classes.
    Such as:
    .some-cat{
    background-color: yellow;
    }

  3. ugua
    Member
    Posted 3 years ago #

    Ok but how to set my index.php where the posts from the 3 different categoies appear?

    Thank you

  4. ugua
    Member
    Posted 3 years ago #

    up

  5. petit
    Member
    Posted 3 years ago #

    Allright! Maybe your answer can be found in this thread?
    http://wordpress.org/support/topic/60671?replies=4#post-324444

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.