Kane250 Posted June 30, 2008 Share Posted June 30, 2008 Do people code pages in a special way so that they look correct in internet explorer? I designed a site that looks fine on any other browser but in IE, especialy older versions, the divs are in places they should not be. Obviously if I adjust the pixels so they line up in IE they wil not look right in any other browser...so I wonder what to do? Is it simply a case of telling people to use a better browser? Quote Link to comment Share on other sites More sharing options...
rhodesa Posted June 30, 2008 Share Posted June 30, 2008 when it comes to CSS, i usually code it to look good in FF, and then put in hacks for IE. the most common one I use for IE6 is the !important hack. Example: I want my header to have a padding of 5px in FF, but only 4px in IE #header { padding: 5px !important; padding: 4px; } CSS compliant browsers (aka FF) will honor the !important and make it 5pm. IE will not, and will override the 5px with the 4px listed below it. Quote Link to comment Share on other sites More sharing options...
Kane250 Posted June 30, 2008 Author Share Posted June 30, 2008 Oh I've never seen that! And this usually fixes all the issues with things aligning in IE the way it should? Quote Link to comment Share on other sites More sharing options...
rhodesa Posted June 30, 2008 Share Posted June 30, 2008 i wouldn't say it "fixes"...it just allows you to easily code separate CSS properties for IE6 Quote Link to comment Share on other sites More sharing options...
Kane250 Posted June 30, 2008 Author Share Posted June 30, 2008 i wouldn't say it "fixes"...it just allows you to easily code separate CSS properties for IE6 gotcha, well that's definitely helpful...thanks! Quote Link to comment Share on other sites More sharing options...
Kane250 Posted June 30, 2008 Author Share Posted June 30, 2008 Is there a reason why this fixes the divs for IE6 but then when I test in IE7 it's messed up again? Quote Link to comment Share on other sites More sharing options...
rhodesa Posted June 30, 2008 Share Posted June 30, 2008 that hack is for IE6 only...do you have a link to the site so I can check it out? I'm interested in seeing how it is different Quote Link to comment Share on other sites More sharing options...
Kane250 Posted June 30, 2008 Author Share Posted June 30, 2008 that hack is for IE6 only...do you have a link to the site so I can check it out? I'm interested in seeing how it is different I sent you a message. I was able to readjust things for IE6, but then when I look thorugh IE7 it's completely messed up again.. Quote Link to comment Share on other sites More sharing options...
rhodesa Posted June 30, 2008 Share Posted June 30, 2008 i'll take a look at it in a sec...i noticed you are using transparent PNGs. you will need to use a PNG Hack or make them transparent GIFs instead if you want them to look right in IE6 Quote Link to comment Share on other sites More sharing options...
haku Posted July 1, 2008 Share Posted July 1, 2008 I personally prefer conditional comments (http://en.wikipedia.org/wiki/Conditional_comments) to hacks, for the simple reason that they were designed for this situation, whereas hacks are just that - hacking something to make it work. The problem with hacks is that they may not work in the future if something changes, as they weren't designed for that purpose in the first place. The other nice thing about conditional comments is that you can target specific versions of IE, so you can have separate spreadsheets for IE5.5, 6 and 7 (and even if you want. Quote Link to comment Share on other sites More sharing options...
Kane250 Posted July 1, 2008 Author Share Posted July 1, 2008 i'll take a look at it in a sec...i noticed you are using transparent PNGs. you will need to use a PNG Hack or make them transparent GIFs instead if you want them to look right in IE6 Yeah was wondering why they looked weird...good to know...thanks! Quote Link to comment Share on other sites More sharing options...
Kane250 Posted July 1, 2008 Author Share Posted July 1, 2008 I personally prefer conditional comments (http://en.wikipedia.org/wiki/Conditional_comments) to hacks, for the simple reason that they were designed for this situation, whereas hacks are just that - hacking something to make it work. The problem with hacks is that they may not work in the future if something changes, as they weren't designed for that purpose in the first place. The other nice thing about conditional comments is that you can target specific versions of IE, so you can have separate spreadsheets for IE5.5, 6 and 7 (and even if you want. Thanks! I actually saw this yesterday and tried it but it seemed to not link to my new spreadsheet for IE7. I added in the link and it just did nothing...do you have a good link? Maybe I did it wrong.. Quote Link to comment Share on other sites More sharing options...
haku Posted July 1, 2008 Share Posted July 1, 2008 I don't know any particular tutorials, but I do know that it works. Check to see that you have the right link to the page, and that you have used the correct format and don't have any typos in the code you put in. Put up a link to your site if you have one. Quote Link to comment Share on other sites More sharing options...
TheFilmGod Posted July 2, 2008 Share Posted July 2, 2008 I completely agree with Haku - conditional statements are the way to go. I don't recommend supporting IE6 - IE7 has come out and lazy people will get a reward for their laziness. Furthermore, if it works well in IE7 it should work (to some extent) satisfactorily in IE6 Make sure the IE override stylesheets are imported after the original stylesheets. - Just don't go crazy using them. It loses it's purpose if you OVERUSE it. - TheFilmGod Quote Link to comment Share on other sites More sharing options...
ToonMariner Posted July 2, 2008 Share Posted July 2, 2008 you can't ignore IE6 just yet as it still has about 30% of the market - reasons being those with hooky copies of XP, businesses who didn't upgrade to XP as it was so flawed initially or don't want the expense etc etc. Its not hard to cater for IE6 - and the conditional comments are definitely the method of choice in my book, hacks are VERY messey - all you need to do is use a strict doctype and keep your markup semantic and lean and then get the css right for the 'compliant' boys then look at IE6 and apply those extra rules in an IE6 only style sheet. dead easy. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.