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:
The change to the following CSS will take effect, but it is not what I want to set.
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.