New window using css

I

Isidore

I have a group of pages that are indexes of links to other page. Is
it possible to use css to make any link on one of these pages open in
new browser?

What about if you also want some of those links (nav bar links) NOT
to open in a new browser?

Thanks in advance,
Isidore
 
M

Mitja

Isidore said:
I have a group of pages that are indexes of links to other page. Is
it possible to use css to make any link on one of these pages open in
new browser?

CSS is about style, so no, you can't do it.

You can, however, use the link's target property and set it to "_blank". If
this is the desired behavior most of the time, have a look at the <base>
tag.

Opening new windows is in most cases not advised, however. It confuses the
less experienced and infuriates the others.
What about if you also want some of those links (nav bar links) NOT
to open in a new browser?

Again, have a look at the "target" attribute and, optionally, at the "base"
tag.
 
A

Arondelle

Mitja said:
Opening new windows is in most cases not advised, however. It confuses the
less experienced and infuriates the others.

Not necessarily. If I were viewing a list of links, particularly a list
that I wanted to return to after viewing the subsequent link, I would
appreciate not having to reload the original page over and over, and
possibly lose it altogether if I were to get deeper into the link-to site.

People who use pop-up blockers simply short circuit the opening of new
windows. If they get angry, it's their own fault.

Of course, it's good design to consider whether or not opening a new
window is absolutely necessary beforehand. Lists of links, yeah.
Advertisements, yeah. Gallery items, possibly. Most every other
application, probably not.

Note: Not everyone is aware that (in Internet Explorer, anyway) one can
right-click on a link and force it to open in a new window, regardless
of the designer's wishes or ommissions.

Arondelle
 
D

David Dorward

Arondelle said:
Not necessarily. If I were viewing a list of links, particularly a list
that I wanted to return to after viewing the subsequent link, I would
appreciate not having to reload the original page over and over, and
possibly lose it altogether if I were to get deeper into the link-to site.

Your browser has an Open in New Window (and possibly an Open in New Tab)
option. You can exercise that option to get a new window whenever you want.

Techniques which force new windows on users don't make it easy for a user to
force the link to open in the same window.
Note: Not everyone is aware that (in Internet Explorer, anyway) one can
right-click on a link and force it to open in a new window

Not everyone will remain calm when the back button gets greyed out when they
follow a link.
 
K

Karl Groves

Arondelle said:
Not necessarily. If I were viewing a list of links, particularly a list
that I wanted to return to after viewing the subsequent link, I would
appreciate not having to reload the original page over and over, and
possibly lose it altogether if I were to get deeper into the link-to site.


Good for you. That's why all browsers have "Open in a new window" as an
option. Some *better* browsers can even facilitate tabbed browsing.
So YOU can retain control of your browsing experience.

The fact remains that most users hate new windows, are frustrated by them,
and can completely get lost with them.

-Karl
 
M

m

I have a group of pages that are indexes of links to other page. Is
it possible to use css to make any link on one of these pages open in
new browser?

What about if you also want some of those links (nav bar links) NOT
to open in a new browser?

XHTML strict has dropped
the target attribute from its specification.
This is because it breaks history to open a new window,
and this has accessibility consequences. If you are using
transitional versions you can use target at your own risk.

In any case, you can still use scripting
to open a new window:

<a
href="http://www.whatever.com"
onclick="window.open('http://www.whatever.com');
return false;"> THE LINK </a>
....which will be followed (in the same window)
even if the browser has JavaScript
turned off.

This can even be done if an image is used as the link:

<a href="x.jpg"
onclick="window.open('x.jpg','flowerwin','width=500, height=406'); return
false;"> <img src="images/1.jpg" width="50" height="41" alt="flower" />
<br />(Image opens in a new window.)<br /></a>

But I still consider it kludgy,
inaccessible, and uglier than a baby allegator.

Stay with the same window.
 
D

David Dorward

m said:
XHTML strict has dropped
the target attribute from its specification.

No. HTML 4.01 Strict dropped the target attribute. XHTML 1.0 is just HTML
4.01 expressed using XML rather then SGML.
This is because it breaks history to open a new window,
and this has accessibility consequences.

No. This is becuase the target attribute says nothing about the data or its
relationship to other data. (Which is not to say that the points you raise
are not good reasons to avoid new windows, just the reason for target not
appearing in Strict)
 
D

David Dorward

David said:
No. HTML 4.01 Strict dropped the target attribute.

Whoops - its more likely to be HTML 4.0 (which I haven't used) then 4.01
(the bug fix release for 4.0).
 
W

Webcastmaker

CSS is about style, so no, you can't do it.
You can, however, use the link's target property and set it to "_blank". If
this is the desired behavior most of the time, have a look at the <base>
tag.
Opening new windows is in most cases not advised, however. It confuses the
less experienced and infuriates the others.

A list of links is one of the places where I would consider _blank a
good idea. ESPECIALLY if you mentioned that at the top of the page
what is about to happen when they click on the link.
 
W

Webcastmaker

The fact remains that most users hate new windows, are frustrated by them,
and can completely get lost with them.

I think the fact is most users hate un-requested pop up windows.
There is a huge difference.
 
M

m

David said:
David Dorward wrote:




Whoops - its more likely to be HTML 4.0 (which I haven't used) then 4.01
(the bug fix release for 4.0).

'Whoops' happens when you hold yourself to too high a standard of
literalism; however, I'm willing to concede the first point -- about
'target' being dropped in HTML strict first -- if you also insist on '
holding me to the same standard.
 
M

m

David said:
No. This is becuase the target attribute says nothing about the data or its
relationship to other data.

This also appears to be a good reason for them to drop it. But I havn't
seen any documentation as to what was going through the minds of the
group that created the standard. It would make interesting reading.
 
N

Nameless Wildness

I have a group of pages that are indexes of links to other page. Is
it possible to use css to make any link on one of these pages open in
new browser?

Whatever anyone sais, don't do it! Such tags and scripts break the web
philosophy of letting the end user have control of the decision to,
for example, open a new window or tab depending on his browser and
platform. Whenever a webdesigner starts to "think for the user" he
usually fucks up browsing for a lot of people. Your job is to put
content up on the web so that people can view it and not force their
browser to do what you want it to do.

If you could give us a link to your page with the index of links then
together we can try to think of a better solution that works for
everyone...

Sincerely

- Ransu, the web crusader
 
A

Arondelle

Nameless said:
Whatever anyone sais, don't do it! Such tags and scripts break the web
philosophy of letting the end user have control of the decision to,
for example, open a new window or tab depending on his browser and
platform. Whenever a webdesigner starts to "think for the user" he
usually fucks up browsing for a lot of people. Your job is to put
content up on the web so that people can view it and not force their
browser to do what you want it to do.

If you could give us a link to your page with the index of links then
together we can try to think of a better solution that works for
everyone...

<rant>

Where is it written that everyone should subscribe to a specific "web
philosophy?" Who wrote this philosophy? What punishments will I incur
if I don't follow this philosophy? Please post a link.

It's like saying one should not post content unsuitable for children
under the age of 13 or use words of more than two syllables, and thus
bring the Web down to the lowest common denominator.

Whatever happened to writing to an audience? Why do I have to create
pages suitable for everyone? I bailed out of AOL because they had/have
so many content restrictions for material published on their servers.

I don't create pages for the mythical Everyone: No one *ever* ends up on
my site by accident. I have a specific target audience, and know what
they want, don't want and what they will put up with. For instance, a
large number of my audience are well-used to content appearing in new
windows, and some of them even open things in new windows by choice,
regardless.

(Not that I've taken the time to have things open in new windows, mind
you, but I dislike being told that I will somehow trigger the wrath of
God if I choose to.)

</rant>

Arondelle
 
N

Nameless Wildness

<rant></rant>

Simply what i mean by 'web philosophy' when it comes to html is being
nice and considerate to the people who you think view your pages
rather than try to think for them and impose things on them.

Now that you are free from AOL nobody is imposing anything on you by
reminding you that using non standard code will **** up browsing for a
lot people. And certainly if you don't care about such things than you
are bound to get the wrath of those people upon you.

- Ransu, the web crusader
 
A

Arondelle

Nameless said:
Now that you are free from AOL nobody is imposing anything on you by
reminding you that using non standard code will **** up browsing for a
lot people. And certainly if you don't care about such things than you
are bound to get the wrath of those people upon you.

Does bad html go out and screw up random browsers like a virus? I think
not. I use standard code 99.9% of the time because I'm not a
sufficiently skilled programmer to try to do anything cute, so the point
is moot.

Furthermore, if "those people" get wrathful, they won't come back and
I'll never know the difference. I'm not particularly worried about
people who wouldn't visit my site anyway.

I just want to know who the Coding Cops are, and if you're one of them.

Arondelle
 
B

brucie

in post: <
Arondelle said:
Where is it written that everyone should subscribe to a specific "web
philosophy?"

trying to annoy your visitors as little as possible is common sense, not
a philosophy.

it wasn't a very good one. i want to see much more swearing next time.
 
W

Webcastmaker

Whatever anyone sais, don't do it! Such tags and scripts break the web
philosophy of letting the end user have control of the decision to,
for example, open a new window or tab depending on his browser and
platform. Whenever a webdesigner starts to "think for the user" he
usually fucks up browsing for a lot of people. Your job is to put
content up on the web so that people can view it and not force their
browser to do what you want it to do.

<cough>horse shit</cough>

There are many uses for the web.
 
W

Webcastmaker

aron.delle3 said:
Where is it written that everyone should subscribe to a specific "web
philosophy?"
It's not
Who wrote this philosophy?
No one
What punishments will I incur
if I don't follow this philosophy?
Well depending on the goals and content of the site (say a site like
google) you could incur a loss of visitors. But each site is
different, so different things work on different sites.
Whatever happened to writing to an audience?
It is lost in the logic of some in this group. Some belive that no
one on the web can have a target audience, and that all websites
should be for all people. It is a waste of time arguing this point.
State you disagree, then let the thread die a simple death.
Why do I have to create
pages suitable for everyone?

You don't, but many in this group disagree. Let it die...
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,581
Members
45,055
Latest member
SlimSparkKetoACVReview

Latest Threads

Top