让2个DIV居中并排显示
时间:2007-01-31 来源:whhw118
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<style>
div {
position:absolute;
top:50%;
left:50%;
margin:-100px 0 0 -120px;
}
</style>
<div style="background:#404040;width:120px;"></div>
<div style="background:#FD7C03;width:120px;margin:-100px 0 0 0px;"></div>
<style>
div {
position:absolute;
top:50%;
left:50%;
margin:-100px 0 0 -120px;
}
</style>
<div style="background:#404040;width:120px;"></div>
<div style="background:#FD7C03;width:120px;margin:-100px 0 0 0px;"></div>
相关阅读 更多 +