我想要的效果就只有置中而已!
聽起來不會很難,但是我想要整個畫面的東西都是置中的!
想要的效果如下面的網址
http://www.icondrawer.com/main.php
下面是我的html
<body>
<div id="
top"><div id="top_1"><div id="top_3"></div>
<div id=
"top_2"></div></div></div>
<div id=
"vidual"><div id="vidual_1"><div id="vidual_2"></div></div>
</div>
</body>
以下是css
body
{
position:relative;
margin-top:0px;
}
[color=#ff0099]#top
{
width:1060px;
height:70px;
top:0px;
}
#top_1
{
background:url(images/index_1.gif);
width:255px;
height:70px;
position: absolute;
left:10px;
}
#top_2
{
background:url(images/index_2.gif);
width:682px;
height:70px;
position: absolute;
left:255px;
}
#top_3
{
background:url(images/index_3.gif);
width:123px;
height:70px;
position: absolute;
left:937px;
}
#vidual
{
width:1060px;
height:275px;
}
#vidual_1
{
background:url(images/index_4.gif);
width:255px;
height:275px;
position: absolute;
left:10px;
}
#vidual_2
{
background:url(images/index_5.gif);
width:561px;
height:275px;
position: absolute;
left:255px;
}
用了很久都不知道要怎麼用成置中!
而這邊我用了position:absolute(但是不知道這個是不是比較好因為這個要算px)
有沒有比較更好的方式可以讓我整個畫面是罝中!
就像在表格裡只要加上align="center"就好了!
div我是不知道問題是出在我html上面還是css上面!
css上面我沒有寫置中(因為…我不知道要怎麼寫才對!)
這邊是我做出來的樣子
麻煩請會的人指導一下…快想破頭了!
感謝幫忙!Orz
