PDA

View Full Version : Define default A targets with CSS?


Richard
06-09-2003, 10:47 AM
Is there a way in CSS to define the default target for links?

So I want all links on my pages to open in a new window or something, I can set that without editting every link and pasteing in target="_blank" ? But also links which already have a target will not be altered.

brothercake
06-09-2003, 12:01 PM
No there isn't; there's a <base target> element but it's deprecated in HTML 4. Indeed, in XHTML the target attribute has gone completely; the reason is that links shouldn't open new windows.

ronaldb66
06-10-2003, 11:54 AM
the reason is that links shouldn't open new windows... unless the user choses to, yes.
The target attribute is gone in XHTML 1.0 strict, but it's still maintained in frames, for obvious reasons.