![]() |
|
color paragraph links? - Printable Version +- Hack Forums (https://hackforums.net) +-- Forum: Tech (https://hackforums.net/forumdisplay.php?fid=444) +--- Forum: Webmasters (https://hackforums.net/forumdisplay.php?fid=141) +---- Forum: Website Construction (https://hackforums.net/forumdisplay.php?fid=50) +---- Thread: color paragraph links? (/showthread.php?tid=5440865) |
color paragraph links? - ApexDexterity - Oct 22, 2016 Hi everyone. Im totally new to html, but i've been giving it a go these last few weeks. I'm just playing around and seeing what's possible to do. I've run into a problem I hope you can help with. I've made 3 mail links and placed them in a div called "color" and made it a class. For 2 of the links I made them paragraphs and 1 I just kept a normal link. In my CSS file i've said that I want all 3 links to have bold text and I only want the paragraph mail links to be green... BUT what actually happens is: The paragraph links get bold text, but the paragraph links get no color.. Can you guys help me out? Thanks in advance 😉 HTML Source: <!DOCTYPE html> <html lang="en"> <meta charset="utf-8"> <link rel="stylesheet"type="text/css"href="style color.css"media="screen"> <head> <title>TAB</title> </head> <body> <div class="color"> <p><a href="mailto: [email protected]"> email contact 1</a></p> <p><a href="mailto: [email protected]">email contact 2</a></p> <a href="mailto: [email protected]">email contact 3</a> </div> </body> </html> CSS Source: .color p{ color: green; font-weight: bold;} * - Rushax - Oct 22, 2016 It's just some inherit issues you have. If all of the links need to be bold then you'd need to specify that separately in the CSS like so: Code .color a{Code .color p a{* - ApexDexterity - Oct 22, 2016 thank you so much! It's been annoying me for a while. I didn't know you could specify your css classes that way. * - Rushax - Oct 22, 2016 (Oct 22, 2016 10:51 AM)ApexDexterity Wrote: thank you so much! It's been annoying me for a while. I didn't know you could specify your css classes that way. Not a problem, guess you learn something new everyday :) |