Some of their own summary:
1, if an object has a float, the basic will not use the width
2, sometimes to the div's writing order also has the request, first writes the float
3, finally understand why IE so annoying
A three-column example, the middle column adaptive
There is a problem here, there will be a small gap between the three columns, which is not in the FF, so if you want to form a continuous effect, you can define the background in main.
<textarea id="runcode55547"><! 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" > <!--#left { Float:left; width:200px; height:200px; Background:orange; } #middle {height:200px; Background: #eee; } #right {float:right; width:200px; height:200px; Background:black; -</style></textarea>
[Ctrl + A full selection Note: If you need to introduce external JS need to refresh to execute]
Vertical center of page
<textarea id="runcode47261"><style> #test {width:100px; height:100px; position:absolute; left:50%;top:50%; margin:-50px 0 0-50px; Background-color: #000} </style></textarea>
[Ctrl + A full selection Note: If you need to introduce external JS need to refresh to execute]
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.