There are three layers in the middle div layer of the page. 1,2,3
I want these three layers to be displayed side by side. It can be displayed in Firefox but the middle and back layers have fallen off in IE.
Ask the experts how to solve it. . . .
Post the code~~
No one can help me
<style type="text/css"><!doctype html><style type="text/css">#pages {width:900px;background-color:black;margin:auto;}#d1 {width:200px;height:100px;float:left;background-color:red;}#d2 {width:200px;height:100px;float:left;background-color:yellow;}#d3 {width:200px;height:100px;float:left;background-color:green;}</style><div id="pages"><div id="d1"></div><div id="d2"></div><div id="d3"></div></div>
The above code: The first line is too much, so remove it:
<!doctype html><style type="text/css">#pages {width:900px;background-color:black;margin:auto;}#d1 {width:200px;height:100px;float:left;background-color:red;}#d2 {width:200px;height:100px;float:left;background-color:yellow;}#d3 {width:200px;height:100px;float:left;background-color:green;}</style><div id="pages"><div id="d1"></div><div id="d2"></div><div id="d3"></div></div>
Use a style sheet to control
You can also change the width to a percentage Control will automatically control the width of the div according to the size of the page~~
Thank you everyone, it was easy to fall off before because it was not in the same layer. Thank you. . .
DIV is adaptive to the width, it is not possible without adding floating code and width