2010-10-22 70 views
4

我一直試圖讓這個工作在過去兩天,但沒有成功。也許我對所有嵌套的div感到困惑,誰知道,但我可以用某人看代碼並指向正確的方向。我在做這個CSS佈局有什麼問題?

我有什麼:http://landgraff.com/backend/process.html

它應該是什麼樣子:http://landgraff.com/process.html

的原因,我重做這個網站是因爲我用原來的表,我試圖讓遠離使用表...所以這就是爲什麼我重做練習=]

下面是:http://landgraff.com/backend/css/ProcessStylesheet.css

@charset "utf-8"; 

#bodytext { 
    color: #6B6351; 
    font-family: arial, Arial, Helvetica, sans-serif; 
    font-size: 11px; 
    line-height: 14pt; 
    margin: 35px 0px 0px 30px; 
    width: 370px; 
} 

#logo { 
    float: left; 
    background: url(../images/logosmall.gif) no-repeat; 
    width: 75px; 
    height: 152px; 
    text-indent: -9999px; 
} 

#process_title { 
    clear: both; 
    float: left; 
    background: url(../images/process/process_title.gif) no-repeat; 
    width: 75px; 
    height: 347px; 
    text-indent: -9999px; 
} 

#header { 
    float: left; 
    background: url(../images/process/header.gif) no-repeat; 
    width: 163px; 
    height: 26px; 
    text-indent: -9999px; 
    margin-top: 1px; 
} 
+2

+1遠離表格 – 2010-10-22 19:26:10

回答

1
#bodytext { 
color:#6B6351; 
font-family:arial,Arial,Helvetica,sans-serif; 
font-size:11px; 
line-height:14pt; 
margin:35px 0 0 80px; 
width:395px; 
} 

#header { 
background:url("../images/process/header.gif") no-repeat scroll 0 0 transparent; 
height:26px; 
margin-left:100px; 
margin-top:159px; 
text-indent:-9999px; 
width:163px; 
} 

這是要走的路,如果你想保留你的標記和class/id。此外,您必須在副本的最後一行添加一個標籤。

對於初學者來說這很不錯,祝你好運!

+0

感謝您的回覆。這樣可行!所以基本上我必須得到我的利潤率和寬度?我喜歡使用Chrome的Inspect Element功能,因爲它允許我打開和關閉CSS以查看它具有的效果。有趣。如果你有時間,我會爲你在HTML/CSS代碼中做的任何事情而努力。我想保持,遠離桌子! – Stradigos 2010-10-22 21:08:10

+0

另外,刪除標題上的浮動屬性。 Mozzila的FireBug插件比Chrome的Inspect Element更好。試試吧,你會看到(大)差異! :) – Claudiu 2010-10-22 21:42:27