Re: [WSG] Conditional Comments question

2005-10-21 Thread Thierry Koblentz
Janelle Clemens wrote:
 I have a question about conditional comments.   I have heard so much
 about them especially in the last discussion about Set min-width
 using DOM but have never used them.   We have always used a
 javascript style sniffer to determine which browser the viewer is
 using.   However when javascript is turned off the site looks pretty
 nasty.   Does conditional comments still work if js is turned off?
 And is this a better way to go than a javascript style sniffer?
 What do you do for browsers like mac ie if you don't want it to use
 the style sheet.   With the sniffer I can tell it to use our
 nostyle.css file.

CCs are evil for some and the best thing since sliced bread for others.
The good think with JS sniffing is that I believe eveybody agree that it is
a bad thing ;)

http://www.tjkdesign.com/articles/branching.asp
/plug

Thierry | www.TJKDesign.com

**
The discussion list for  http://webstandardsgroup.org/

 See http://webstandardsgroup.org/mail/guidelines.cfm
 for some hints on posting to the list  getting help
**



Re: [WSG] Conditional Comments question

2005-10-21 Thread Mark Harris

Janelle Clemens wrote:

I have a question about conditional comments.   I have heard so much
about them especially in the last discussion about Set min-width using
DOM but have never used them.   We have always used a javascript style
sniffer to determine which browser the viewer is using.   However when
javascript is turned off the site looks pretty nasty.   Does conditional
comments still work if js is turned off?And is this a better way to
go than a javascript style sniffer?   What do you do for browsers like
mac ie if you don't want it to use the style sheet.   With the sniffer I
can tell it to use our nostyle.css file.   
 
Until recently, I worked for the NZ Govt. We have rules about displaying 
macrons in Maori using unicode. We also have rules about sites being 
usable with JavaScript turned off. Some browser/OS combinations don't do 
Unicode at all (notably on Mac pre-OSX), so we knew we'd have to detect 
those exceptions and return them a page without macronised characters. 
As we couldn't use JavaScript to do the sniffing (plus that would have 
made all the pages cumbersome), we set the filter (on the www.govt.nz 
site at least) at the server level using mod_perl on an Apache server 
and a growing black list as we discovered new browser/OSes that didn't 
do Unicode .


Other sites, running on IIS (ptui) use modified dlls to achieve the same 
thing (although I think you can now run PERL on IIS (happy to be 
corrected on that.


I can't tell you the technical details as I am not that sort of geek ;-) 
but Daniel Bar-Even at Signify *is* that sort of geek and has published 
a page at http://www.signify.co.nz/macronfilter/ about how he did it.


Surely, the same sort of server level approach could be used to sniff 
out the browsers that won't do what you want and serve a different CSS 
sheet to them?


James Ellis made an excellent comment the other day that echoes what 
I've been telling my business users for years - it won't look the same 
in different browsers on different platforms, so get over that and 
concentrate on getting pages that work in all browsers and all platforms 
to deliver the business need.


cheers

Mark Harris
**
The discussion list for  http://webstandardsgroup.org/

See http://webstandardsgroup.org/mail/guidelines.cfm
for some hints on posting to the list  getting help
**



Re: [WSG] Conditional Comments question

2005-10-21 Thread Al Sparber

Janelle Clemens wrote:

I have a question about conditional comments.   I have heard so much
about them especially in the last discussion about Set min-width
using DOM but have never used them.   We have always used a
javascript style sniffer to determine which browser the viewer is
using.   However when javascript is turned off the site looks pretty
nasty.   Does conditional comments still work if js is turned off?
And is this a better way to go than a javascript style sniffer?
What do you do for browsers like mac ie if you don't want it to use
the style sheet.   With the sniffer I can tell it to use our
nostyle.css file.


Hi Janelle,

Conditional Comments are a feature built into IE Windows (v5.0 and 
higher). They do not require JavaScript to run. We no longer sniff for 
browsers. We make sure our pages are going to work in modern browsers 
and then we correct for IE Windows via CSS delivered through 
Conditional Comments. We import our style sheets to prevent old 
browsers from seeing them. The only other browser we sometimes throw a 
hack in for is IE5 Mac - but very rearely do we need to.



Al Sparber - PVII
http://www.projectseven.com
DW Extensions - Menu Systems - Tutorials - CSS FastPacks
-
Webdev Newsgroup: news://forums.projectseven.com/pviiwebdev/
CSS Newsgroup: news://forums.projectseven.com/css/
RSS/XML Feeds: http://www.projectseven.com/xml/




**
The discussion list for  http://webstandardsgroup.org/

See http://webstandardsgroup.org/mail/guidelines.cfm
for some hints on posting to the list  getting help
**



Re: [WSG] Conditional comments

2005-01-19 Thread Wayne Godfrey
 I'm pushing transparency to IE this way:
 
 #logo {
  background: url('img/logo.png') no-repeat;
 }
 
 * html #logo {
  background: none;
  filter: 
 progid:DXImageTransform.Microsoft.AlphaImageLoader(src='img/logo.png',sizingMe
 thod='scale');
 }
 
Does this really work on IE? Can I really use transparency in my PNG-24 and
have IE display it? Or is there some hidden catch?

w

--
Wayne Godfrey
President, Creative Director
Outgate Media, Inc.

[EMAIL PROTECTED]
--


**
The discussion list for  http://webstandardsgroup.org/

 See http://webstandardsgroup.org/mail/guidelines.cfm
 for some hints on posting to the list  getting help
**



Re: [WSG] Conditional comments

2005-01-19 Thread JohnyB
Does this really work on IE? Can I really use transparency in my PNG-24 and
have IE display it? Or is there some hidden catch?
It is used so here: http://dev.alphanumeric.cz/webspace -- there are 
some gotchas, like making the whole block transparent, so it's not to 
possible to click on it if it's an anchor etc., so some further 
adjustments are needed :(

--
Jan Brasna :: alphanumeric.cz | webcore.cz | designlab.cz | janbrasna.com
Stop IE! - http://www.stopie.com/ | http://browsehappy.com/
**
The discussion list for  http://webstandardsgroup.org/
See http://webstandardsgroup.org/mail/guidelines.cfm
for some hints on posting to the list  getting help
**


Re: [WSG] Conditional comments

2005-01-19 Thread Kornel Lesinski
Does this really work on IE? Can I really use transparency in my PNG-24  
and
have IE display it? Or is there some hidden catch?
There are several catches.
http://dean.edwards.name/IE7/notes/#PNG
--
regards, Kornel Lesiski
**
The discussion list for  http://webstandardsgroup.org/
See http://webstandardsgroup.org/mail/guidelines.cfm
for some hints on posting to the list  getting help
**


Re: [WSG] Conditional comments

2005-01-19 Thread Wayne Godfrey
On 1/19/05 6:42 PM, Kornel Lesinski [EMAIL PROTECTED] wrote:

 Does this really work on IE? Can I really use transparency in my PNG-24
 and
 have IE display it? Or is there some hidden catch?
 
 There are several catches.
 http://dean.edwards.name/IE7/notes/#PNG

Okay, this is a logo with some transparency drop shadows (in black) that
sits atop my background header image. The logo is my clickable link back to
home and is 325px wide by 90px. It worked decently everywhere except IE/win.
I ended up rebuilding the header since I didn't want to mess with hacks,
java scripts etc. If this would work, it would make my life a lot easier.

w

--
Wayne Godfrey
President, Creative Director
Outgate Media, Inc.

[EMAIL PROTECTED]
--


**
The discussion list for  http://webstandardsgroup.org/

 See http://webstandardsgroup.org/mail/guidelines.cfm
 for some hints on posting to the list  getting help
**



Re: [WSG] Conditional comments

2005-01-18 Thread Charlie Barr
How does one go about doing this?
Mordechai Peller has created a disturbance in the Force.
I felt its presence on 1/6/2005 7:13 PM.
Its substance was as follows:
Actually, with the help of filters, IE can render PNGs properly. With 
that in mind, you can use JavaScript in the header to set a cookie and 
then have the server check for that cookie. Then if IE caught with out 
the cookie, give them what they deserve.
**
The discussion list for  http://webstandardsgroup.org/
See http://webstandardsgroup.org/mail/guidelines.cfm
for some hints on posting to the list  getting help
**


Re: [WSG] Conditional comments

2005-01-18 Thread JohnyB
I'm pushing transparency to IE this way:
#logo {
  background: url('img/logo.png') no-repeat;
}
* html #logo {
  background: none;
  filter: 
progid:DXImageTransform.Microsoft.AlphaImageLoader(src='img/logo.png',sizingMethod='scale');
}

and it's even better to place all this non-standard crap in something 
like iecrap.css and link this by conditional comment.

Or - the idea with PHP:
#logo {
  background: url('img/logo.php') no-repeat;
}
and the logo.php file would check user-agent string and decide, whether 
to send PNG headers and fpassthru logo.png or to send GIF headers and 
fpassthru logo.gif ...

--
Jan Brasna :: alphanumeric.cz | webcore.cz | designlab.cz | janbrasna.com
Stop IE! - http://www.stopie.com/ | http://browsehappy.com/
**
The discussion list for  http://webstandardsgroup.org/
See http://webstandardsgroup.org/mail/guidelines.cfm
for some hints on posting to the list  getting help
**


Re: [WSG] Conditional comments

2005-01-06 Thread Kornel Lesinski
What I wondering is, could a comment be used to feed a GIF variant of a  
logo to IE to replace a PNG (with alpha) that IE doesn't support?
Don't double your code.
Using apache mod_rewrite and PHP you can make all PNG 'files' to actually
contain GIF, if requested by explorer.
See: http://osiolki.net/i/ossredni
--
regards, Kornel Lesiski
**
The discussion list for  http://webstandardsgroup.org/
See http://webstandardsgroup.org/mail/guidelines.cfm
for some hints on posting to the list  getting help
**


RE: [WSG] Conditional comments

2005-01-06 Thread Pringle, Ron
  What I wondering is, could a comment be used to feed a GIF 
 variant of a  
  logo to IE to replace a PNG (with alpha) that IE doesn't support?
 


Yes it could be done. For instance, if your general CSS code were something
like:

#wrapper { background-image: url(../images/fall_bk_right.png);}

and you wanted to serve IE6 a GIF version, then you would put the following
within your head tag:

!--[if IE 6]
style
#wrapper { background-image: url(../images/fall_bk_right.gif);}
/style
![endif]--

Make sure the above sits BELOW your CSS declarations, so that it is read in
after and supercedes the rule in the regular CSS.

Regards,
Ron
**
The discussion list for  http://webstandardsgroup.org/

 See http://webstandardsgroup.org/mail/guidelines.cfm
 for some hints on posting to the list  getting help
**



Re: [WSG] Conditional comments

2005-01-06 Thread Wayne Godfrey
 Don't double your code.
 
 Using apache mod_rewrite and PHP you can make all PNG 'files' to actually
 contain GIF, if requested by explorer.
 
 See: http://osiolki.net/i/ossredni

Kornel: Ok, I'm not great with PHP, but if there are some instructions
somewhere, I'm sure I could figure it...I think!!

Patrick: I'm going to go see what you have up your sleeve and I'll get back
to you later...I always like weird!

Thanks,

Wayne

--
Wayne Godfrey
President, Creative Director
Outgate Media, Inc.

[EMAIL PROTECTED]
--



**
The discussion list for  http://webstandardsgroup.org/

 See http://webstandardsgroup.org/mail/guidelines.cfm
 for some hints on posting to the list  getting help
**



Re: [WSG] Conditional comments

2005-01-06 Thread Bruce
I would do something along the line of the below perhaps, recently did,  
but am wondering if it is a good idea?:
!--[if IE]
style
h1.one(or something)
{visibility:visible}
h1.two(or something else)
{visibility:invisible}
/style
![endif]--

Bruce Prochnau
www.bkdesign.ca
Kornel Lesinski wrote:
What I wondering is, could a comment be used to feed a GIF variant of 
a  logo to IE to replace a PNG (with alpha) that IE doesn't support?

Don't double your code.

**
The discussion list for  http://webstandardsgroup.org/
See http://webstandardsgroup.org/mail/guidelines.cfm
for some hints on posting to the list  getting help
**


Re: [WSG] Conditional comments

2005-01-06 Thread Kornel Lesinski
On Thu, 06 Jan 2005 16:39:46 -0500, Bruce [EMAIL PROTECTED] wrote:
I would do something along the line of the below perhaps, recently did,   
but am wondering if it is a good idea?:
!--[if IE]
style
h1.one(or something)
{visibility:visible}
h1.two(or something else)
{visibility:invisible}
/style
![endif]--
I'd use:
!--[if lt IE 7]link rel=stylesheet href=hacks.css type=text/css  
/![endif]--

--
regards, Kornel Lesiski
**
The discussion list for  http://webstandardsgroup.org/
See http://webstandardsgroup.org/mail/guidelines.cfm
for some hints on posting to the list  getting help
**


Re: [WSG] Conditional comments

2005-01-06 Thread Mordechai Peller
Kornel Lesinski wrote:
Using apache mod_rewrite and PHP you can make all PNG 'files' to actually
contain GIF, if requested by explorer. 
Actually, with the help of filters, IE can render PNGs properly. With 
that in mind, you can use JavaScript in the header to set a cookie and 
then have the server check for that cookie. Then if IE caught with out 
the cookie, give them what they deserve.

**
The discussion list for  http://webstandardsgroup.org/
See http://webstandardsgroup.org/mail/guidelines.cfm
for some hints on posting to the list  getting help
**