SitePoint Sponsor

User Tag List

Results 1 to 5 of 5
  1. #1
    ...
    Join Date
    Jan 2002
    Location
    London, UK
    Posts
    759
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Changing Link (a) style without class?

    Hi All,

    Im using a feature within PHPadsnew to display a text link under a 468x60 banner - the trouble is im trying to change the style of the link (currently matches all plain links within the site ie. links with no class assigned) and can't for the life of me figure out where to add a class to this text link within the source code of Phpadsnew.

    Is there a way to change the style on a link outside of using a.someclass:link { } either through a p tag or td ?

    thanks, appreciate any help you can suggest on this.

  2. #2
    Drupaler bronze trophy greg.harvey's Avatar
    Join Date
    Jul 2002
    Location
    London, UK
    Posts
    3,258
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Don't think so mate. So far as I'm aware, the <a> tag ignores colour instructions, etc., unless they're specifically directed at it.

    However, if you have a default class for the <a> tag, a second class will override it if applied to a specific <a> tag (eg: <a href="#" class="someclass"> ). Don't know if this is good practice though!

  3. #3
    ...
    Join Date
    Jan 2002
    Location
    London, UK
    Posts
    759
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hey alright Gregster!

    hmmm oh well, back to the text editor to find that link.

    cheers!

  4. #4
    SitePoint Wizard
    Join Date
    Mar 2002
    Location
    Bristol, UK
    Posts
    2,240
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    If the link is the only link inside a DIV, then you can add this to your css:

    #divname a {
    color: #F00;
    }

    and it should change the colour just for the link(s) in that DIV

    Could also be used with TDs etc.

    -Sam
    Sam Hastings

  5. #5
    ...
    Join Date
    Jan 2002
    Location
    London, UK
    Posts
    759
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Sam, just gave that a try with:

    td.banner a {
    color: #ff0000
    }

    and a few variations without any joy.

    doesn't look like there's a way of doing this.


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
  •