2013-11-24 51 views
0

我剛纔驗證,這些錯誤上來:的CSS解析錯誤

對不起!我們發現以下錯誤(2)URI:simple.css 320解析 錯誤.tftable {font-size:100%; color:#e0ece8;寬度:100%;邊框寬度:.1em; border-color:#ffffff; border-collapse:collapse; } 356解析錯誤#wrapper { background:#fff;顏色:#b6c5be; }

我試過簡單地刪除東西,但弄亂了我的網頁上的所有顏色。下面是代碼,行320-356:

<style type="text/css"> 
.tftable { 
font-size:100%; 
color:#e0ece8; 
width:100%; 
border-width:.1em; 
border-color: #ffffff; 
border-collapse: collapse; 
} 

.tftable th { 
font-size:105%; 
background-color:#354640; 
border-width: .1em; 
padding: 1em; 
border-style: solid; 
border-color: #354640; 
text-align:center; 
border-bottom: solid .4em #6b806f; 
} 

.tftable tr { 
background-color:#9db2a6; 
} 

.tftable td { 
font-size:105%; 
border-width: .1em; 
padding: 0.8em; 
border-style: solid; 
border-color: #6b806f; 
} 

.tftable tr:hover { 
background-color:#b6c5be; 
} 

</style> 

和這裏的整個事情:

/* 
|-------------------------------------------------------------------------- 
| General Text Formatting 
|-------------------------------------------------------------------------- 
*/ 

html, body { 

    font-family: "Helvetica Neue", Helvetica, Arial, sans-serif; 
    font-size: 100%; 

    background: #b6c5be; 
    color: #151816; 
} 

h1 { 
    font-family: Georgia, palatino, serif; 
    font-size: 300%; 
    font-weight: normal; 
    color: #151816; 
    margin: 0 0 .5em 0; 
    text-align:center; 

} 

h2 { 
    font-size:120%; 
    font-weight: bold; 
    padding: 1em 0 0.7em 0; 
} 
    h3 { 
    font-size:120%; 
font-family: Georgia, palatino, serif; 
    text-align:center; 
    padding: 1em 0 0.8em 0; 
    font-weight: bold; 
} 


    h4 { 
    font-size:110%; 
    color: #e3f2ed; 

} 
     h5 { 
    font-size:140%; 
    color: #e3f2ed; 
    text-align:center; 
    font-weight: bold; 
} 




p { 
    line-height: 150%; 
    padding: 0 0 1em 0; 
    text-align:justify; 
} 

ul { 
    padding: 0 0 0 2em; 
    list-style: disc; 
} 

ol { 
    padding: 0 0 0 2em; 
    list-style: decimal; 
} 

li { 
    padding: 0 0 1em 0; 
} 

strong { 
    font-weight: bold; 
} 

em { 
    font-style: italic; 
} 

blockquote { 
    color: #000000; 
    background: #9db2a6; 
    padding: 1em 1em 0 1em; 
    margin-bottom: 1em; 
    font-size: 130%; 
    border-bottom: solid .4em #6b806f; 
    border-top: solid .4em #6b806f; 
} 




#footer { 

    /* 
    colours for text within the 
    footer division, ie <p id="footer"> 
    */ 
     padding: 1em 1em 1em 1em; 
    color: #e3f2ed; 
    background-color: #354640; 

      text-align:right; 
} 

.screen-reader-only { 

    /* 
    This is a special class used to prevent text from 
    being displayed on screen, while still making it visible to 
    screen readers. Use this class if you want to add extra 
    descritive text for visually impaired users, but don't want 
    that description to be visible for other users. 

    For example: 
    <p class="screen-reader-only">Special text for screen readers</p> 
    */ 

    text-indent: 100%; 
    white-space: nowrap; 
    overflow: hidden; 
    position: absolute; 
    top: 0; 
    left: 0; 
} 





/* 
|-------------------------------------------------------------------------- 
| Page Links 
|-------------------------------------------------------------------------- 
*/ 

a:link { 
    color: #000000; 
    font-weight: bold; 
    text-decoration: none; 

} 

a:visited { 
    color: #000000; 
     font-style:italic; 
    text-decoration: none; 
} 

a:hover { 
    font-style:italic; 
} 

a:active { 
    color: #000000; 
} 





/* 
|-------------------------------------------------------------------------- 
| Top Navigatin Links 
|-------------------------------------------------------------------------- 

TOP NAVIGATION LINKS 
The following styles control the appearence 
of the top navigation links, eg. 
<a class="top-link" href="default.htm">Home</a> 

*/ 

a.top-link { 
    /* 
    these styles will apply to ALL links (:link, :visited, :hover and :active) unless  
    */ 
    display: block; 
    padding: .7em 0 .7em 0; 
    margin: 0 1em 0 2em; 
    background: #9db2a6; 
    color: #000000; 

    padding: 0; 
    line-height: 2.5em; 
} 

.top-link:link { 
    /* styles for normal, unvisited links can be set here */ 
    /* these styles will override the defaults set for .top-link above */ 
    text-decoration: none; 
     border-bottom: solid .3em #9db2a6; 
} 

.top-link:visited { 
    /* styles for links once visited can be changed here */ 
    /* these styles will override the defaults set for .top-link above */ 
    text-decoration: none; 
    border-bottom: solid .3em #9db2a6; 
} 

    .top-link:hover { 
    /* styles for top links when a user hovers over it can be changed here */ 
    text-decoration: none; 
    border-bottom: solid .3em #6b806f; 
} 

.top-link:active { 
    /* Styles for when the link is being clicked can be changed here */ 
} 

.top-link.selected:link, .top-link.selected:visited { 

    /* Sets the style of a link that has been selected (ie. has a class of selected) 
     for example (note the additional class "selected"): 
     <a class="top-link selected" href="content.htm">Content Page</a> 
    */ 

    border-bottom: solid .3em #354640; 
    cursor: default; 
} 





/* 
|-------------------------------------------------------------------------- 
| Footer Links 
|-------------------------------------------------------------------------- 

Change these if you want your footer links to have a 
different style to other links 

*/ 

#footer a:link { 

    color: #e3f2ed; 
    font-weight: bold; 
} 

#footer a:visited { 

    color: #e3f2ed; 
    font-weight: bold; 
} 

#footer a:hover { 

    font-style:italic; 
} 

#footer a:active { 

    color: #e3f2ed; 
} 





/* 
|-------------------------------------------------------------------------- 
| Header Colours 
|-------------------------------------------------------------------------- 
*/ 

#header { 

     /* 
     Colours for <div id="header"> 
     See layout.css for layout and size properties 
     */ 

    background: #00016c url(../images/headbit.gif) repeat-x top left; 
    color: #354640; 
} 


#nav { 

     /* 
     Colours for <ul id="nav"> 
     See layout.css for layout and size properties 
     */ 

    background: #9db2a6; 
    color: #000000; 
} 



<style type="text/css"> 
.tftable { 
font-size:100%; 
color:#e0ece8; 
width:100%; 
border-width:.1em; 
border-color: #ffffff; 
border-collapse: collapse; 
} 

.tftable th { 
font-size:105%; 
background-color:#354640; 
border-width: .1em; 
padding: 1em; 
border-style: solid; 
border-color: #354640; 
text-align:center; 
border-bottom: solid .4em #6b806f; 
} 

.tftable tr { 
background-color:#9db2a6; 
} 

.tftable td { 
font-size:105%; 
border-width: .1em; 
padding: 0.8em; 
border-style: solid; 
border-color: #6b806f; 
} 

.tftable tr:hover { 
background-color:#b6c5be; 
} 

</style> 



#wrapper { 
    background: #fff; 
    color: #b6c5be; 
} 





    /* 
    |-------------------------------------------------------------------------- 
| Widget Box Colours 
|-------------------------------------------------------------------------- 

Colour styles for widget boxes, ie <li class="widget"> 
See layout.css for layout and size properties 

*/ 

.widget { 
    background: #9DB2A6; 
    color: #000000; 
    border-bottom: solid .4em #6b806f; 

} 

.widget-heading { 
    color: #E3F2ED; 
    font-family: "Helvetica Neue", Helvetica, Arial, sans-serif; 
    background: #354640; 
    border-bottom: solid .4em #6b806f; 
} 

任何幫助將不勝感激!

+0

你是在哪裏驗證你的CSS?我查看了你在W3C CSS驗證器提供的示例,並且驗證正確,只有以下警告:**。tftable th - 背景顏色和邊框顏色相同的顏色** – WebChemist

回答

0

我看到有一個風格標籤:擺脫它。

.tftable tr:hover { 
background-color:#b6c5be; 
} 

</style> 

#wrapper { 
    background: #fff; 
    color: #b6c5be; 
} 

除此之外,你的CSS似乎很好。

+0

只是刪除它搞砸了顏色。當我也刪除#wrapper時,一切都得到修復。奇怪。多謝你們! – user3026755

0

我不用什麼CSS解析器,你正在使用。它似乎有效,我已經使用W3C CSS validator進行了測試。

沒有錯誤,但有一個警告說,

.tftable th一色換背景顏色和邊框顏色

+0

這只是它的一大塊。我也使用了w3c驗證器。 這是整個事情 – user3026755