Two link colors
#1
I've been trying to fine tune my theme code and have a few little tweaks that I can't figure out. One is that I have a dark background image, but a light color background in my postbit. So my problem is that I need dark links on the postbit, but white on the background. I've been able to fix the majority of the conflicts by changing them in the template or CSS, but this one is killing me.

[Image: blackrd.png]
[Image: whitez.png]

I've tried assigning it a color in the template, but that will only effect the brackets and not the actual links. What am I doing wrong?
Reply
#2
Is there a class wrapping it? If so, you could use that. Use right click then inspect element.
Reply
#3
It's class is "smalltext". I tried to create a new class called "whitetext", but that only affected the brackets. The 'a link' color seems to dominate no matter how I try to manipulate it.
Reply
#4
Inline styling always overrides styles via <link href="www.example.com/style.css" rel="stylesheet" />, which is how MyBB handles stylesheets. Try doing something like this:

Code:
<a style="color: #fff;" href="polls.php?action=showresults&amp;pid=649">Show Results</a>
(borrowed from MyBB Community forum)

Alternatively, do something like apply an id to the element, and in the CSS, target that.

Code:
...
#link-poll {
color: white;
}
#link-poll:hover {
color: white;
}
...

<a href="polls.php?action=showresults&amp;pid=649" id="link-poll">Show Results</a>
spyder likes this post
Reply
#5
Seabody's second solution is probably the best, though I would personally use a class.

PHP Code:
<div class="poll_links_area">
...
<
a style="color: #fff;" href="polls.php?action=showresults&amp;pid=649">Show Results</a>
...
</
div

PHP Code:
.poll_links_area {
    
colorred;
}
    .
poll_links_area a {
        
colorred;
    } 
spyder likes this post
Reply
#6
Great! Thanks for the solutions guys! I knew there had to be a way...

EDIT: Worked like a charm! Thanks a lot guys!
Reply