Browsers will still see many web sites very differently. Now we have even more browsers to worry about with systems like the Play Station 3, iPhone, and now Google’s Chrome. However there is a workaround that internet explorer incorporated into their latest browser, Internet Explorer 7. Though we would all like a standard to be an actual standard as opposed to guidelines ( which DTD is being more referred as for html/xhtml ), it is nice and actually a shock to see Microsoft recognize the differences and give us a useful way of handling the problem.
Internet Explorer calls these hacks: Conditionals. These are more or less comments that IE will interpret and other browsers will see as comments (as they should).
The following is a short list of conditionals Internet Explorer has given to us:
The last two we find to use the most. The more popular and useful approach to utilizing these ‘conditionals’ is when including style sheets. You will find suggestions to include different style sheets, one for internet explorer, and one for others ( some suggest one for IE7, IE6 and below, and others ). We have found this is quite useful to a degree. Before jumping to conclusions and having two completely different style sheets, code smart. Include a universal style sheet, and then all differences you need to make between browsers, take those specific style out of the universal style sheet and copy these styles into your separate style sheets. Then edit the sheets as necessary. This way you do not have to edit all CSS files for even the smallest change.
Note: Nothing will ever be perfect though, keep this in mind. Take this page for example: Hopefully you are using firefox or chrome, but IE users, it’s your own fault this page brakes!
Tags: browsers, ie hacks, internet explorer hacks