• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 502
  • Last Modified:

CSS Style for A tag, target="_blank"

I would like to add an effect to any link that opens target _blank.  I would prefer to use only CSS to do this, but all the help I have found is dated in 2004 or earlier.  I have to assume there is a way to do this with today's browsers (or at least IE7 and newer).

Is there a css funtion that can specifically attach to any a tag that has a target of _blank?
Idea of coding would be something like:

a target(_blank) {
     font-size: 16px;
}
0
mopar003
Asked:
mopar003
  • 2
1 Solution
 
Carl TawnSystems and Integration DeveloperCommented:
The following works in Chrome and Firefox, doesn't appear to work with IE though:

      a[target="_blank"] { font-size: 16px; }
0
 
Carl TawnSystems and Integration DeveloperCommented:
Correction, it also works in IE7 and IE8 as long as you're not in "quirks" mode.
0
 
DesignbyonyxCommented:
Just a note ( no need to give me credit for answering ) - the quotes are not necessary:

a[target=_blank]

And here is a great page describing everything you can do with "Attribute Selectors":

http://css-tricks.com/attribute-selectors/
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now