Web Standards FAQ Collection 4_ Experience Exchange

Source: Internet
Author: User
13. Why can't the FF be centered horizontally?
<textarea id="runcode23763"><! DOCTYPE HTML PUBLIC "-//W3C//DTD XHTML 1.0 strict//en" "Http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd" > < Meta http-equiv= "Content-type" content= "text/html; charset=gb2312 "/> <style type=" Text/css "> <!--body {text-align:center; } div {margin:0 auto; width:500px; height:200px; BORDER:1PX Solid Red}-</style></textarea>
[Ctrl + A full selection Note: If you need to introduce external JS need to refresh to execute]
FF below set the container's left and right outside patches for auto on it
14. Why the text in FF cannot open the height of the container
<textarea id="runcode15477"><! DOCTYPE HTML PUBLIC "-//W3C//DTD XHTML 1.0 strict//en" "Http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd" > < Meta http-equiv= "Content-type" content= "text/html; charset=gb2312 "/> <style type=" Text/css "> <!--div {width:200px; height:200px; BORDER:1PX Solid Red}-</style> Web Standard FAQ Web Standard FAQ Web Standard FAQ Daquan Web Standard FAQ Web Standard FAQ Web Standard FAQ Web Standard FAQ Web Standard common Web Standard FAQ Web Standard FAQ Web Standard FAQ Quasi frequently asked Questions Daquan Web Standards FAQ Daquan Web Standard FAQ Web Standard FAQ Web Standard common Web Standard FAQ Daquan Web Standard FAQ Web Standard FAQ Web Standard FAQ Web Standard FAQ Web Standard FAQ FAQ Web Standard common Web Standards FAQs Daquan Web Standard FAQ Daquan Web Standard FAQ Web Standard FAQ Web Standard FAQ Web Standard FAQ Web Standard FAQ Web Standard common Web Standard FAQ Daquan Web Standard FAQ FAQ Web Standard FAQ Daquan Web Standard FAQ Web Standard FAQ Web Standard FAQ Daquan Web Standard common Web Standard FAQ Web Standard FAQ Web Standard FAQ Web Standard FAQ Web Standard FAQ Daquan Web Standards FAQ Web standards Common</textarea>
[Ctrl + A full selection Note: If you need to introduce external JS need to refresh to execute]
The container of fixed height value in standard browser is not open like IE6, then I want to fixed height, and want to be able to be open how to set it? The way is to remove height setting min-height:200px; Here in order to take care of the IE6 do not know min-height can be defined as:
{
Height:auto!important;
height:200px;
min-height:200px;
}
15. Why is the width of the container IE6 different from the FF interpretation?
<textarea id="runcode93451"><?xml version= "1.0" encoding= "gb2312"?> <! DOCTYPE HTML PUBLIC "-//W3C//DTD XHTML 1.0 strict//en" "Http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd" > < Meta http-equiv= "Content-type" content= "text/html; charset=gb2312 "/> <style type=" Text/css "> <!--div {cursor:pointer; width:200px; height:200px; border:10px Solid Red}-</style> Web standards FAQs <pr/></textarea>
[Ctrl + A full selection Note: If you need to introduce external JS need to refresh to execute]
The difference is that the overall width of the container is not the width of the border (border) in the inside, where IE6 is interpreted as 200PX, and FF is interpreted as 220PX, that is how to cause the problem? Everyone put the container top of the XML removed will find the original problem in this, the top of the declaration triggered the IE quirks mode, about quirks mode, standards mode of related knowledge, please refer to: http://www.microsoft.com/ China/msdn/library/webservices/asp.net/aspnetusstan.mspx?mfr=true
16. Why IE cannot set scroll bar color in Web Standard
<textarea id="runcode32972"><! DOCTYPE HTML PUBLIC "-//W3C//DTD XHTML 1.0 strict//en" "Http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd" > < Meta http-equiv= "Content-type" content= "text/html; charset=gb2312 "/> <style type=" Text/css "> <!--body {scrollbar-face-color: #f6f6f6; Scrollbar-highlight-color: #fff; Scrollbar-shadow-color: #eeeeee; Scrollbar-3dlight-color: #eeeeee; Scrollbar-arrow-color: #000; Scrollbar-track-color: #fff; Scrollbar-darkshadow-color: #fff; -</style></textarea>
[Ctrl + A full selection Note: If you need to introduce external JS need to refresh to execute]
The solution is to replace body with HTML
17. Why does the style I define have no effect?
<textarea id="runcode14409"><! DOCTYPE HTML PUBLIC "-//W3C//DTD XHTML 1.0 strict//en" "Http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd" > < Meta http-equiv= "Content-type" content= "text/html; charset=gb2312 "/> <style type=" Text/css "> <!--#aa ul li {color:red}. aa {Color:blue}--& Gt </style> <ul> <li class= "AA" > Web Standard FAQ Web Standard FAQ Web Standard FAQ Daquan Web Standard FAQ Web Standard FAQ Web Standard FAQ Web Standard FAQ Web Standard FAQ Web Standard FAQ Web Standard FAQs Web Standard FAQs Daquan </textarea>Web Standard FAQ Web Standard FAQ Web Standard FAQs </li> </ul>
[Ctrl + A full selection Note: If you need to introduce external JS need to refresh to execute]
You can't use it here. AA definition to li How to solve this problem? The answer is to improve. AA priority such as #aa UL LI.AA priority related articles reference-baidu search keywords: css precedence
18. Why can't I define a container with around 1px height?
<textarea id="runcode96655"><! DOCTYPE HTML PUBLIC "-//W3C//DTD XHTML 1.0 strict//en" "Http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd" > < Meta http-equiv= "Content-type" content= "text/html; charset=gb2312 "/> <style type=" Text/css "> <!--div {background:red; -</style></textarea>
[Ctrl + A full selection Note: If you need to introduce external JS need to refresh to execute]
IE6 This problem is due to the default row height, there are many workarounds, such as: Overflow:hidden | zoom:0.08 | line-height:1px
  • Related Article

    Contact Us

    The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

    If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

    A Free Trial That Lets You Build Big!

    Start building with 50+ products and up to 12 months usage for Elastic Compute Service

    • Sales Support

      1 on 1 presale consultation

    • After-Sales Support

      24/7 Technical Support 6 Free Tickets per Quarter Faster Response

    • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.