Welcome to the GoFuckYourself.com - Adult Webmaster Forum forums.

You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload content and access many other special features. Registration is fast, simple and absolutely free so please, join our community today!

If you have any problems with the registration process or your account login, please contact us.

Post New Thread Reply

Register GFY Rules Calendar
Go Back   GoFuckYourself.com - Adult Webmaster Forum > >
Discuss what's fucking going on, and which programs are best and worst. One-time "program" announcements from "established" webmasters are allowed.

 
Thread Tools
Old 12-08-2011, 05:41 PM   #1
Lace
Too lazy to set a custom title
 
Lace's Avatar
 
Industry Role:
Join Date: Mar 2004
Posts: 16,116
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.
__________________
Your Paysite Partner
Strength In Numbers!
StickyDollars | RadicalCash | KennysPennies | HomegrownCash
Lace is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 12-08-2011, 05:57 PM   #2
Serge Litehead
Confirmed User
 
Serge Litehead's Avatar
 
Industry Role:
Join Date: Dec 2002
Location: Behind the scenes
Posts: 5,190
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
__________________

Last edited by Serge Litehead; 12-08-2011 at 06:00 PM..
Serge Litehead is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 12-08-2011, 05:57 PM   #3
nm_
Confirmed User
 
Industry Role:
Join Date: May 2011
Location: San Diego
Posts: 328
ya the . is the issue. change it to # it should work
nm_ is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 12-08-2011, 06:00 PM   #4
Lace
Too lazy to set a custom title
 
Lace's Avatar
 
Industry Role:
Join Date: Mar 2004
Posts: 16,116
Ahhh. Changed it and it's still not working. Hmmph
__________________
Your Paysite Partner
Strength In Numbers!
StickyDollars | RadicalCash | KennysPennies | HomegrownCash
Lace is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 12-08-2011, 06:02 PM   #5
Serge Litehead
Confirmed User
 
Serge Litehead's Avatar
 
Industry Role:
Join Date: Dec 2002
Location: Behind the scenes
Posts: 5,190
cuz it's
#sponsors a {...}

or #sponsors strong a {..}
__________________
Serge Litehead is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 12-08-2011, 06:04 PM   #6
Serge Litehead
Confirmed User
 
Serge Litehead's Avatar
 
Industry Role:
Join Date: Dec 2002
Location: Behind the scenes
Posts: 5,190
one more tip

NEVER use same id twice or more on the same page, that's what classes intended for
__________________
Serge Litehead is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 12-08-2011, 06:04 PM   #7
DigitalTheory
^-^
 
Industry Role:
Join Date: Jul 2007
Location: SacTown
Posts: 1,055
Try
#sponsors a:hover {
color : #fff;
}

replace hover with link, active, visited, etc.

Last edited by DigitalTheory; 12-08-2011 at 06:06 PM..
DigitalTheory is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 12-08-2011, 06:23 PM   #8
sarettah
see you later, I'm gone
 
Industry Role:
Join Date: Oct 2002
Posts: 14,078
Quote:
Originally Posted by Lace View Post
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.
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.



.
__________________
All cookies cleared!

Last edited by sarettah; 12-08-2011 at 06:32 PM..
sarettah is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 12-08-2011, 07:17 PM   #9
Lace
Too lazy to set a custom title
 
Lace's Avatar
 
Industry Role:
Join Date: Mar 2004
Posts: 16,116
Fuck it, just changed it to h4 and wrote up a new class that seemed to work.
__________________
Your Paysite Partner
Strength In Numbers!
StickyDollars | RadicalCash | KennysPennies | HomegrownCash
Lace is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 12-08-2011, 07:17 PM   #10
adulttemplatestudio
Confirmed User
 
adulttemplatestudio's Avatar
 
Industry Role:
Join Date: Aug 2011
Posts: 237
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.
__________________


* Contact: sales[a]sphexa.com
* ICQ: 623322515
adulttemplatestudio is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 12-08-2011, 07:31 PM   #11
Lace
Too lazy to set a custom title
 
Lace's Avatar
 
Industry Role:
Join Date: Mar 2004
Posts: 16,116
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.
__________________
Your Paysite Partner
Strength In Numbers!
StickyDollars | RadicalCash | KennysPennies | HomegrownCash
Lace is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Post New Thread Reply
Go Back   GoFuckYourself.com - Adult Webmaster Forum > >

Bookmarks



Advertising inquiries - marketing at gfy dot com

Contact Admin - Advertise - GFY Rules - Top

©2000-, AI Media Network Inc



Powered by vBulletin
Copyright © 2000- Jelsoft Enterprises Limited.