Today I am going to share a very basic problem related to DOCTYPE declaration. We all know that according to HTML standard it is must that each HTML document has document type declaration. The "DOCTYPE" begins the HTML document and tells a validator which version of HTML to use in checking the document's syntax.
Have you ever think if you don't include DOCTYPE declaration in your HTML document specially when you convert your HTML document to any dynamic page like .php or .aspx. If your answer is no then following are the problem you could face during browser compatibility check:
1. First and major issue you'll face DIV element centering. If you have used margin: 0 auto 0 auto; to centering the any element in your in your page it will go left align in the IE6 and IE7. Look at example below:DIV
2. If you have used padding in any DIV element and adjusted the width of that DIV element it won't show correct in IE6/7. Look at example below:
Above are the examples I have faced during working on recent .NET project. If you have faced similar problem ever but different issue please share it here by leaving a comment.
Updated as on June 07, 2010.
3. This is a third instance I have noticed today during working on .jsp page. If you are using iframe in your .jsp page and have a scrolling auto, then it will not work on IE6/7. To solve this you need to declare DOCTYPE declaration in your external page. Look at example below:
Wednesday, June 2, 2010
How Important DOCTYPE Declaration is for your HTML Document
Subscribe to:
Post Comments (Atom)
About Me
Popular Posts
-
If you are looking 'how to put a any form in a blogger' then this post is going to help you. Putting a form in blogger is very easy....
-
When you write a CSS for your project you never know what kind of bug or issue you will face at time of browser compatibility. Internet Ex...
-
jQM (jQuery Mobile) becoming very popular now a days. Mobile developers from across the world contributing their knowledge to make it more u...
-
Now a days every one intend to aware about HTML5 more and more. According to experts HTML5 is a future of the web. There are some interestin...
-
If you are looking for free e-books for Web Design and Development then this post is for you. Here I have shared some very useful e-books wi...
-
In web development scripts like jQuery and Ajax becomes very handy for web developers. If you are a learner or a expert these scripts is rea...
-
In this post I'm sharing a list of XML based CMS (Content Management System) to help web designers and developers. CMS usually implement...
-
Using framework in a project is really a challenging task. Now a days there are numbers of open source framework available across the web an...
-
Now a days every designer and developers search across the web for free icons. A good icons plays a vital role in web designing because it i...
-
Recently I searched web for interesting and useful iPhone apps that will help iPhone users to have good exercise with these powerful apps. I...





0 comments:
Post a Comment