Jump to content


Photo

Assign color to the title of a category


  • Please log in to reply
7 replies to this topic

#1 sotnas

sotnas

    Newbie

  • Members
  • Pip
  • 7 posts
  • Country: Country Flag

Posted 28 April 2012 - 02:53 PM

I have several categories and I want to assign a specific color/background, to the title of the post/article with a specific category. when I write an article, I assign a category to this article, the title of this article automatically gets the color/backgroung-color... of the respective category. Any plugin? Tanks i Love PageLines!!
  • Glastyroato likes this

#2 catrina

catrina

    Advocate

  • Members
  • 12345 posts
  • LocationCalifornia
  • Country: Country Flag

Posted 28 April 2012 - 04:45 PM

There isn't a plugin, but there is a way using CSS. Using Firebug, you can inspect the category page for the CSS elements that you need to add to your Custom CSS settings. For example, the CSS you'd need would look something like this:

 body.category-id-# h2.selectortitlehere {color: #xxx; background-color: #xxx;}

For further info and instruction, please see this documentation: http://www.pagelines...wiki/Custom_CSS

#3 sotnas

sotnas

    Newbie

  • Members
  • Pip
  • 7 posts
  • Country: Country Flag

Posted 28 April 2012 - 04:50 PM

Gonna try firebug. Andd reply soon Tanks Catrina

#4 sotnas

sotnas

    Newbie

  • Members
  • Pip
  • 7 posts
  • Country: Country Flag

Posted 28 April 2012 - 06:13 PM

Catrina,

after install the firebug, i don't see any line with

body.category-id-# h2.selectortitlehere {color: #xxx; background-color: #xxx;}

why?

#5 catrina

catrina

    Advocate

  • Members
  • 12345 posts
  • LocationCalifornia
  • Country: Country Flag

Posted 28 April 2012 - 06:17 PM

That

is just an example. After the body.category-id-# code, there needs to be a selector for the category title (it can be found by inspecting using Firebug).


#6 sotnas

sotnas

    Newbie

  • Members
  • Pip
  • 7 posts
  • Country: Country Flag

Posted 28 April 2012 - 06:32 PM

Catrina,
I think I'm doing something wrong.

Screen with a firebug for some help.

Posted Image

#7 sotnas

sotnas

    Newbie

  • Members
  • Pip
  • 7 posts
  • Country: Country Flag

Posted 28 April 2012 - 10:15 PM

Tanks Catrina, But I still don't have any solution.

#8 sotnas

sotnas

    Newbie

  • Members
  • Pip
  • 7 posts
  • Country: Country Flag

Posted 29 April 2012 - 08:22 PM

The solution! Finally!

the css code:

.category-economia h2.entry-title a {
padding-left: 35px;
color: rgb(114, 119, 128);
}


tanks!

I love Pagelines.