How to create an IE-hack free website?

Are your sure you really need to press the "<" in your keyboard and start typing your IE hack


Before you do that have you tried to check your CSS? Does the dimensions of your divs given? You really need to specify the height and the width of your div because IE 6 is sometimes… I mean always… doesn't have enough knowledge to understand your code!


Have you check the floats? Sometimes… or always, IE needs more floats in your codes. I don't know why! just add floats...


If you have your floats, ob course you need to clear it. Clearing floats will help a lot in overlapping head aching divs. Have you heard the double float margin that usually occur in IE 6. If you already know the answer that's good just keep it. If you don't know how to fix it, start typing display:inline; in your div with a float property. it will help a lot. So here are the key concepts in creating an IE-hack free website:


Try the following CSS codes and tips before you add an IE hack to your code


  • check the width and height
  • add floats
  • clear your floats
  • display: inline;
  • display: block;
  • display:inline-block;
  • For text and form input, declare line-height and heigt

One more thing… the min-height thing for IE 6. Well, if you know how to fix it, then just leave a comment. Happy coding!

Comments

Post a Comment