Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie

Fancy links..?..?

Options
  • 17-01-2003 1:13pm
    #1
    Closed Accounts Posts: 32


    I'm sorry if i missed this in a previous thread but time is not on my side as usual. Can anybody tell me how to create a webpage link with no underscore. I'm guessing that i write the text as an image and use that but i was wondering is there another way to do this please.

    Thank you for your time

    Prophet88


Comments

  • Banned (with Prison Access) Posts: 16,659 ✭✭✭✭dahamsta


    For one link:
    <a href="blah" style="text-decoration: none">blah</a>
    
    For the whole page (in the HEAD of the document):
    <style type="text/css">
    <!--
    a {
        text-decoration: none;
    }
    -->
    </style>
    
    adam


  • Users Awaiting Email Confirmation Posts: 15,001 ✭✭✭✭Pepe LeFrits


    I've made up my CSS sheet for a page's standard font size, colour, hover etc. However, is it possible to contain two different sets of font style (eg, one for a dark background, one for a light) in 1 CSS sheet for the page, and then be able to specify on each link that doesn't use the standard font settings to use the alternate ones ?

    I've been trying to do the style stuff individually for each link that needs to be different like
    <a href="blah.php" style="color: #FFFFFF">
    But I can't change the hover colour for it.

    ?


  • Registered Users Posts: 2,119 ✭✭✭p


    Yep

    You have to define a class or an id.

    Here's and example:

    stylesheet.css
    
    #content a{
      text-decoration: none;
      color: red;
    }
    
    #navbar a{
      text-decoration: none;
      color: black;
    }
    

    In your html page you'd have something like this.
    <span id="content">
    Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam
    </span>
    
    <span id="navbar">
    <a href="1.html">One</a>
    <a href="1.html">One</a>
    <a href="1.html">One</a>
    <a href="1.html">One</a>
    </span>
    
    

    Obviously you'd have all your usual crap around that. But that's the basic principle. You define an id using # and then apply it to an area. and then styles will just be applied ot that area.

    To change the hover colour of an element you need to use 'a:hover'.

    - Kevin

    for more info check out www.w3schools.com


  • Closed Accounts Posts: 7,563 ✭✭✭leeroybrown


    .menulink:hover {
            color: #CCCCCC;
            background-color: transparent;
            font-style: normal;
            font-weight: bold;
            font-size: 10pt;
            text-decoration: underline;
    }
    
    .nolink,.nolink:visited {
            color: #000000;
            background-color: transparent;
            font-style: normal;
            font-weight: normal;
            text-decoration: none;
    }
    

    This example creates a "class" which causes the link to be displayed by an underline when hovered over.
    <a class='nolink' href='link_location'>Link</a>
    


  • Closed Accounts Posts: 32 prophet88


    Thanks for your help guys, i appreciate your time..

    Prophet88


  • Advertisement
  • Closed Accounts Posts: 9,314 ✭✭✭Talliesin


    Do make sure that it's clear that it's a link.

    The ability to not underline links has brought the pain of myster-meat navigation to text as well as image links.

    Personally I have a client CSS set up to underline the links no matter what the site's CSS says. But even that doesn't work sometimes :(


Advertisement