Ysera Posted May 17, 2015 Share Posted May 17, 2015 I realize this should be pretty easy but I can't seem to make it work so appreciate any help. I'm trying to change the colors of 3 texts in my pet's lookup, specifically the: 1. Pet's color, in this case, the word "Faerie" 2. Hitpoints color which is defaulted to green 3. "Challenge" text I want them all to be a uniform color. This is the current lookup: http://www.neopets.com/petlookup.phtml?pet=Lucien725 I've tried these from: http://www.neopets.com/~darkest_faerie_lair But they don't seem to work. Or I just don't know how. <style>.contentModuleContent, .contentModule { background: #0F0; color: #00F;}</style> <style>div div div div b { color: #FFF;}</style> <style>.content div { color: #F00;}.content div div { color: none;}</style> This topic has been edited by a member of staff (Ruto). The topic was posted in the wrong area. Please check your user inbox to see if you have been contacted regarding this topic. Per the reason above, this topic has been MOVED from Graphics to Computers & Programming. Edit: Oops, sorry for posting in the wrong area. After some more research (and frustration, lol), I finally have a working code. I added this: font, td, div, p, span, b, a, a b, h2 { color: #73b5eb !important;} So for anyone who has the same problem, this worked for me. Does anyone know what this line is for? !important This post has been edited by a member of staff (Ruto) because of a violation of the forum rules. Please do not double post. Use the edit button if you have something to add. Please check your user inbox to see if you have been contacted regarding this incident, then review our rules. Quote Link to comment Share on other sites More sharing options...
Dawn* Posted May 17, 2015 Share Posted May 17, 2015 To be honest, I have never bothered to look into neopets lookups coding. But! Link coding in CSS always ends with a. So, it should be <style> .content div a { color: #F00; } .content div div a { color: none; } </style> And just add the a to the end of the rest of the stuff, too. See if that works? Quote Link to comment Share on other sites More sharing options...
spencerkatty Posted May 17, 2015 Share Posted May 17, 2015 Does anyone know what this line is for? !important !important means that if you try to set the same attribute to a different value later in your <style>, it will not be overwritten as it normally would be. Ysera 1 Quote Link to comment Share on other sites More sharing options...
Mouseykins Posted May 17, 2015 Share Posted May 17, 2015 A good resource for everything coding related is w3schools. Now to address your coding, I'm not sure if it's just the way you posted it or if that's the way you have them in your code. When you have CSS codes that go between style tags, you only need one set of style tags. Everything CSS goes in there. For the !important it overrides any previous code or conflicting code within the page. Sometimes in order to override something TNT has placed on lookups, this code is needed. I have it in a few spots on my lookup. My guess as to what went wrong was you weren't using proper hex codes for your color and as soon as you did that it decided to work. You shouldn't actually need the !important there. Quote Link to comment Share on other sites More sharing options...
Ysera Posted May 18, 2015 Author Share Posted May 18, 2015 Actually, I think I finally selected the right element (?) that made it work. I'm referring to the below: font, td, div, p, span, b, a, a b, h2 I'm still not exactly sure which element it was but it's one of those. Lol. @Dawn, I kind of worked it out that links ended in 'a' and images ended in 'img'. h1 and h2 are headers. But I have no idea what 'b' or 'span' are. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.