SitePoint Sponsor

User Tag List

Results 1 to 3 of 3
  1. #1
    SitePoint Guru DeNasio's Avatar
    Join Date
    May 2001
    Posts
    830
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Changing link color in the <body> tag

    Is it possible to change the link, active link and visited link colors in the <body> tag? Something like this <body style=" ...... "> ?
    Ballot-Box.net - free polls for webmasters
    FormLog.com - free form processor

  2. #2
    Function Curry'er JimmyP's Avatar
    Join Date
    Aug 2007
    Location
    Brighton, UK
    Posts
    2,006
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Nope, it's not possible to do within the body's style attribute.

    Why can't you specify it elsewhere, like in the StyleSheet?
    James Padolsey
    末末末末末末末末末末末末末末末末末末末
    Awesome JavaScript Zoomer (demo here)
    'Ajaxy' - Ajax integration solution (demo here)

  3. #3
    Programming Team silver trophybronze trophy
    Mittineague's Avatar
    Join Date
    Jul 2005
    Location
    West Springfield, Massachusetts
    Posts
    17,227
    Mentioned
    194 Post(s)
    Tagged
    2 Thread(s)
    You can style links with CSS the same as for other tags. By using tag selectors
    a
    a:visited
    a:hover
    a:active

    But be careful, the "default" style is what most users expect of links, and changing them can have negative consequences (if they aren't recognized as links, they won't get clicked).

    HTML Code:
    <html><body>
    <a href="" style="color: #000;text-decoration: none;">
    link that won't get clicked
    </a>
    </body></html>


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
  •