Web Standards FAQ Collection 5_ Experience Exchange

Source: Internet
Author: User
19. Why this background color cannot be displayed
<textarea id="runcode77286"><! 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 "> <!--ul {background:red} li {float:left; width:180px; --</style> <ul> <li>web Standard FAQs </li> <li>web Standard FAQs </li> <li> Web Standards FAQs </li> <li>web Standard FAQs </li> <li>web Standard FAQs </li> </ul></textarea>
[Ctrl + A full selection Note: If you need to introduce external JS need to refresh to execute]
IE set the background color of the UL does not show, this belongs to the haslayout problem, the solution is also a lot of reference: http://bbs.blueidea.com/viewthread.php?tid=2636904
20. How can I make the layer appear above flash?
<textarea id="runcode69000"><! 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 {position:absolute; top:20px; left:20px; width:200px; height:200px; Background:red} object {width:500px; height:100px; -</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 FAQ Web Standard FAQ Web Standard FAQs Web Standard FAQs Daquan Web Standard FAQ Daquan Web Standard FAQ Web Standard FAQ <object type= "Application/x-shockwave-flash" Data= "http://gg.blueidea.com/ 2005/www/m533-104.swf "> <param name=" movie "value=" http://gg.blueidea.com/2005/www/m533-104.swf "/> </ Object></textarea>
[Ctrl + A full selection Note: If you need to introduce external JS need to refresh to execute]
The workaround is to set the flash to transparent
21. How to make a layer vertically centered in the browser
<textarea id="runcode46974"><! 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 {position:absolute; top:50%; left:50%; margin:-100px 0 0-100px; width:200px; height:200px; border:1px solid red; --</style> Web Standards FAQs</textarea>
[Ctrl + A full selection Note: If you need to introduce external JS need to refresh to execute]
Here we use the percent absolute positioning, with the method of negative value of the outer patch, the size of the negative value to its own width height divided by two
22. Picture vertical and inside the container
Copy CodeThe code is as follows:
Reference: http://bbs.blueidea.com/thread-2666987-1-1.html

23. How to make a three-column horizontal arrangement
<textarea id="runcode86495"><! DOCTYPE HTML PUBLIC "-//W3C//DTD XHTML 1.0 strict//en" "Http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd" > < style> Div {float:left; margin:1px; width:200px; height:200px; Background:orange} </style></textarea>
[Ctrl + A full selection Note: If you need to introduce external JS need to refresh to execute]
<textarea id="runcode28911"><! DOCTYPE HTML PUBLIC "-//W3C//DTD XHTML 1.0 strict//en" "Http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd" > < style> Div {position:absolute; top:50%; left:50%; margin:-100px 0 0-300px;} </style> 1 2 3</textarea>
[Ctrl + A full selection Note: If you need to introduce external JS need to refresh to execute]
<textarea id="runcode11157"><! DOCTYPE HTML PUBLIC "-//W3C//DTD XHTML 1.0 strict//en" "Http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd" > < Style> span {margin:1px; Display:-moz-inline-box; Display:inline-block; width:300px; height:200px; Background:orange; } </style><span></span> <span></span> <span></span></textarea>
[Ctrl + A full selection Note: If you need to introduce external JS need to refresh to execute]
Horizontal div can be used in a floating way, such as float:left, or inline, and can be absolutely positioned objects and so on.
  • 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.