pfaffman
(Jay Pfaffman)
2018 年2 月 6 日 00:51
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)
2018 年2 月 6 日 01:43
2
Does a category logo not work? Something like #howto:tips-and-tricks ?
1 个赞
pfaffman
(Jay Pfaffman)
2018 年2 月 6 日 05:07
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 个赞
Johani
(Joe)
2018 年2 月 6 日 05:19
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 个赞
pfaffman
(Jay Pfaffman)
2018 年2 月 6 日 18:00
6
I removed .categories-list
to make it work, but this was what I needed! Thanks so very much!
1 个赞
This topic was automatically closed after 2314 days. New replies are no longer allowed.