GoFuckYourself.com - Adult Webmaster Forum

GoFuckYourself.com - Adult Webmaster Forum (https://gfy.com/index.php)
-   Fucking Around & Business Discussion (https://gfy.com/forumdisplay.php?f=26)
-   -   Quick CSS question (https://gfy.com/showthread.php?t=1049114)

Lace 12-08-2011 05:41 PM

Quick CSS question
 
Trying to change the font color of a link h2.

I guess the default "a" is taking over with another color.

I have
Code:

.sponsors h2 a {
        color:#FFF;
}

Then
Code:

<h2 id="sponsors"><strong>
<a href="#" title=" " target="_blank" class="sponsors">BLAH</a>
</strong></h2>



Should it be this?
Code:

a:sponsors {
        color:#FFF;
}

I know it's probably right in under my nose but I can't think straight right now. :1orglaugh

Serge Litehead 12-08-2011 05:57 PM

if you use chrome you can right mouse click on particular element and find out exactly which rule is taking over color with "inspect element"

btw .something in html is class="something"

id="someid" in css marked such as #someid

id > class


edit, a:sponsors is way out of line, simply wrong , it's used to set properties for a:visited, a:link, a:active
you can do a.sponsor:visited for exemple

nm_ 12-08-2011 05:57 PM

ya the . is the issue. change it to # it should work

Lace 12-08-2011 06:00 PM

Ahhh. Changed it and it's still not working. Hmmph

Serge Litehead 12-08-2011 06:02 PM

cuz it's
#sponsors a {...}

or #sponsors strong a {..}

Serge Litehead 12-08-2011 06:04 PM

one more tip

NEVER use same id twice or more on the same page, that's what classes intended for

DigitalTheory 12-08-2011 06:04 PM

Try
#sponsors a:hover {
color : #fff;
}

replace hover with link, active, visited, etc.

sarettah 12-08-2011 06:23 PM

Quote:

Originally Posted by Lace (Post 18617048)
Trying to change the font color of a link h2.

I guess the default "a" is taking over with another color.

I have
Code:

.sponsors h2 a {
        color:#FFF;
}

Then
Code:

<h2 id="sponsors"><strong>
<a href="#" title=" " target="_blank" class="sponsors">BLAH</a>
</strong></h2>



Should it be this?
Code:

a:sponsors {
        color:#FFF;
}

I know it's probably right in under my nose but I can't think straight right now. :1orglaugh

The way you have that coded you just want (I think):

.sponsors
{
color:#FFF;
}

Hey I can still edit this... damn. Not changing anything, just adding I am not a css expert in any way shape or form. I solve issues like this by throwing in an inline style and moving on.



.

Lace 12-08-2011 07:17 PM

Fuck it, just changed it to h4 and wrote up a new class that seemed to work.

adulttemplatestudio 12-08-2011 07:17 PM

Do you know if there is a body style set to the links?


you also have 2 styles to that, #sponsors and .sponsors
Removed or rename one of them?

Contact me and i will be happy to fix this issue for you.

Lace 12-08-2011 07:31 PM

Yeah there was a body style for links, hence the reason I was trying to name it another class.

I've got it working now but thank you all. :thumbsup


All times are GMT -7. The time now is 09:13 PM.

Powered by vBulletin® Version 3.8.8
Copyright ©2000 - 2025, vBulletin Solutions, Inc.
©2000-, AI Media Network Inc123