10 October 2013

Tips in designing cross browser html coding

Always add  <!DOCTYPE html> (this is the doc type for html-5) as the first statement in your html file so that browsers do not fall back to primary versions of html. Especially in IE if you dont add the doc type statement “div” alignments will not work as it evaluates and treats your html code as IE5 (quircks) mode which is a very old version.

 When defining “font-family” in your css don’t use generic family types like “serif”, “monospace”. This causes problems and gives different look and feel which is ugly. Especially in IE. Use only specific font families like “Times New Roman” as font families. 

 These two things did a great difference in my design especially when IE is considered.

No comments: