Changing Background of New Messages Link
3 posters
Page 1 of 1
Changing Background of New Messages Link
I'm working on a really advanced theme design for forumotion, and there's one thing I can't figure out!
I'm trying to get the link on the navigation bar to have a background color on it when there's a new private message.
Is there a simple(ish) way to do this?
I'm trying to get the link on the navigation bar to have a background color on it when there's a new private message.
Is there a simple(ish) way to do this?
Last edited by Mike on 16.06.15 15:58; edited 1 time in total
Mike- Hyperactive
- Posts : 4255
Reputation : 471
Language : English, HTML, CSS
Location : Loveland, Colorado
Re: Changing Background of New Messages Link
Are you trying to use picture based navigation bars, or the standard?
Remember to mark your topic when a solution is found.
General Rules | Tips & Tricks | FAQ | Forgot Founder Password?
Team Leader
Review Section Rules | Request A Review | Sticker Points
Re: Changing Background of New Messages Link
Standard Text Navigation.
Mike- Hyperactive
- Posts : 4255
Reputation : 471
Language : English, HTML, CSS
Location : Loveland, Colorado
Re: Changing Background of New Messages Link
Not sure if it's possible to modify that. Though if it is, it would probably be with CSS.
Remember to mark your topic when a solution is found.
General Rules | Tips & Tricks | FAQ | Forgot Founder Password?
Team Leader
Review Section Rules | Request A Review | Sticker Points
Re: Changing Background of New Messages Link
brandon_g wrote:Not sure if it's possible to modify that. Though if it is, it would probably be with CSS.
Thanks I wouldn't have guessed....
Mike- Hyperactive
- Posts : 4255
Reputation : 471
Language : English, HTML, CSS
Location : Loveland, Colorado
Re: Changing Background of New Messages Link
Hi @Mike,
You're using PunBB, correct ? Unfortunately that version lacks the .new-message classname for the link, like in phpbb3. You can however, add this class using JavaScript.
Modules > JavaScript codes management > new script
Placement : In all the pages
After this, you should be able to use CSS to style the link.
You're using PunBB, correct ? Unfortunately that version lacks the .new-message classname for the link, like in phpbb3. You can however, add this class using JavaScript.
Modules > JavaScript codes management > new script
Placement : In all the pages
- Code:
$(function() {
var pm = document.getElementById('i_icon_mini_new_message'); // find the new message node
// check existence before testing the parent node for digits
if (pm && /\d+/.test(pm.parentNode.innerHTML)) {
pm.parentNode.className += ' new-message'; // add a new classname to the link
}
});
After this, you should be able to use CSS to style the link.
- Code:
a.new-message {
color:#F60 !important;
}
Re: Changing Background of New Messages Link
Ange Tuteur wrote:Hi @Mike,
You're using PunBB, correct ? Unfortunately that version lacks the .new-message classname for the link, like in phpbb3. You can however, add this class using JavaScript.
Modules > JavaScript codes management > new script
Placement : In all the pages
- Code:
$(function() {
var pm = document.getElementById('i_icon_mini_new_message'); // find the new message node
// check existence before testing the parent node for digits
if (pm && /\d+/.test(pm.parentNode.innerHTML)) {
pm.parentNode.className += ' new-message'; // add a new classname to the link
}
});
After this, you should be able to use CSS to style the link.
- Code:
a.new-message {
color:#F60 !important;
}
You are amazing. Thank you so much!
Mike- Hyperactive
- Posts : 4255
Reputation : 471
Language : English, HTML, CSS
Location : Loveland, Colorado
Similar topics
» New messages link
» Is there anyway to change the private messages link?
» Changing the LINK to the banner
» Changing a link based on a user's language setting
» Changing the forum Link
» Is there anyway to change the private messages link?
» Changing the LINK to the banner
» Changing a link based on a user's language setting
» Changing the forum Link
Page 1 of 1
Permissions in this forum:
You cannot reply to topics in this forum