CSS Menu / Posts /

DOCTYPE is necessary for IE

I stage a testing page online and found it doesn't work in IE 8. The code is:

        (the css menu)

Can anybody tell me why?

Fanny  6 years ago   viewed: 12639    

2 Answers

Because your markup is missing the DOCTYPE declaration. IE 8 and earlier has insufficient and erratic support if that declaration is missing.

So, Give always a DOCTYPE to your document:
<!DOCTYPE html>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">

But not:

and not the very old DOCTYPE standard:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">

Milo   6 years ago
Hello everyone !!!!  tank's a lot for the help, this page is so helpful and awesome!!
Raul Paz
  5 years ago


Your name*
(Optional. Used to modify this post afterwords)
+ =  

Ask your Own Question

  • If your question is related to the topic of this post, you can post your question to this page by clicking the "Post a reply" button at left;

  • When you want to start a new page for your question:
    • If your question is related to the CSS Menu, click:

      Ask new question: CSS Menu
    • Otherwise navigate to one of the following forum categories, and post your question there.