> <DIV> & width
I have a page which appears just fine in FireFox / Chrome / Opera / Safari, but appears incorrectly in Internet Explorer. A quick search reveals many issues with DIVs in IE, but none of the items appeared to address this issue.
The issue is that DIV appear to expand to the entire width of the browser, in Internet Explorer; this behavior is not replicated in any of the others.
Code is here: http://pastebin.com/c46uB7GP
CSS is here: http://pastebin.com/TXWWM2Qu
IE rendered image is here: http://imgur.com/Pciv5
Chrome rendered image is here: http://imgur.com/8kwd4
Any help would be welcome in resolving this discrepancy.
Thanks, R
You have no layout width/height specification in your current code.
Put the content inside an enclosing div that has a width specified in pixels.
It's also better practice to identify your divs with classes (or IDs, if there is only one of them) and define the actual CSS in the CSS file and not in the HTML. This way you can separate presentation from markup, so that you could send the same HTML to, say, a mobile device, but with a different CSS file for that device.
链接地址: http://www.djcxy.com/p/41998.html上一篇: Wordpress CSS在Internet Explorer中不起作用
下一篇: > <DIV>和宽度