Isn't it easy to use CSS's big or swollen code?

Source: Internet
Author: User

Below isCode:

<Html>

<Head>

<Title> </Title>


<Style
Type= "Text/CSS">


# Div1

{


Width:500px;


Border:Solid
1px
Black;

}

 


# Div1
>
Div

{


Color:Red;

}

 


</Style>

</Head>

<Body>


<Div
ID= "Div1">

Here is parent


<Div
ID= "Childdiv1">Childdiv1


<Div
ID= "ChildDiv1-1">

ChildDiv1-1


</Div>


</Div>


<Div
ID= "Childdiv2">Childdiv2</Div>


<Div
ID= "Childdiv3">Childdiv3</Div>


<Div
ID= "Childdiv4">Childdiv4</Div>


</Div>


</Body>

</Html>

 

Note that this section of CSS does not take effect:


# Div1
>
Div

{


Color:Red;

}

 

The change to the following CSS will take effect, but it is not what I want to set.


# Div1
Div

{


Color:Red;

}

 

Solution:

I checked it and found it was an issue with IE document mode.

You can change it to IE7, IE8, or ie9.

However, it is very troublesome to change this place every time you open the page, and it is too cumbersome to change IE for every user.

What should I do?

You only need to add a piece of code in the head to force IE to display it with a specific document mode.

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.