Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 4 of 4
  1. #1
    New Coder
    Join Date
    Oct 2002
    Location
    California
    Posts
    98
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Question with CSS link styles...

    My current style sheet makes all links the same style...is there any way to make two seperate styles for links? And how would I implement them?

    <a href="someURL">Hello</a>

    would it be...

    <a href="someURL" style=XXXX>Hello</a>

    ???

    I'm lost

  • #2
    Senior Coder
    Join Date
    Jun 2002
    Location
    The Netherlands, Baarn, Ut.
    Posts
    4,253
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Sure!

    Nick,

    definitely; you can use the style attribute to add a style to one specific link, or use any of the selector mechanisms available in CSS to assign styles to a certain group of links.

    An example using a class selector:

    a.mylink {color: black; text-decoration: none}

    in the style sheet and

    <a class="mylink" href="foo.htm">Foo</a>

    in the page will show this link, and in fact all links using this class, in black without underlining.

    An example using an inline style for one specific link:

    <a style="color: red" href="bar.htm">Bar</a>

    will show this one link in red.
    Regards,
    Ronald.
    ronaldvanderwijden.com

  • #3
    Senior Coder
    Join Date
    Jun 2002
    Location
    The Netherlands, Baarn, Ut.
    Posts
    4,253
    Thanks
    0
    Thanked 0 Times in 0 Posts

    CSS!

    By the way, wrong forum again...
    Regards,
    Ronald.
    ronaldvanderwijden.com

  • #4
    New Coder
    Join Date
    Oct 2002
    Location
    California
    Posts
    98
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Lightbulb

    ooooo sorry bout that, didn't see the other forums

    Thanks for your help, that will assist me greatly!


  •  

    Posting Permissions

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