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
- Rakesh Sharma
-
Web Designer | Blogger | Web Addict
Follow on Google+
Recommend on Google +1
RSS Feed
Subscribe Recent Posts
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....
-
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...
-
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...
-
Cooliris is simply the fastest and most stunning way to browse photos and videos from the Web or your desktop for free. Effortlessly scroll...
-
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...
-
jQM (jQuery Mobile) becoming very popular now a days. Mobile developers from across the world contributing their knowledge to make it more u...
-
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...
-
Today I would like to share that how to add a Facebook fan list to your blog or website (like I have added here at right sidebar). This is t...
-
Today I am really happy to anounce that I have launched new social book marking site called ' TutLinks '. This is a first networkin...
0 comments :
Post a Comment