Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
MyBB Help
#1
My minds went blank here.. Been so long since I did anything with MyBB.
I know this is probably some simple CSS stuff.
How can I change the colour of the links in the panel so that they're different to all of the other links around the forum?

I have a dark panel area and the rest is light. At the minute, all of the links are dark, which means they don't show up on the panel area.


Nevermind.. I think I sussed it.
Reply
#2
You could edit the template for the links in your panel, i'm assuming probably a navbar panel in the header, so this would be a header template edit, add a class="" attribute to the surrounding element for those links, and add the class with link attributes in the global.css.

Code:
.classname a {
}

.classname a:active{
}

.classname a:hover {
}

.classname a:visited{
}

etc...
Reply
#3
(01-23-2012, 12:07 PM)AceInfinity Wrote: You could edit the template for the links in your panel, i'm assuming probably a navbar panel in the header, so this would be a header template edit, add a class="" attribute to the surrounding element for those links, and add the class with link attributes in the global.css.

Code:
.classname a {
}

etc...

Yeh that's what I did. Problem now though is I can't add a class attribute to the "Lost Password" link, as it returns "undefinedNaN".
Reply
#4
Lost Password? Isn't that in the signup location? It's a global link though, If you see a div around it or something then append your link attributes to that div, specifying it to look for <a elements as well...

Example:
Code:
#divname a {
}

Otherwise if it already uses a class then:
Code:
#divname a.classname {
}

Should work I believe... What forum is this?
Reply
#5
(01-23-2012, 12:15 PM)AceInfinity Wrote: Lost Password? Isn't that in the signup location? It's a global link though, If you see a div around it or something then append your link attributes to that div, specifying it to look for <a elements as well...

Example:
Code:
#divname a {
}

Otherwise if it already uses a class then:
Code:
#divname a.classname {
}

Should work I believe... What forum is this?

It is in the sign up location but as you say, it's a global link, so it's taking it's color from a:link.
It's not wrapped in a div but I could try doing that. I tried simply appending "class:"a1"" to the <a> immediately after the href, which worked for the other links, but this one seems to be different. Here's the code:
Code:
<script type="text/javascript">
<!--
    lang.username = "{$lang->login_username}";
    lang.password = "{$lang->login_password}";
    lang.login = "{$lang->login}";
    lang.lost_password = " &mdash; <a href=\"{$mybb->settings['bburl']}/member.php?action=lostpw\">{$lang->lost_password}<\/a>";
    lang.register_url = " &mdash; <a href=\"{$mybb->settings['bburl']}/member.php?action=register\">{$lang->welcome_register}<\/a>";
    lang.remember_me = "{$lang->remember_me}";
// -->
</script>
The site is http://www.eplforums.net
Tried wrapping it in div tags and it's still throwing an error.
Reply
#6
My laptop charger has broke so I can't use my laptop any more or I'd help via TeamViewer. Go to:

ACP - Templates and Styles - Your Theme - global.css

Then underneath panel do what ace said in his first post.
Reply
#7
(01-23-2012, 02:36 PM)BreShiE Wrote: My laptop charger has broke so I can't use my laptop any more or I'd help via TeamViewer. Go to:

ACP - Templates and Styles - Your Theme - global.css

Then underneath panel do what ace said in his first post.

That doesn't make sense. You can't define a classes CSS attributes within another classes attributes.. What you're suggesting would be to have:
Code:
#panel {
.classname a {
    color: #FFF;
}
}

Which doesn't make any sense lol.
As I said before though, I've worked out how to make the links a different colour, I'm just stuck on the Lost Password link as it throws an error.
EDIT:

Never mind I worked it out eventually..
Just created
Code:
#panel a {
       color: #FF!important;
}

Not sure if that's what you guys meant or not but I got there in the end so thanks for your help.
Reply
#8
No, what I meant was:

Code:
#panel {
css here
}

#panel a:link {
css code here
}

Sorry if I didn't make it clear, I was on my BlackBerry, but I got my laptop working now!
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  How to Make your MYBB Central Plugin Compatible with new Mybb Billy Mays 3 1,859 07-12-2011, 06:40 PM
Last Post: Billy Mays

Forum Jump:


Users browsing this thread: 1 Guest(s)