Heim > Artikel > Web-Frontend > div问题。速度回答下呵呵_html/css_WEB-ITnose
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><title>无标题页</title><script type='text/javascript' src='http://code.jquery.com/jquery-1.7.2.js'></script></head><body><style type="text/css">#head { margin:5px 500px auto;width:1000px; height:300px; background:#9FF;}#main {width:700px; height:300px; background:#9FF; float:right;}#tail { margin:5px 800px auto;width:700px; height:300px; background:#9FF;}#left{width:300px; height:700px; background:#9FF;float:left;}</style><body><div id="main">bbbb</div><div id="left">dddd</div><div style='clear:both'></div><div id="head">aaaa</div><div id="tail">cccc</div></body></html>
HTML code
nbsp;html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
1楼是对的,学习了。。
不知道可不可以用绝对定位呢?这个咋用的。。我还没用过
HTML code
nbsp;html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">