OriginalSunny Posted April 8, 2006 Share Posted April 8, 2006 Hi,I am using a html file to display the menu for my webpage. The problem i am having is that i cant seem to change the colours of my links. Here's the code. Can't see what i am doing wrong???<html><head><title></title></head><body background="file:///C|/Project/htdocs/blue.jpg" link="red"><img src="C:\Project\htdocs\Logo.jpg" height='100', width='150'><br><br><b><a href="Home.html" style="text-decoration:none" target="mainpage">Home</a><br><br>.....</body></html> Link to comment https://forums.phpfreaks.com/topic/6872-changing-the-colours-of-my-links/ Share on other sites More sharing options...
kenrbnsn Posted April 8, 2006 Share Posted April 8, 2006 This is not a PHP question, this should be posted in the HTML or CSS section. You should be using CSS style sheets to affect the output of your html.In the "<head>" section of your HTML, you can put:[code]<style>body { background: URL(file:///C|/Project/htdocs/blue.jpg); }a { color: red; text-decoration: none; }</style>[/code]Now you can have a plain "<body>" tag and no "style" clause in your "<a>" tag.BTW, with explicit references to files on your PC, this code will not work when uploaded to a server.Ken Link to comment https://forums.phpfreaks.com/topic/6872-changing-the-colours-of-my-links/#findComment-25020 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.