just wanted to hear some opinions on why people commonly use hacks to
make ie behave, instead of conditional comments
my issue w/ (most, not all) hacks is that they may fail when the next version of ie is released.
to me, conditional comments seem like the most fail safe method of feeding(or restricting) styles to ie. I agree, its not always the easiest and fastest method,
but it always validates, and if used correctly, are very likely not to cause problems in future versions of ie.
now i do realize you cant accomplish everything w/ it that you can w/ hacks, but thats not what im referring to. Sometimes hacks are definately the best route, but at least in my experience, ive found conditional comments are the best choice, most of the time.
edited - ive changed the title and this post. i was using the term "conditional statements", when this is most commonly called conditional comments. sorry for the confusion
ie conditional comments
Moderator: General Moderators
ie conditional comments
Last edited by rehfeld on Sun Nov 28, 2004 1:01 pm, edited 1 time in total.
-
kettle_drum
- DevNet Resident
- Posts: 1150
- Joined: Sun Jul 20, 2003 9:25 pm
- Location: West Yorkshire, England
Well when you start to work with designers and your job is just to code you seperate the php from the design markup and so dont have the option to run if statments. So that makes it harder to do as you suggest. Then there is just the feeling that php isnt for marking up and so you leave the design of the page for html/xhtml/css which can cope with different browsers - and keep php for doing the hard work of getting and processing the data. Then there is also the feeling that they are no longer hacks, but requirments for cross-browser development.
sorry, i wasnt very clear i guess.
i meant in the html, nothing to do w/ scripting
i meant in the html, nothing to do w/ scripting
Code: Select all
<html>
<head>
<link rel="stylesheet" href="all-browsers.css" type="text/css">
<!--їif ie 5]>
<link rel="stylesheet" href="ie5.css" type="text/css">
<!їendif]-->
</head>well yes, i agree using a doctype is important when trying to acheive consitent behavior from browsers,
but what im asking is why do people choose to use hacks over conditional comments?
http://msdn.microsoft.com/library/defau ... nt_ovw.asp
but what im asking is why do people choose to use hacks over conditional comments?
http://msdn.microsoft.com/library/defau ... nt_ovw.asp