2011-12-14 59 views
0

我的最後是重新創建一個基本的HTML頁面與我自己的CSS像csszengarden.com。 我在http://randallmiller.pcriot.com/72bclass/final72b/index.html做了一個簡單的一頁交易。 但是我的一些鏈接不可點擊。這是該網站的CSS。任何幫助將不勝感激!無法點擊一些超鏈接由於CSS格式

編輯:我修復了z-index:1的不可點擊部分,我認爲是因爲linkblock2上的填充。但是,現在我的a:把它們變成灰色只是少數。

html{ 
    height:100%; 
} 

body{ 
    background:#000000; 
} 

h3{ 
    margin-top:0; 
} 

h3 span{ 
    color:white; 
    display:block; 
} 

.pgtitle1{ 
    word-spacing:10px; 
    padding-top:25px; 
    margin-left:125px; 
    font:1.5em "Trebuchet MS", Arial, Helvetica, sans-serif; 
} 

.pgtitle2{ 
    padding-top:10px; 
    margin-left:275px; 
    font:bold .7em "Comic Sans MS", cursive; 
    letter-spacing:2px; 
} 

div#linkblock1{ 
    position:absolute; 
    top:200px; 
    padding-left:25%; 
} 

div#linkblock2{ 
    position:absolute; 
    top:200px; 
    padding-left:67.5%; 
} 

div a{ 
    border-bottom:solid 1px white; 
    text-decoration:none; 
    text-align:center; 
    padding:5px; 
    display:block; 
    width:90px; 
} 

div a:hover{ 
    color:rgb(200,200,200); 
} 

div a:visited{ 
    color:blue; 
} 

div#fg_img{ 
    height:323px; 
    background:url(bg.jpg) no-repeat center; 
    margin-top:50px; 
    line-height:999; 
    overflow:hidden;  
} 

h2{  
    font-size:.75em; 
    color:#FFF; 
    position:absolute; 
    top:10px; 
    left:60px; 
} 
+0

在[文本瀏覽器](http://www.delorie.com/web/lynxview.html)中對此進行測試。用CSS讓事情變得非常好,但是頁面應該沒有樣式表。 – Quentin 2011-12-14 23:21:39

回答

1

您已經使用#fg_img覆蓋了一些鏈接。設置一些z-index es。

+0

謝謝,這是一種可能性,爲什麼我的a:hover不在某些鏈接上工作? – Randallsm83 2011-12-14 23:21:29

+1

你已經在`:hover`之後定義了`:visited`,所以如果訪問了一個鏈接,`:visited`風格將覆蓋`:hover`風格。 – Quentin 2011-12-14 23:23:19

0

你的div以許多奇怪的方式彼此重疊,位置:絕對div與正確的鏈接「linkblock2」重疊在左邊的鏈接。

你應該真的刪除位置:絕對和在div上使用float,並且你不會遇到這個問題。

不確定它是否是一個選項,但如果您可以在您的任務上使用它,請查看CSS Grid系統。