Dreamweaver causing Quirks Mode in Internet Explorer

前端 未结 2 1831
忘了有多久
忘了有多久 2020-12-19 14:29

I use Dreamweaver to develop Web sites. I use the templates feature extensively as it helps to make things easier maintaining conformance.

However, I notice that Dre

2条回答
  •  醉梦人生
    2020-12-19 15:12

    Ok, I figured this out.

    Because of the extensive IE-compliance tweaking I'm doing, I was using conditional comments. However, I was using them on the html tag. There's nothing wrong with this in principle but Dreamweaver won't handle your live template updates properly when you do this (It will place the Dreamweaver-specific template lock code first before the doctype, thereby ensuring that your pages will throw Quirks mode in IE).

    So what I did was move my conditional comment system away from the html tag, instead using them immediately after your opening body tag and immediately before your closing body tag like so:

    
    
    
    
    
    
    
    {YOUR HTML CODE}
    
      

    This way, Dreamweaver places the doctype and html tag before the template lock code, and your resulting pages will appear in standards mode on IE (all things being normal).

    Cheers.

提交回复
热议问题