Guest Posted October 19, 2006 Posted October 19, 2006 Hi, I'm nearly there with my styling of my site, but I'm having trouble changing the link colours throughout the site, they're all taking the default link colour from the style sheet. For example, I have made a new class for the Categories Box, and all that stuff works, bg image, etc, but the link colour doesn't, see below: .CategoriesBoxContents { background: url(images/ours/catboxbg.gif); font-family: Verdana, Arial, sans-serif; font-size: 11px; font-weight: bold; height: auto; line-height: 18px; padding-left: 10px; } A.CategoriesBoxContents { color: #ffffff; } A.CategoriesBoxContents:hover { color: #AABBDD; } WHen I check it in Firefox's Vie CSS info, the class isn't being applied to the <a> tag, only to the TD it's in. Thanks in advance, B
steve_s Posted October 19, 2006 Posted October 19, 2006 It might be due to the boxes.php in catalog/includes/classes folder check there
Guest Posted October 19, 2006 Posted October 19, 2006 Hi Steve, Thanks for that, I had a look in boxes.php, and found this : $info_box_contents[] = array(array('align' => $contents[$i]['align'], 'form' => $contents[$i]['form'], 'params' => 'class="CategoriesBoxContents"', 'text' => $contents[$i]['text'])); Does that help at all?
squeekit Posted October 19, 2006 Posted October 19, 2006 what's important here is... .............................................. A.CategoriesBoxContents { color: #ffffff; } A.CategoriesBoxContents:hover { color: #AABBDD; } WHen I check it in Firefox's Vie CSS info, the class isn't being applied to the <a> tag, only to the TD it's in. .............................................. no matter what browser you use anchor's do not magically get a css class like what you have css'ed for - in other words you apply your style to: <a class="CategoriesBoxContents" href="link">link</a> but you have not modified your links to appear as such... however, being that the links appear in a container with a class of "CategoriesBoxContents" you might be able to style such links that way with the following... .............................................. .CategoriesBoxContents A { color: #ffffff; } .CategoriesBoxContents A:hover { color: #AABBDD; } .............................................. the difference is in your css example you were applying the style to anchors ("A") of the class "CategoriesBoxContents" and in my example i apply the style to anchors contained within elements of the class "CategoriesBoxContents" - of course you can refine my example - like if you want to apply the style only to anchors contained within table cells of the class "CategoriesBoxContents" .............................................. TD.CategoriesBoxContents A { color: #ffffff; } TD.CategoriesBoxContents A:hover { color: #AABBDD; } .............................................. etc. etc.
Guest Posted October 19, 2006 Posted October 19, 2006 Thank you, thank you, thank you :D Works a treat... I suspected it was something like that, but couldn't figure it out...... I still have a lot to learn about CSS!
Recommended Posts
Archived
This topic is now archived and is closed to further replies.