Background color hover text

For support and discussion related to templates and themes in phpBB 3.3.
User avatar
bennybernaer
Registered User
Posts: 731
Joined: Tue Mar 22, 2011 9:53 pm

Background color hover text

Post by bennybernaer »

Is it possible to change the background color of the hover text?

Image
User avatar
_Vinny_
Style Customisations
Style Customisations
Posts: 10476
Joined: Tue Aug 11, 2009 12:45 am
Location: Brazil
Name: Marcus Vinicius

Re: Background color hover text

Post by _Vinny_ »

What style are you using?
User avatar
bennybernaer
Registered User
Posts: 731
Joined: Tue Mar 22, 2011 9:53 pm

Re: Background color hover text

Post by bennybernaer »

_Vinny_ wrote: Mon Oct 14, 2024 1:53 pm What style are you using?
Flatboots & Prosilver
User avatar
Brf
Support Team Member
Support Team Member
Posts: 53609
Joined: Tue May 10, 2005 7:47 pm
Location: {postrow.POSTER_FROM}

Re: Background color hover text

Post by Brf »

Prosilver is using the "title" attribute. There is no way to style that. You would have to use a different attribute and style that.
User avatar
Sniper_E
Registered User
Posts: 1212
Joined: Wed May 09, 2007 12:18 am
Location: Shreveport, Louisiana
Name: Ed Humphrey

Re: Background color hover text

Post by Sniper_E »

Play around with this css

Code: Select all

a[title]:hover::after {
	content: attr(title);
	font-size: 14px;
	color: white;
	background-color: blue;
	padding: 5px;
	border-radius: 5px;
}
Image . -.. / .... ..- -- .--. .... .-. . -.--
No is NEVER an Option and NEVER is the only Option when it comes to Giving Up!

:!: Sniper_E Styles | phpbbmodders :!:
User avatar
Brf
Support Team Member
Support Team Member
Posts: 53609
Joined: Tue May 10, 2005 7:47 pm
Location: {postrow.POSTER_FROM}

Re: Background color hover text

Post by Brf »

Sniper_E wrote: Mon Oct 14, 2024 8:13 pm Play around with this css

Code: Select all

a[title]:hover::after
This is not concerning an anchor. It is a dt that holds the title.
User avatar
Steve
Registered User
Posts: 1620
Joined: Tue Apr 07, 2009 7:48 pm
Location: Co. Durham, England
Name: Steven Clark

Re: Background color hover text

Post by Steve »

Fix:: dt[title]:hover::after {

Code: Select all

dt[title]:hover::after {
	content: attr(title);
	font-size: 14px;
	color: white;
	background-color: blue;
	padding: 5px;
	border-radius: 5px;
}
Works.
@ The Chief Medical Officers guideline for men is that: You are safest not to drink regularly more than 14 units per week.
- I drank that today++ :lol: 🍺
User avatar
Sniper_E
Registered User
Posts: 1212
Joined: Wed May 09, 2007 12:18 am
Location: Shreveport, Louisiana
Name: Ed Humphrey

Re: Background color hover text

Post by Sniper_E »

There you go. That's why I said, "Play around with this css" Steve knows how to play with it. :D But you haven't gone blind yet, keep playing with it...

You can do a title on an image or any class or any tag...

Like for instance <span class="tooltip" tip="Randoms by Martin"><img src="..." alt=""></span> with css

Code: Select all

.tooltip[tip]:hover::after {
	content: attr(tip);
	position: absolute;
	right: 3.9%;
	top: 42%;
	font-size: 14px;
	color: white;
	background: blue;
	padding: 0 5px 2px;
	border: 1px solid #777;
	border-radius: 5px;
}
Works.
Image . -.. / .... ..- -- .--. .... .-. . -.--
No is NEVER an Option and NEVER is the only Option when it comes to Giving Up!

:!: Sniper_E Styles | phpbbmodders :!:

Return to “[3.3.x] Styles Support & Discussion”