Quantcast
Channel: phpBB.com
Viewing all articles
Browse latest Browse all 2457

[3.3.x] Styles Support & Discussion • Re: #variant_switch button:active

$
0
0
Same way as you do colours: use a parent tag with the colour ID or class assigned to make CSS declarations.

First, set it as a background image, not an inline image.

Code:

<div class="variant_switch"></div>
Define the size you want the div to have.

Code:

.variant_switch {width: whatever; height: whatever_else;}
You may want to use aspect ratio there, depending on exactly what you are aiming for.

Then if you are assigning a colour class on the root/html tag, use that for your descendant declarations.

Code:

.html_Crimson .variant_switch {background-image: whatever;}
Live example:

Code:

#var_hdlgre .headerbar .inner{background: url(banners/hdlgre2.webp) 66% 0;}#var_hdlblu .headerbar .inner {background: url(banners/hdlblu2.webp) 66% 0;}#var_hdlsla .headerbar .inner {background: url(banners/hdlsla2.webp) 50% 0;}#var_hdlora .headerbar .inner {background: url(banners/hdlora2.webp) 10% 0;}#var_hdlmur .headerbar .inner{background: url(banners/hdlmur2.webp) 77% 0;}
From here: https://hawkdawg.com/forums/index.php
Don't worry about the background-position numbers there. Those are just so the banners position themselves well relative to the logo on phones. Not your problem for this use case.

Statistics: Posted by Gumboots — Sun Apr 20, 2025 9:03 pm



Viewing all articles
Browse latest Browse all 2457

Trending Articles