By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
425,696 Members | 2,213 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 425,696 IT Pros & Developers. It's quick & easy.

Style sheet specs of link opening behaviour (was: Validation: No attribute TARGET)

P: n/a
David Dorward <do*****@yahoo.com> wrote in message news:<bd*******************@news.demon.co.uk>...
Jan T. Kim wrote:
I don't understand why I get this message. According to the HTML 4.01
strict specification, there is a "target" attribute to the "a" element.
No it doesn't. Target is strictly for Frameset and Transitional.


Ok, thanks for pointing this out, it seems I haven't taken enough time to
look into the specs for the target attribute in sufficient detail.
Let your visitors decide when they want a new window:
http://diveintoaccessibility.org/day...w_windows.html


I've thought of this myself, but I would still like to indicate that I'd
rather open this link in a new window. So, I looked for a style sheet way
to specify this, but to no avail. Any pointers on this idea?

Greetinx, Jan
Jul 20 '05 #1
Share this Question
Share on Google+
2 Replies


P: n/a
jt***@web.de (Jan T. Kim) wrote:
David Dorward <do*****@yahoo.com> wrote in message news:<bd*******************@news.demon.co.uk>...
Let your visitors decide when they want a new window:
http://diveintoaccessibility.org/day...w_windows.html
I've thought of this myself, but I would still like to indicate that I'd
rather open this link in a new window.


<a title="I'd like you to open this link in new window"
href="foo">link</a>
So, I looked for a style sheet way to specify this, but to no avail. Any pointers on this idea?


CSS can be used to indicate that link is different (e.g. that you'd
like it to be opened in a new window) by changing colours, etc. As
some popular browsers don't support attribute selectors you're best
bet is to set a class on all those links. More advanced browsers
support generated content and would allow you to place a small icon
before or after every such link.

Steve

--
"My theories appal you, my heresies outrage you,
I never answer letters and you don't like my tie." - The Doctor

Steve Pugh <st***@pugh.net> <http://steve.pugh.net/>
Jul 20 '05 #2

P: n/a
In article <d7**************************@posting.google.com > in
comp.infosystems.www.authoring.html, Jan T. Kim <jt***@web.de>
wrote:

[about opening links in a separate window whether the user wants to
or not]
I've thought of this myself, but I would still like to indicate that I'd
rather open this link in a new window. So, I looked for a style sheet way
to specify this, but to no avail.


This isn't really a CSS kind of issue. CSS is about presentation:
layout, type face and size, that kind of thing. It's not about
taking actions.

What you _can_ do is suggest in your text that users open the link
in another window. Or you can make the link be Javascript, which
means that JS users will (probably) see it in a separate window but
it will be unavailable to the rest of us. Or you can relax and
accept the fact that users are better at figuring out their
individual preferences than authors are.

--
Stan Brown, Oak Road Systems, Cortland County, New York, USA
http://OakRoadSystems.com/
HTML 4.01 spec: http://www.w3.org/TR/html401/
validator: http://validator.w3.org/
CSS 2 spec: http://www.w3.org/TR/REC-CSS2/
validator: http://jigsaw.w3.org/css-validator/
Jul 20 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.