Thread: CSS Dilemma

    #1
  1. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jul 2003
    Posts
    203
    Rep Power
    12

    CSS Dilemma


    Hi Everyone,

    I was wondering if CSS supports the target attribute which is used with the anchor tag. That way if you have the same target in multiple anchor tags you only have to change it in one place. For example, target="_parent". Now if this used in five anchor <a> tags then you only have to set it in CSS once. If it exists. Does any one know the syntax for the target attribute if it exists in CSS?

    Thanks in advance,

    Val
  2. #2
  3. I'm just an IF statement
    Devshed Newbie (0 - 499 posts)

    Join Date
    Dec 2003
    Posts
    400
    Rep Power
    11
    css doesnt support that. CSS is only for layout and design. If u want to only have to change something in one place, i would suggest using php.
    "In a way, we're dead already"
  4. #3
  5. Contributing User
    Devshed Intermediate (1500 - 1999 posts)

    Join Date
    Oct 2001
    Location
    New Zealand
    Posts
    1,774
    Rep Power
    24
    You could always use:

    Atags = document.getElementsByTag("a")
    for (x = 0; x < Atags.length; x++) {
    Atags[x].target = "_parent"
    }

    Or something to that effect to change an attribute of all the 'a' tags.

IMN logo majestic logo threadwatch logo seochat tools logo