Welcome our webmaster and SEO forum
Please enjoy the forum, contribute what you can, and wind up the Moderators!
Closed Thread
Page 1 of 2 1 2 LastLast
Results 1 to 10 of 14

Thread: Font colour in hyperlinks - a question

  1. #1
    Candeleena is offline Junior Member Candeleena is on a distinguished road
    Join Date
    Mar 2008
    Posts
    19

    Default Font colour in hyperlinks - a question

    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?

  2. #2
    dman_2007 Guest

    Default

    Quote Originally Posted by Candeleena View Post
    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.

  3. #3
    Candeleena is offline Junior Member Candeleena is on a distinguished road
    Join Date
    Mar 2008
    Posts
    19

    Default

    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!

  4. #4
    rhyswynne's Avatar
    rhyswynne is offline Senior Member rhyswynne is on a distinguished road
    Join Date
    Nov 2007
    Posts
    378

    Default

    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).
    Enjoy Retro Games? Why not join my Retro Gaming Forum?

    Single? Join Our Dating Site For Bloggers

  5. #5
    dman_2007 Guest

    Default

    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 by dman_2007; 04-03-2008 at 04:18 PM.

  6. #6
    Candeleena is offline Junior Member Candeleena is on a distinguished road
    Join Date
    Mar 2008
    Posts
    19

    Default

    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?

  7. #7
    dman_2007 Guest

    Default

    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.

  8. #8
    Candeleena is offline Junior Member Candeleena is on a distinguished road
    Join Date
    Mar 2008
    Posts
    19

    Default

    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.



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

  9. #9
    dman_2007 Guest

    Default

    Quote Originally Posted by Candeleena View Post
    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.

  10. #10
    Candeleena is offline Junior Member Candeleena is on a distinguished road
    Join Date
    Mar 2008
    Posts
    19

    Default

    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?

Closed Thread
Page 1 of 2 1 2 LastLast

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

     

Bookmarks

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124