The Most Active and Friendliest
Affiliate Marketing Community Online!

“Adavice”/  “1Win

Font colour in hyperlinks - a question

Candeleena

New Member
affiliate
Hi everyone, I hope somebody can give me other help than "it's impossible, you can't do that in html"

I have a site with a template that is built on a table with one editable region. The table (containing a menu and some logos) is blue and fonts are white, and the editable region is white with - guess - blue fonts. I am supposed to use these two colours because they are elements of corporate visual identification system. I am also supposed not to use more colours, as there are colourful logos on the template already and it must not be too colourful, with different font colours etc.

So I chose the fonts in the template to be white, with visited links and active links to be white too. They are visible because they are underlined.

I discovered that in the editable region the links also appear in white, ona white background (cool!)'

So I added <text="#004E91" link="#004E91"> right behind background colour for the editable region, but it just doesn't work.

The question is: can I have different colours for links in different places of a template? How?
 
So I added <text="#004E91" link="#004E91"> right behind background colour for the editable region, but it just doesn't work.

The question is: can I have different colours for links in different places of a template? How?

Yes, you can have different colors for links in different places of a template. For links contained in normal HTML elements, use following code :

CSS Code
Code:
<style type="text/css">
    a:link {
       color: green;
    }  
    
    a:visited {
       color: red;
    }
    
    a.slink:link {
      color : black;
    }
    
    a.slink:visited {
      color: red;
    }
  </style>

(X)HTML Elements
Code:
<a href="/link1">link1</a>
<a href="/link2" class="slink">link2</a>

But it looks like you're using some kind javascript rich text editor and without knowing which one it is, i won't be able to help you much.
 
Hi, thanks! I already lost hope that someone will answer.
The thing is:

1) where exactly do I paste this code?
2) I need white and blue, so can you please translate these codes for me?
what does 'slink' stand for? Where should I have white, and where blue?
3) what shall I do with the html elements, paste them in, too? or instead?

I'm using Dreamweaver which does the hard work for me, and know very little about codes. But I'm learning!
 
1) The CSS code box should go somewhere between <head> and </head>

2) White should be #FFFFFF and Blue #0000FF (the first two numbers after the # refer to the amount of red in a color, the second two refer to the amount of green, and the last two refer to blue - they go in hex, which is 0 to 16 (0,1,2,3,4,5,6,7,8,9,A,B,C,D,E,F)

3) 'slink' is a name of called a class. Rather than type exactly the same information for every link on the page as to their colour and style, you can give them a name, so if you want to change it you can only change it once in the CSS

4) What you have to do is for every link you want white you put <a href="/pagelink.html">linktext</a> and for any blue link, put <a href="/pagelink.html" class="slink">linktext</a> (with "pagelink.html" and "linktext" being replaced with your page to link to and what you want your linked text to be respectively).
 
I think rhyswynne answered your questions pretty well, if you still have any doubts let me know.

By the way here's the CSS code modified to you needs :

Code:
<style type="text/css">
    a.slink:link {
      color : #FFFFFF;
    }
    
    a.slink:visited {
      color: #0000FF;
    }
  </style>

for every link you want to be white, put class="slink" attribute in its anchor tag. For example :

Code:
  <a href="http://www.google.com" class="slink">Google</a>
 
Last edited:
Thank you for the explanation. But that would mean I would have to actually WRITE the code every time I make a link. When I work on Dreamweaver, I simply highlight the text I want to lead somewhere, write the address ina special window at the bottom of the screen and I want it to happen AUTOMATICALLY, that the links on blue background are white, and they are blue on the white background.

I made a template with two background colours, but it is only possible to set the font colours and link colours once, for the whole template. There is no special 'advance mode' for setting the colours separately for different backgrounds.

My question probably should have been: how to do it in Dreamweaver in a way that would let me avoid writing the code manually avary time I want a link?
 
Yes, it can be done. But to tell you how to do it, i'd need to see the CSS rules you are currently using. I don't have access to dreamweaver software and have never even used it before, so can't really say if it uses separate CSS files to store CSS style rules or not. If it does then upload your CSS file here (files with .css extension), otherwise your html file and i'll show you you how to do it.
 
Thank you for your readiness to help. But I decided this is too far beyond my capabilities and asked a geek friend for help. I try to avoid asking him too often because it usually turns out I owe him a beer, or a crate of beer and I might easily go bankrupt in the process.
Now the code of my template contains a lot of 'style' and 'class' (it used to be just html) and my links are in the desired colours.

:rockon:

By the way, does anybody know a very simple way of securing one sub-page with a password?
 
By the way, does anybody know a very simple way of securing one sub-page with a password?

Yes, depends on what you want use to secure the subpage. If you use apache as your web server then you can use basic apatache authentication, you can also use php or asp depending on your hosting platform.
 
I feel very stupid but I have no idea what web server I use - it's company server and I just upload to it. Is there a way to check?

Is it possible just to use a piece of html code? something with <password>tomato</password>? or something of similar difficulty?
 
Is it possible just to use a piece of html code? something with <password>tomato</password>? or something of similar difficulty?

No, there is no such facility in html. Give me the url of your company's website which is hosted on the same server, i'll try to find out which server or platform it is using or alternatively your can ask your company's tech support.
 
banners
Back