Jump to content


Changing the colours of my links.

  • Please log in to reply
1 reply to this topic

#1 OriginalSunny

  • Members
  • PipPipPip
  • Advanced Member
  • 95 posts

Posted 08 April 2006 - 11:44 AM

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???



<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>



#2 kenrbnsn

  • Staff Alumni
  • Advanced Member
  • 8,235 posts
  • LocationHillsborough, NJ, USA

Posted 08 April 2006 - 01:17 PM

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:
body {
         background: URL(file:///C|/Project/htdocs/blue.jpg);
a {
    color: red;
    text-decoration: none;
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.


0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users