|
| Index | Recent Threads | Unanswered Threads | Who's Online | User List | Help |
|
|
| No member browsing this thread |
|
Thread Status: Active Total posts in this thread: 21
|
|
| Author |
|
|
Advanced Member Joined: Jun 14, 2003 Post Count: 2923 Status: Offline |
With all the buzz about how IE7 breaks many commonly used CSS hacks - ok, I've been doing a lot of the buzzing regarding that ... Anyway, I've been considering the ways to get around what looks to be a potentially major problem: Getting your CSSP site working in both IE6 and IE7 at the same time. I've considered these options:
At this time, I think using IE conditionals is probably the best choice because:
Example using IE conditional comments: <head> <link href="standardStyle.css" rel="stylesheet" type="text/css" media=screen> <!--[if IE 6]> <link href="ie_style.css" rel="stylesheet" type="text/css" media=screen> <![endif]--> </head> Comments: Only IE will recognize this (<!--[if IE 6]> etc ...) and all other browsers will just see it as comment text - it should validate ... if you care about that. In the above example, only IE6 will load the style sheet that I have referenced in the conditional comment. Meaning anything in between: <!--[if IE 6]> and <![endif]--> will be considered a comment by all other browsers. That means you can store any IE specific code in another IE only style sheet and your golden. You'll noticed (I'm sure,) that I placed the IE conditional comments AFTER the first style sheet link - this way the IE style will override the CSS rules that appeared in the first style sheet. Remember that CSS works from the top-down, where the last rule applied overrides previous rules... Final comments: I can't think of any downside to using IE conditional comments except that maybe (if you're a purist,) you might object to the fact that this is technically non-standards, IE specific code. On the other hand, this solution eliminates the need for CSS hacks that are fragile and at best problematic. And if you think about it, it is probably a lot easier to just have a clean IE only CSS file - no more fiddling with or trying to learn hacks. Conclusion: Since it has no negative practical impact (that I can see,) in that it will not bother any other browser, I think it is probably the best solution. ---------------------------------------- Stefan Mischook Video Tutorial Store | Web Templates ---------------------------------------- [Edit 14 times, last edit by admin at Oct 24, 2005 9:57:23 AM] |
||
|
|
Advanced Member U.S.A. Joined: Mar 28, 2005 Post Count: 962 Status: Offline |
If there are no implications, why haven't we been doing this all along? Why did I spend 4 hours making a box not scroll in both firefox and IE when I could do them seperately?... Seriously, I was able to make it work in either-or, but not both. If i had known I could do this, life would have been much eisier. I think I ended up using a table... And the whole "max-height" thing.... Jeez... ![]() ---------------------------------------- Broc High Tide Web Services High Tide Templates ---------------------------------------- [Edit 1 times, last edit by Broc at Oct 24, 2005 2:52:19 AM] |
||
|
|
Advanced Member USA Joined: Nov 27, 2003 Post Count: 6287 Status: Offline |
That is what forums are for. But admitedly I have only known about IE conditional Comments for a year or so and never conviced it was usefull... it simply was some non-standard IE dependent for one browser only code. I first heard of it in a forum as well, SitePoint or Accessify I believe. However this mess with IE7... that is different and I agree with Stef that this is the best choice and least of all evils. However I am still waiting on some smart cookie to explain why a Standards compliant IE7 would break a site that a standards compliant Firefox does not! It should ignore hacks just like Firefox and Co. do. But reaching into my bottomless Bookmark list I present to you a (I think) good article on Conditional Coments (by a new GAWDS member I do not know yet really, but the article seems solid enough). Microsoft Conditional Comments by TJKDesigns. Also see Micro$oft's: About Conditional Comments ---------------------------------------- Gu.aal kwsh� yak'�i it�akw ijeet wugood�k LSW-WebDesign.com |
||
|
|
Advanced Member UK Joined: Dec 29, 2004 Post Count: 1662 Status: Offline |
That's useful Stefan, thanks! Wasn't sure of what to do with IE7 around the corner anyway. Anyone know why conditional comments were implemented in the first place? Tim ---------------------------------------- Pavonis Mons | Listen of the week: "Residue of Desire" by Acumen |
||
|
|
Advanced Member USA Joined: Nov 27, 2003 Post Count: 6287 Status: Offline |
Spoke with a IE7 beta tester and he pointed out that sites using sniffer scripts to feed a certain style sheet to IE are breaking because these scripts were written before IE7 so do not recognize it as a IE browser. Another downside to sniffer scripts, have o0t keep them up to date. ---------------------------------------- Gu.aal kwsh� yak'�i it�akw ijeet wugood�k LSW-WebDesign.com |
||
|
|
Advanced Member Joined: Jun 14, 2003 Post Count: 2923 Status: Offline |
"Anyone know why conditional comments were implemented in the first place?" To solve exactly this type of problem. M$ did something good when they came out with conditional comments. Again, I think this is the way to go. If you think about it, it is actually much easier to use conditional comments than it is to use hacks. - One point: The main 'evil' with browser specific code (proprietary code,) is that it would traditionally create a 'fork' in the code base that would cause the website to NOT work in other browsers - this sucks. But in this case, though IE conditional comments are proprietary, we don't have this problem. It seems to be a brilliant solution that frankly, I'm surprised the whole hacking thing went anywhere - this is much better option of the two even without the IE7 thing. I guess it was not as exciting to just use this ultra-easy to understand, forward and backward compatible solution. ... I should have remembered this a while ago: when it came out, I was tinkering with it for a DHTML project I was working on for a huge Pharmaceutical ... I think it came out with IE5. Note: yep, it came out with IE5. ---------------------------------------- Stefan Mischook Video Tutorial Store | Web Templates ---------------------------------------- [Edit 5 times, last edit by admin at Oct 24, 2005 10:02:14 AM] |
||
|
|
Advanced Member Joined: Jun 14, 2003 Post Count: 2923 Status: Offline |
"why a Standards compliant IE7 would break a site that a standards compliant Firefox does not!" I haven't tested IE7 yet but I think sometimes it has to do with IE rendering things are not specified in the spec (thus still compliant) differently than other browsers. But I am not sure and frankly ... who cares right now. All we need to know that there are problems with hacks. - I guess I look at this whole thing (standards, browsers etc) with different eyes being a programmer - I just see a bunch of geeks writing code that can be changed, fixed or broken whatever ... it's just code, these are not universal principles that are immutable. ---------------------------------------- Stefan Mischook Video Tutorial Store | Web Templates |
||
|
|
Advanced Member USA Joined: Mar 24, 2005 Post Count: 3000 Status: Offline |
A developer that hires me out to do coding on his projects (to lessen his work load) has IE7 and has been using it for a while now. He's also a big fan of FireFox. He says IE7 is a better browser than IE6 and most sites are not having a problem with IE7. The most he is talking about are B2B, hybrid sites however. I might get bashed for this... ...just thoughts and did I coin a new phrase? - see below. I wonder about the effectiveness (in all measures: design, usability, accessibility, SEO, portability, and scalability) any Business to Business and Business to Consumer site can have when developed by strict purist constructs. Seems to me that purist often have less flexibility to offer. Not to say that accessiblity, for example, if that is regarded as purist, is something that does not add tremendous value to a Business website. Because, it stregthens the product for the cusotmer and end user. I wonder if most strict purist sites, with "breakable" css hacks, are likely your informational, tutorial, research, enthuasist, hobby specific, technology specific, underground, political, and experimental sites that are supported by someone (or members) interested in the backend development tweaking the code on a regular basis. Which would put them in a position to be YIE7 ready. Yes, all that for YIE7 ready. - ---------------------------------------- "The art of life lies in a constant readjustment to our surroundings." -Okakura Kakuzo Save the developers<!> Maine Webworks |
||
|
|
Advanced Member USA Joined: Mar 24, 2005 Post Count: 3000 Status: Offline |
What kind of hacks are these? I've seen 'em and know nothin' of 'em. My hunch is for Opera. #right { float: right; width: 150px; \width: 150px; w\idth: 150px; margin-left: 5px; padding-top: 100px; } TIA as Always! - ---------------------------------------- "The art of life lies in a constant readjustment to our surroundings." -Okakura Kakuzo Save the developers<!> Maine Webworks |
||
|
|
Advanced Member Joined: Jun 14, 2003 Post Count: 2923 Status: Offline |
"Yes, all that for YIE7 ready." You lost me with that ... what do you mean by 'YIE7'? - The problem with the purist (what I call the Web Standard Zealots,) is that they are missing the point and focusing on the wrong thing: The WS (Web Standards) have been transformed from a specification to some religious doctrine ... it's silly. They will argue the details but again, they are 'Missing the Forest for the Trees' - they have lost sight of the raison d'�tre of any set of standards and now they find themselves doing more work and having more problems today for the sake of some fictitious future! FACT: no one knows what exactly will happen down the road. They will argue otherwise but they have so far been wrong - as is evidence with IE7. ... I have yet to meet an experienced project manager who thinks like a zealot: they know from hard experience the truth about the WS movement. - I am fairly convinced that most zealots are not building many commercial websites because the ws zealot position is actually not business centric. As web designers, your goal is to put out quality websites as fast as possible, that work for the major browsers used today - not for the most WS compliant browsers and certainly not for browser that MAY come out in a year or whenever. Anyone with experience in this business knows that this industry changes so quickly that to plan more than 2 years in advanced is crazy. Another point: The whole validation thing has no business advantage whatsoever. I will say it again, it has no business advantage whatsoever. No client will give a crap about validation (none will know what your talking about either), no one surfing the web will give a crap, and validating a website will NOT insure your website will work in the future - that is a myth that has been proven wrong with IE7. - I have been (I think) the only voice (with a big audience,) who has spoken up. Initially, I didn't say much because frankly, I didn't really care - I just chuckled to myself. But then something I saw pissed me off ... then I had to speak up. ---------------------------------------- Stefan Mischook Video Tutorial Store | Web Templates ---------------------------------------- [Edit 3 times, last edit by admin at Oct 25, 2005 1:11:55 AM] |
||
|
|
|
|
|
Current timezone is GMT Nov 20, 2009 9:30:57 PM |