Re: [WSG] Are conditional comments the way to do this?
First I'd check if that problem can be fixed so that you can keep one stylesheet. You might have some error in styles that some browsers ignore and other don't. If by PC browsers you mean IE, check if it isn't one of it's well-known bugs: http://positioniseverything.net/explorer.html Some of them have easy workarounds. CSS rule for IE only: * html #foo {height: 1%;} CSS rule for better browsers only: * #bar {position: fixed;} If problems are caused by incompatible box model (do you use valid doctype? no xml prolog?) in such case you might end up with separate stylesheet for IE and conditional comments are right solution. -- 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] Are conditional comments the way to do this?
No, if it was just IE, it would be easy and I wouldn't have needed to ask the question. The trouble was that exactly the same problem was occurring in Firefox. So I needed to isolate both. It's better now, thanks to using the IE/Mac comment hack to just feed a new set of values to everything except IE/Mac. :) Thanks for the thoughts though. :) Cheers, Seona. -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Behalf Of Kornel Lesinski Sent: Wednesday, 1 December 2004 9:25 PM To: [EMAIL PROTECTED] Subject: Re: [WSG] Are conditional comments the way to do this? First I'd check if that problem can be fixed so that you can keep one stylesheet. You might have some error in styles that some browsers ignore and other don't. If by PC browsers you mean IE, check if it isn't one of it's well-known bugs: http://positioniseverything.net/explorer.html Some of them have easy workarounds. CSS rule for IE only: * html #foo {height: 1%;} CSS rule for better browsers only: * #bar {position: fixed;} If problems are caused by incompatible box model (do you use valid doctype? no xml prolog?) in such case you might end up with separate stylesheet for IE and conditional comments are right solution. -- regards, Kornel Lesinski ** The discussion list for http://webstandardsgroup.org/ See http://webstandardsgroup.org/mail/guidelines.cfm for some hints on posting to the list getting help ** --- Incoming mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.802 / Virus Database: 545 - Release Date: 26/11/2004 __ ella for Spam Control has removed Spam messages and set aside Later for me You can use it too - and it's FREE! http://www.ellaforspam.com --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.802 / Virus Database: 545 - Release Date: 26/11/2004 attachment: winmail.dat
Re: [WSG] Are conditional comments the way to do this?
Short anwser: try and use 2 hacks. I recommend developing for the best standards compliant browsers first: Firefox, Opera, or Safari. This will ensure that your CSS is clean and valid and should work well with future standards compliant browsers. Then I deal to/with IE/PC. I always use the * html hack at the end of my stylesheet to deliver styles to these browsers (5, 5.5, 6), and if the number of fixes get big enough I then put them into an external style sheet and hide that from nonIE using conditional comments. Then on to IE/Mac, if I can get away with it I use the * html hack again at the end of my stylesheet for this browser, checking the result against my IE/PC stylesheet, but some people put styles for this browser in another file and include it with a filter. Keep it as simple as possible and only hack browser which are 'dead' or 'dumb'. so I recommend using only two hack if you can do it: * html {//stuff}for IE /* \*/ {//stuff}/* */ to hide rules from Mac IE HTH Terrence Wood On 2004-12-01 6:08 PM, Seona Bellamy wrote: Hi guys, I have a site I'm doing for a graphic designer friend of mine, and one of the things I needed to do was to absolutely position each element of the navigation because she wanted to have them follow the shape of the design. So far so good, and I put together a working template on her Mac when I was there yesterday. I've since taken the files home so I can continue working on them, looked at the template on my PC and found that all of the navigation is out of whack. :( I was thinking of creating a second stylesheet with a new set of positioning rules that would be hidden from Mac browsers and hide the current one from PC browsers (no need to make everyone download everything). So is this a job for conditional comments? Or is there another way to do this? Do I need to just use hacks to hide the extra rules, so that everyone downloads everything and only processes the relevant bits? Either way, what would be the recommended syntax? Cheers, Seona. -- You know you've achieved perfection in design, not when you have nothing more to add, but when you have nothing more to take away. -Antoine de Saint-Exupery ** 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] Are conditional comments the way to do this?
Yes, ordinarily I do develop in Firefox first, but because I was at her house and working on her computer, I had to make do with what I had. That happened to be IE/Mac, since her install of Safari was acting oddly and kept hanging up. *sigh* Thanks for the code tips though. I'll have a play and see what I can do. Cheers, Seona. -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Behalf Of Terrence Wood Sent: Wednesday, 1 December 2004 4:48 PM To: [EMAIL PROTECTED] Subject: Re: [WSG] Are conditional comments the way to do this? Short anwser: try and use 2 hacks. I recommend developing for the best standards compliant browsers first: Firefox, Opera, or Safari. This will ensure that your CSS is clean and valid and should work well with future standards compliant browsers. Then I deal to/with IE/PC. I always use the * html hack at the end of my stylesheet to deliver styles to these browsers (5, 5.5, 6), and if the number of fixes get big enough I then put them into an external style sheet and hide that from nonIE using conditional comments. Then on to IE/Mac, if I can get away with it I use the * html hack again at the end of my stylesheet for this browser, checking the result against my IE/PC stylesheet, but some people put styles for this browser in another file and include it with a filter. Keep it as simple as possible and only hack browser which are 'dead' or 'dumb'. so I recommend using only two hack if you can do it: * html {//stuff} for IE /* \*/ {//stuff}/* */ to hide rules from Mac IE HTH Terrence Wood On 2004-12-01 6:08 PM, Seona Bellamy wrote: Hi guys, I have a site I'm doing for a graphic designer friend of mine, and one of the things I needed to do was to absolutely position each element of the navigation because she wanted to have them follow the shape of the design. So far so good, and I put together a working template on her Mac when I was there yesterday. I've since taken the files home so I can continue working on them, looked at the template on my PC and found that all of the navigation is out of whack. :( I was thinking of creating a second stylesheet with a new set of positioning rules that would be hidden from Mac browsers and hide the current one from PC browsers (no need to make everyone download everything). So is this a job for conditional comments? Or is there another way to do this? Do I need to just use hacks to hide the extra rules, so that everyone downloads everything and only processes the relevant bits? Either way, what would be the recommended syntax? Cheers, Seona. -- You know you've achieved perfection in design, not when you have nothing more to add, but when you have nothing more to take away. -Antoine de Saint-Exupery ** The discussion list for http://webstandardsgroup.org/ See http://webstandardsgroup.org/mail/guidelines.cfm for some hints on posting to the list getting help ** --- Incoming mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.802 / Virus Database: 545 - Release Date: 26/11/2004 __ ella for Spam Control has removed Spam messages and set aside Later for me You can use it too - and it's FREE! http://www.ellaforspam.com --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.802 / Virus Database: 545 - Release Date: 26/11/2004 attachment: winmail.dat