Results 1 to 7 of 7

Thread: href that is not underlined??

  1. #1
    Join Date
    Sep 2004
    Posts
    19
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default href that is not underlined??

    Is there script that makes text with links show without the underline???
    Also is it possible to change the colour of the text when the cursor rolls over it?
    Thanks.
    Last edited by tacbob; 10-12-2004 at 10:08 AM.

  2. #2
    Join Date
    Sep 2004
    Location
    Little Falls, Roodepoort, South Africa
    Posts
    421
    Thanks
    4
    Thanked 1 Time in 1 Post

    Default

    HI

    Simply highlight the hyperlink text and use standard tools to take off underline and change font. To change the font on mouseover try the following:

    onmouseout="FP_changePropRestore()" onmouseover="FP_changeProp(/*id*/'id50',1,'style.color','#000080')">

    rgds,Simon

  3. #3
    Join Date
    Sep 2004
    Posts
    19
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Simon.

    In Dreamweaver I highlight the text, choose to underline it then take it off but it makes no difference?????

    Thanks

  4. #4
    Join Date
    Aug 2004
    Location
    Brighton
    Posts
    1,563
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Use this:

    <a href="link"><span style="text-decoration: none">text for link</span></a>

    cr3ative
    A retired member, drop me a line through my site if you'd like to find me!
    cr3ative media | read the stickies

  5. #5
    Join Date
    Sep 2004
    Location
    UK
    Posts
    26
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    You can use CSS well here, just put this in your <head> section:

    Code:
    <style type="text/css">
    a:link
    { color: #0000FF; text-decoration: none } 
    a:active 
    { color: #0000FF; text-decoration: none } 
    a:visited 
    { color: #0000FF; text-decoration: none } 
    a:hover 
    { color: #FF0000; text-decoration: none }
    </style>
    That will change all the links on your page (that don't have IDs, classes or styles that contradict). You can probably see it has 4 states for all the links (link (unvisited), active, visited and hover), so you can change the code as much as you want to suit you. If you wanted to change more attributes such as color and text-decoration, just do a google and you should find lists of what you can use.

    (Note: If you wanted to keep the above code as it is, you could write it:
    Code:
    <style type="text/css">
    a:link,a:active,a:visited
    { color: #0000FF; text-decoration: none } 
    a:hover 
    { color: #FF0000; text-decoration: none }
    </style>
    )

    If you only want certain links modified, or you want specific links to have different attributes, you can use CSS classes:
    Code:
    <style type="text/css">
    a.other:link,a.other:active,a.other:visited
    { color: #000000; text-decoration: none } 
    a.other:hover 
    { color: #00FF00; text-decoration: underline }
    </style>
    Then you can change the links you want to change to: <a class="other" href="[whatever]">Link</a>

    Or if you want to just stop one link from having underlines, use: <a style="text-decoration: none" href="[whatever]">Link</a>

  6. #6
    Join Date
    Sep 2004
    Posts
    19
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    ODIN.

    Thanks for that, now i understand. Did you see my message regarding onfocus="this.blur()" removes active link colour . Any ideas? Is anything conflicting? Now that I have the CSS code in place that sets the styles of the links etc, should I remove the stuff from the general 'page properties' I used in Dreamweaver - i.e colours etc of 'links', 'active links', 'visited pages' etc etc.

    Thanks

  7. #7
    Join Date
    Sep 2004
    Location
    UK
    Posts
    26
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    onfocus="this.blur()" depends really on the browser. If you're using IE, the link won't be able to get an active state and won't show the colour, so you have to pick one or the other. Firefox just flickers the active colour when clicked, as opposed to IE which keeps the link active until the next page loads, and this conflicts with the hover colour which takes priority over it. Just for reference, Firefox does show the active colour (even if a hover colour is set) when you right click on a link though.
    So in IE you'd have to sacrifice this.blur or the active colour, and in Fx you'd have to sacrifice the hover colour to show them both.

    And yeah, you won't really need the <body> link attributes now (CSS takes priority over them anyway), you may aswell remove them.

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
  •