Clear floating 2-parent element settings overflow: hidden, 2-overflow

Source: Internet
Author: User

Clear floating 2-parent element settings overflow: hidden, 2-overflow

<! Doctype html>
<Html>
<Head>
<Meta charset = "UTF-8">
<Meta name = "Author" content = "Hu Chao">
<Title> super Hu </title>
<Style>
. News {
Background-color: gray;
Border: solid 1px black;
Overflow: hidden;
Zoom: 1;
/* Parent element overflow: hidden

Set the overflow value of the parent element to hidden. in IE6, hasLayout needs to be triggered, for example, zoom: 1;

Usage of Zoom:

Zoom: normal | number normal:

Default value. Use the actual size number of the object:

Percent | unsigned floating point real number. When the floating point value is 1.0 or the percentage is 100%, it is equivalent to the normal value of this attribute. in the vernacular, It is zoom: the following number is a magnification, which can be a value or a percentage. For example, zoom: 1, zoom: 120%. This attribute only works in IE, so it is rarely used in actual use, and is most often used to clear floating. */

}
. News img {
Float: left;
}

. News p {
Float: right;
}

</Style>
</Head>
<Body>
<Div class = "news clearfix">

<P> some text </p>
</Div>

</Body>
</Html>

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.