Home >Web Front-end >HTML Tutorial >float closure (clear float) and CSS HACK_html/css_WEB-ITnose

float closure (clear float) and CSS HACK_html/css_WEB-ITnose

WBOY
WBOYOriginal
2016-06-24 11:39:51996browse

1. float closed (clear float)


Add the following code to Global CSS and add class="clearfix" to the div that needs to be closed. It works every time.

2. CSS HACK

The following two methods can solve almost all HACKs today.
1, !important
With IE7's support for !important, the !important method is now only for IE6's HACK. (Pay attention to the writing. Remember that the declaration position needs to be in advance.)


2, IE6/IE77 vs. FireFox
* html *html is a tag unique to IE and is not supported by firefox. And *html is a tag unique to IE7.


Note:
* html HACK for IE7 must ensure the following statement at the top of the HTML:

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn