tims15
03-30-2005, 05:55 AM
When I create a link what is the easiest way to change its colour or not have it underlined etc?
|
Click to See Complete Forum and Search --> : Links tims15 03-30-2005, 05:55 AM When I create a link what is the easiest way to change its colour or not have it underlined etc? ffurnai 03-30-2005, 06:25 AM add some style to it! <head> <style> <!-- a:link { text-decoration: none; color: #CCC; } a:visited { color: #999; } a:hover { color: #fff; background: #000; } --> </style> </head> hope that helps! tims15 03-30-2005, 06:32 AM Thanks... in my ignorance where do I put the link? (As you can tell, my knowledge is limited!) DaveSW 03-30-2005, 06:40 AM well it all depends how you are making your pages... If you're being big and brave and writing it by hand, then your code looks like: <a href="page.html">descriptive link text</a>. That goes between the <body> and </body> tags. If you're using a graphical editor like dreamweaver, frontpage, or dare I say it Microsoft Word, you need to find the 'insert hyperlink' button. tims15 03-30-2005, 06:45 AM So the code before goes in the head tags and changes all the hyperlinks in the page (im being big and brave!) the tree 03-30-2005, 09:50 AM Well yes, although you could make it change only certain links a certain way :) <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"> <html lang="en"> <head> <title>A Page</title> <style type="text/css"> <!-- body{ background-color: #fff; color: #222; } a { //applies to every 'a' tag text-decoration: none; color: #f00; } a.uber{ // applies to 'a' tags with the uber class color: #0f0; } a:hover{ // applies to 'a' tags that are being hovered over text-decoration: underline; } --> </style> </head> <body> <p>This text, contains some <a href="#">links</a> such as <a href="#">this one</a>; but <a href="#" class="uber">this link</a> is special.</p> </body> </html> webdeveloper.com
Copyright Internet.com Inc., All Rights Reserved. |