- This topic is empty.
Viewing 8 posts - 1 through 8 (of 8 total)
Viewing 8 posts - 1 through 8 (of 8 total)
- The forum ‘CSS’ is closed to new topics and replies.
The forums ran from 2008-2020 and are now closed and viewable here as an archive.
At the top of my category pages I can write a description of that category, however it’s not really readable right not.
Here is a link to see what I’m talking about http://noahsdad.com/therapy/
Any thoughts on how to make it readable, (and feel free to leave any style tips to make it look good if you’d like!) Thanks! :)
The most simplest way is to change the text color.
Change text color or add a background color. :)
The problem is, if I change the text color, it changes the text color of the blog post as well. I just want that text to be changed.
Add a class to it ?
If you don’t want / can’t, go with the :first-of-type pseudo-selector. :)
Hey Hugo I’m not really sure how to do that. (I’m just now learning my way around wordpress and CSS) would you mind helping me figure out how to do that?
Thanks!
The first way is basic HTML / CSS. You add a class to the description in order to give it different styles. Something like :
.my-description {
color: white;
}
The second way is not totally cross-browser, since not every browser supports pseudo-selectors. So if you want this to work back on something like IE6, you'd better go with the first way.
But if you don't mind about legacy browsers, then you could try this :
.my-article p:first-of-type {
color: white;
}
Basically it tells to the first <p> tag in the element .my-article to be white.
Edit: I just dug a little bit on your code, and you can do it very easily without changing anything.
#archive-page-title p {
color: white;
}
Your #archive-page-title div has only one <p> tag in it: the description. You can style it without a problem.
Thanks. That worked like a charm! :)