Test.html:
<HTML> <br/> <pead> <br/> <LINK rel = "stylesheet" type = "text/CSS" Media = "screen" href = "c.css" mce_href = "c.css"/> <br/> </pead> <br/> <body> <br/> <Div id = "footer2"> <br/> This Is A footer2 div <br/> </div> <br/> <p id = "p1"> <br/> This Is A P1 P <br/> </P> <br /> <p id = "p2"> <br/> This is a P2 P <br/> </P> <br/> <Div id = "footer3"> <br/> This Is A footer3 Div <br/> </div> <br/> </body> <br/> </ptml>
C.css:
Div # footer2 {<br/> float: Left; <br/> background-color: # FAF; <br/> width: 200px; <br/> Height: 80px; <br/> margin: 10px; <br/>}< br/> # P1 {<br/> float: Right; <br/> background-color: # AFA; <br/> width: 200px; <br/> Height: 80px; <br/> margin: 2px; <br/>}< br/> # P2 {<br/> float: Right; <br/> background-color: # AFA; <br/> width: 200px; <br/> Height: 80px; <br/> margin: 2px; <br/>}< br/> # footer3 {<br/> float: right; <br/> Background: # AFE; <br/> width: 200px; <br/> Height: 80px; <br/> margin: 2px; <br/>}
1.
There are two <p> elements in the middle, so the problem arises. If margin is not set in CSS, it will look different in ff.
The height of P varies.
Add a margin, even if the limit is 0.
In 2.css, float and clear cannot be used together. Using clear together does not work.
So now I still don't know how to let footer2 clear both and let it float to the right. What should I do?