voodoo Posted January 8, 2006 Share Posted January 8, 2006 Like, say this:target:windowtarget:parenttarget:selftarget: frame nametarget:tabI think that would be perfect, so you could do something linka.external {target:window}or body {target:tab}or if you wanted every link in a frame to not open a new window...frame,iframe {target:self}Plus when IE 7 releases, all browsers with full support of css will also include tabs.Who agrees? Link to comment Share on other sites More sharing options...
Eric Posted January 9, 2006 Share Posted January 9, 2006 You could suggest this to the W3C if you wanted: http://lists.w3.org/Archives/Public/www-style/They have an email address there where you can contact them.Although I don't think they would add this to a new version of CSS anytime soon, mainly because W3C doesn't like targets They've been not allowed in all "Strict" versions of HTML. Link to comment Share on other sites More sharing options...
F-Man Posted January 9, 2006 Share Posted January 9, 2006 CSS is for style only. Browser behaviour is for DOM scripting. Link to comment Share on other sites More sharing options...
aspnetguy Posted January 9, 2006 Share Posted January 9, 2006 BTW the target attribute has been depreciated in XHTML...I doubt they will bring it back just because you ask...you have to do this through JavaScript now! Link to comment Share on other sites More sharing options...
Eric Posted January 10, 2006 Share Posted January 10, 2006 BTW the target attribute has been depreciated in XHTML...I doubt they will bring it back just because you ask...you have to do this through JavaScript now!<{POST_SNAPBACK}> But be careful of what type of JavaScript you're going to use. A lot of people rely on the window.open() JavaScript, but if a user has JS disabled in their browser than the link won't work at all.There are other JS methods that offer a type of "fallback" incase the user does have JS disabled Link to comment Share on other sites More sharing options...
DeathRay2K Posted January 10, 2006 Share Posted January 10, 2006 Actually, you're, sort of, in luck.CSS3 Target Properties Link to comment Share on other sites More sharing options...
F-Man Posted January 10, 2006 Share Posted January 10, 2006 (edited) Actually, you're, sort of, in luck.CSS3 Target Properties <{POST_SNAPBACK}> ...Wow.That's really shooting in accessibility's foot. Edited January 10, 2006 by F-Man Link to comment Share on other sites More sharing options...
Mimika Posted January 10, 2006 Share Posted January 10, 2006 Oohh nice this will come in handy Link to comment Share on other sites More sharing options...
aspnetguy Posted January 10, 2006 Share Posted January 10, 2006 But be careful of what type of JavaScript you're going to use. A lot of people rely on the window.open() JavaScript, but if a user has JS disabled in their browser than the link won't work at all.There are other JS methods that offer a type of "fallback" incase the user does have JS disabled <{POST_SNAPBACK}> if you do this it will still open if JS is disable, just not in a new window.<a href="somePage.html" onclick="window.open(this.href);return false;">Open me</a> Link to comment Share on other sites More sharing options...
aspnetguy Posted January 10, 2006 Share Posted January 10, 2006 ...Wow.That's really shooting in accessibility's foot.<{POST_SNAPBACK}> This is true, but we do need a dependable method other than javascript to ensure it will open in a new window regardless of the browser. Link to comment Share on other sites More sharing options...
Eric Posted January 10, 2006 Share Posted January 10, 2006 if you do this it will still open if JS is disable, just not in a new window.<a href="somePage.html" onclick="window.open(this.href);return false;">Open me</a> <{POST_SNAPBACK}> That's pretty cool, I've always been using this<a href='somepage.html' onclick="this.target='_blank';return true;">Open Me</a> Works the same way, it will still open if JS is disable, just not in a new window. Link to comment Share on other sites More sharing options...
Jonas Posted January 10, 2006 Share Posted January 10, 2006 Tomato, tomato, potato, potato...*realises that doesn't work in writing*Ah, you know what I mean... Link to comment Share on other sites More sharing options...
Guest riteon Posted February 23, 2006 Share Posted February 23, 2006 Actually, you're, sort of, in luck.CSS3 Target Properties <{POST_SNAPBACK}> This is my first post so please excuse my naievity!I have a little experience of CSS and would like to know how I can implement the code on the link in my webpage to allow a link to pop-up without using the conventional "_target" command. Would someone be able to assist me with this? I've been able to use the JS one but I would like to use the CSS one:-* { target-new: tab ! important }a[target],area[target],form[target] { target: attr(target,string) } a[target=_blank],area[target=_blank],form[target=_blank] { target: new }But I'm not sure how to "code it" Thanks in advanceRiteon Link to comment Share on other sites More sharing options...
boen_robot Posted February 23, 2006 Share Posted February 23, 2006 The link you see is CSS3 specification. None of the modern browsers supports it yet. This was shown to see what the (near?) future holds. For now, the way is JavaScript. Link to comment Share on other sites More sharing options...
mpoer Posted February 23, 2006 Share Posted February 23, 2006 It'll be nice to have a way to use targets again... I haven't used it in a long time, since i've used XHTMl 1.0 Strict. Although, more advanced users know to just middle click (FF & Opera users at least) for a new tab Link to comment Share on other sites More sharing options...
Jonas Posted February 23, 2006 Share Posted February 23, 2006 It'll be nice to have a way to use targets again... I haven't used it in a long time, since i've used XHTMl 1.0 Strict. Although, more advanced users know to just middle click (FF & Opera users at least) for a new tab <{POST_SNAPBACK}> You have a middle-click mouse? Wow, haven't seen one of those in a while... Hmm.In Opera I know you can use Shift + Click to open in a new tab (really a new window though, but a new window in Opera is essentially a new tab). That will also work in IE, but will really open a new window. Not so cool in IE.But then the problem isn't whether or not it's fast to open it in a new window, but if you want the user to have to open it in a new window sort of. Link to comment Share on other sites More sharing options...
mpoer Posted February 24, 2006 Share Posted February 24, 2006 You have a middle-click mouse? Wow, haven't seen one of those in a while... Hmm.In Opera I know you can use Shift + Click to open in a new tab (really a new window though, but a new window in Opera is essentially a new tab). That will also work in IE, but will really open a new window. Not so cool in IE.But then the problem isn't whether or not it's fast to open it in a new window, but if you want the user to have to open it in a new window sort of.<{POST_SNAPBACK}> put your finger on your mouse wheel and press down. :click:middle clicks are still around on modern computers... but if you're on thinktank (my IBM Thinkpad 600 circa 98ish), it's the blue button under the spacebar Link to comment Share on other sites More sharing options...
Jonas Posted February 24, 2006 Share Posted February 24, 2006 put your finger on your mouse wheel and press down. :click:middle clicks are still around on modern computers... but if you're on thinktank (my IBM Thinkpad 600 circa 98ish), it's the blue button under the spacebar <{POST_SNAPBACK}> When I put my finger on my mouse wheel and press down (as I have done several times before thank you ), I only get faster scrolling, not having to press any buttons and just moving the mouse. I get a picture over the mouse pointer that looks like a circle with an ^ and v arrow on it, and also < and > if there is sideways scrolling involved. Maybe it's a matter of mouse settings or something. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now