2010年10月19日星期二

css floating

1. margin

.news {background-color: gray; border: solid 1px black;}

.news img {float: left;}

.news p {float: right; }



some text





2. margin sample

.news {background-color: gray; border: solid 1px black;}

.news img {float: left; }

.news p { float: right; }

.clear {clear: both; }



some text






3. div floating

.news { background-color: gray; border: solid 1px black; float: left; }

.news img { float: left; }

.news p { float: right; }



some text




.news p { float: right; }



some text


没有评论: