Results 1 to 2 of 2

Thread: <a> element

  1. #1
    Join Date
    Nov 2007
    Posts
    151
    Thanks
    67
    Thanked 0 Times in 0 Posts

    Default <a> element

    Hi,

    When I'm doing:
    PHP Code:
    <a href="#" style="padding:5px; margin:3px;"Hi </a
    it's working fine.

    but when I'm doing:
    PHP Code:
    <a href="#" id="my"Hi </a
    and in the css I write:
    PHP Code:
    #my a:link, #my a:visited {
    padding:5pxmargin:3px;

    It doesn't.

    what should I do?

  2. #2
    Join Date
    Sep 2008
    Location
    Seattle, WA
    Posts
    135
    Thanks
    1
    Thanked 11 Times in 11 Posts

    Default

    Try making it a class instead of id:

    .my a:link {
    padding:5px; margin:3px;
    }

    .my a:visited {
    padding: 5px;
    margin: 3px;
    }

    <a href="#" class="my">Hi</a>

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
  •