gameboyz Posted January 18, 2009 Share Posted January 18, 2009 in my css i declared links as font-weight:normal and text-decoration:underline.however in one particular part i use span to declare font-weight as bold and text-decoration to be none. however the text is bold but underline.help? Link to comment Share on other sites More sharing options...
jlhaslip Posted January 18, 2009 Share Posted January 18, 2009 code? Link to comment Share on other sites More sharing options...
gameboyz Posted January 19, 2009 Author Share Posted January 19, 2009 code?code for what? css or span? Link to comment Share on other sites More sharing options...
jlhaslip Posted January 19, 2009 Share Posted January 19, 2009 Both. the two interact together.Better would be a link to the page. Link to comment Share on other sites More sharing options...
Jerry62704 Posted January 20, 2009 Share Posted January 20, 2009 code for what? css or span?Both, with a link as best.In general, rules are applied on a selective basis - that is, they are applied to selectors bases on specificity. If you have a general rule on a "p" for example, it applies to all of them. But if you have an additional rule such as "#myDiv p" then that one would apply in that specific instance and not the original "p" rule (if they are in conflict). Link to comment Share on other sites More sharing options...
gameboyz Posted January 23, 2009 Author Share Posted January 23, 2009 sorry for the late reply. css: #ads a:link,#ads a:visited,#ads a:active,#ads a:hover {text-align:center;text-decoration:underline;font-weight:normal;font-size:13px;font-family:tahoma;} span: <a href="http://forums.vr-zone.com/showthread.php?p=6309435"><span style="font-weight:bold; color:#d72e2e; text-decoration:none;">Looking for web hosting? :D</span></a> Link to comment Share on other sites More sharing options...
Ingolme Posted January 23, 2009 Share Posted January 23, 2009 It might be a problem with priorities. Try this and see if it works:<span style="font-weight:bold; color:#d72e2e; text-decoration:none !important;"> Link to comment Share on other sites More sharing options...
Jerry62704 Posted January 23, 2009 Share Posted January 23, 2009 sorry for the late reply. css: #ads a:link,#ads a:visited,#ads a:active,#ads a:hover {text-align:center;text-decoration:underline;font-weight:normal;font-size:13px;font-family:tahoma;} span: <a href="http://forums.vr-zone.com/showthread.php?p=6309435"><span style="font-weight:bold; color:#d72e2e; text-decoration:none;">Looking for web hosting? :D</span></a> hover should be before active (LoVe HA - Link, Visited, Hover, Active)I'm pretty sure Tahoma has to be capitalized (font family must match what the computer has)Other than that, it's hard to take the snippets out of context and diagnose for problems. Link to comment Share on other sites More sharing options...
gameboyz Posted January 24, 2009 Author Share Posted January 24, 2009 hover should be before active (LoVe HA - Link, Visited, Hover, Active)I'm pretty sure Tahoma has to be capitalized (font family must match what the computer has)Other than that, it's hard to take the snippets out of context and diagnose for problems.anybody else can help? Link to comment Share on other sites More sharing options...
jeffman Posted January 24, 2009 Share Posted January 24, 2009 This article clearly explains that it can't be done. I'm not satisfied that I understand why, but at least now you know that giving up is the right thing to do:https://developer.mozilla.org/En/Understanding_UnderlinesFWIW, I Googled "css link span underline" ; this article was the 5th result. I looked at it first because Mozilla has good documentation. Link to comment Share on other sites More sharing options...
gameboyz Posted January 24, 2009 Author Share Posted January 24, 2009 This article clearly explains that it can't be done. I'm not satisfied that I understand why, but at least now you know that giving up is the right thing to do:https://developer.mozilla.org/En/Understanding_UnderlinesFWIW, I Googled "css link span underline" ; this article was the 5th result. I looked at it first because Mozilla has good documentation.don mean to boast but im not the type who gives up easily. i worked on this 2 times, each resulting in failure. fortunately i didnt work on it everytime i used firefox :X Link to comment Share on other sites More sharing options...
Ingolme Posted January 24, 2009 Share Posted January 24, 2009 But why don't you want to apply the style to the <a> element itself? Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.