pfaffman
(Jay Pfaffman)
February 6, 2018, 12:51am
1
tl;dr
I need to have a “sponsored by” image on a particular category page.
mindless rambling
One idea was to put it in the category description excerpt, but that doesn’t display the image.
I suspect that the real answer is to connect to the category-name class and stick it in the main-link clearfix, uh, thingy.
jomaxro
(Joshua Rosenfeld)
February 6, 2018, 1:43am
2
Does a category logo not work? Something like #howto:tips-and-tricks ?
1 Like
pfaffman
(Jay Pfaffman)
February 6, 2018, 5:07am
3
No. They’re being used as they are intended. This needs to be in addition to the category image.
Got a mock-up? I’m having trouble imagining what you want where.
1 Like
Johani
(Joe)
February 6, 2018, 5:19am
5
Something like this?
or did you have something else in mind?
If it is, here’s an initial go at it.
I used:
// change category NAME as needed like .category-staff or .category-meta
.categories-list.category-NAME .list-controls:before {
content: "";
display: block;
background: url(img.jpg) no-repeat; // <~ change the url as needed
background-size: 100%;
padding-top: 40%; // <~ change padding amount according to image aspect ratio
}
I’d be happy to sort out additional problems.
7 Likes
pfaffman
(Jay Pfaffman)
February 6, 2018, 6:00pm
6
I removed .categories-list
to make it work, but this was what I needed! Thanks so very much!
1 Like
This topic was automatically closed after 2314 days. New replies are no longer allowed.