2017-05-28 4 views
0

Hey Leute, ich kann die Schwebefarbe meines (a) Elements aus irgendeinem Grund nicht ändern. Es hängt aus irgendeinem Grund im Browser-Standard fest? Kann mir jemand sagen warum?Kann die Farbe für Link aus irgendeinem Grund nicht ändern?

/* http://meyerweb.com/eric/tools/css/reset/ 
 
    v2.0 | 20110126 
 
    License: none (public domain) 
 
*/ 
 

 
html, 
 
body, 
 
div, 
 
span, 
 
applet, 
 
object, 
 
iframe, 
 
h1, 
 
h2, 
 
h3, 
 
h4, 
 
h5, 
 
h6, 
 
p, 
 
blockquote, 
 
pre, 
 
a, 
 
abbr, 
 
acronym, 
 
address, 
 
big, 
 
cite, 
 
code, 
 
del, 
 
dfn, 
 
em, 
 
img, 
 
ins, 
 
kbd, 
 
q, 
 
s, 
 
samp, 
 
small, 
 
strike, 
 
strong, 
 
sub, 
 
sup, 
 
tt, 
 
var, 
 
b, 
 
u, 
 
i, 
 
center, 
 
dl, 
 
dt, 
 
dd, 
 
ol, 
 
ul, 
 
li, 
 
fieldset, 
 
form, 
 
label, 
 
legend, 
 
table, 
 
caption, 
 
tbody, 
 
tfoot, 
 
thead, 
 
tr, 
 
th, 
 
td, 
 
article, 
 
aside, 
 
canvas, 
 
details, 
 
embed, 
 
figure, 
 
figcaption, 
 
footer, 
 
header, 
 
hgroup, 
 
menu, 
 
nav, 
 
output, 
 
ruby, 
 
section, 
 
summary, 
 
time, 
 
mark, 
 
audio, 
 
video { 
 
    margin: 0; 
 
    padding: 0; 
 
    border: 0; 
 
    font-size: 100%; 
 
    font: inherit; 
 
    vertical-align: baseline; 
 
} 
 

 

 
/* HTML5 display-role reset for older browsers */ 
 

 
article, 
 
aside, 
 
details, 
 
figcaption, 
 
figure, 
 
footer, 
 
header, 
 
hgroup, 
 
menu, 
 
nav, 
 
section { 
 
    display: block; 
 
} 
 

 
body { 
 
    line-height: 1; 
 
} 
 

 
ol, 
 
ul { 
 
    list-style: none; 
 
} 
 

 
blockquote, 
 
q { 
 
    quotes: none; 
 
} 
 

 
blockquote:before, 
 
blockquote:after, 
 
q:before, 
 
q:after { 
 
    content: ''; 
 
    content: none; 
 
} 
 

 
table { 
 
    border-collapse: collapse; 
 
    border-spacing: 0; 
 
} 
 

 

 
/* 
 
    ================================= 
 
    Custom Styles 
 
    ================================= 
 
*/ 
 

 
body { 
 
    color: #888; 
 
    font: 300 16px/22px "Open Sans", "Helvetica Neue", Helvetica, Arial, sans-serif; 
 
} 
 

 

 
/* 
 
    ================================= 
 
    Grid 
 
    ================================= 
 
*/ 
 

 
*, 
 
*:before, 
 
*:after { 
 
    -webkit-box-sizing: border-box; 
 
    -moz-box-sizing: border-box; 
 
    box-sizing: border-box; 
 
} 
 

 
.container, 
 
.grid { 
 
    margin: 0 auto; 
 
} 
 

 
.container { 
 
    padding-left: 30px; 
 
    padding-right: 30px; 
 
} 
 

 
.col-1-3 { 
 
    width: 33.33%; 
 
} 
 

 
.col-2-3 { 
 
    width: 66.66%; 
 
} 
 

 
.col-1-3 { 
 
    display: inline-block; 
 
    vertical-align: top; 
 
} 
 

 
.grid, 
 
.col-1-3, 
 
.col-2-3 { 
 
    padding-left: 15px; 
 
    padding-right: 15px; 
 
} 
 

 
.center-me { 
 
    text-align: center; 
 
} 
 

 

 
/* 
 
    ====================== 
 
    Clearfix 
 
    ====================== 
 
*/ 
 

 
.group:before .group:after { 
 
    content: ""; 
 
    display: table; 
 
} 
 

 
.group:after { 
 
    clear: both; 
 
} 
 

 
.group { 
 
    clear: both; 
 
    *zoom: 1; 
 
} 
 

 

 
/* 
 
    ============================== 
 
    Primary Header 
 
    ============================== 
 
*/ 
 

 
.logo { 
 
    text-align: center; 
 
} 
 

 

 
/* 
 
    =============================== 
 
    Typography 
 
    =============================== 
 
*/ 
 

 
h1, 
 
h3, 
 
h4, 
 
h5, 
 
p { 
 
    margin-bottom: 22px; 
 
} 
 

 
h1 { 
 
    color: #a67c00; 
 
    font-size: 24px; 
 
    line-height: 44px; 
 
} 
 

 
h2 { 
 
    font-size: 21px; 
 
    line-height: 44px; 
 
} 
 

 
h3 { 
 
    font-size: 21px; 
 
} 
 

 
h4 { 
 
    font-size: 18px; 
 
} 
 

 
h5 { 
 
    /* \t color: #a9b2b9;*/ 
 
    font-size: 14px; 
 
    /* font-weight: 400;*/ 
 
    strong { 
 
    font-weight: 400; 
 
    } 
 
    cite, 
 
    em { 
 
    font-style: italic; 
 
    } 
 
    /* 
 
    ================================ 
 
    Buttons 
 
    =============================== 
 
*/ 
 
    .btn { 
 
    border-radius: 5px; 
 
    display: inline-block; 
 
    margin: 0; 
 
    } 
 
    .btn-alt { 
 
    border: 1px solid #dfe2e5; 
 
    padding: 10px 30px; 
 
    } 
 
    .primary-nav { 
 
    font-size: 14px; 
 
    font-weight: 400; 
 
    letter-spacing: .5px; 
 
    text-transform: uppercase; 
 
    } 
 
    /* 
 
    ================== 
 
    Links 
 
    ================== 
 
*/ 
 
    a:hover { 
 
    color: #a67c00; 
 
    } 
 
    a { 
 
    color: #000000; 
 
    }
<title>Rysh</title> 
 

 
<body> 
 
    <!--header--> 
 

 
    <header class="container center-me"> 
 
    <h1 class="logo">Rysh</h1> 
 
    <nav class="primary-nav"> 
 
     <a href="shop.html">Shop</a> 
 
     <a href="about.html">About</a> 
 
    </nav> 
 
    </header> 
 
</body>

Sie können meine (a) Element in der CSS-zuunterst, die Spitze ist nur ein CSS

Antwort

6

Ihre CSS zurückgesetzt siehe hat einen Syntaxfehler. Ihre H5-Regel wurde nicht ordnungsgemäß geschlossen, was danach zu einem Problem mit allem führte.

h5 { 
    /* color: #a9b2b9;*/ 
    font-size: 14px; 
/* font-weight: 400;*/ 
strong { 
    font-weight: 400; 
} 

Sollte sein:

h5 { 
    /* color: #a9b2b9;*/ 
    font-size: 14px; 
} 

strong { 
    /* font-weight: 400;*/ 
    font-weight: 400; 
} 
+3

Ich upnoviert, um den Downvote zu negieren. Ich bin wirklich neugierig, warum es einen Downvote gab, das ist eine absolut gültige Antwort. –

+0

Danke @ MarkoGrešak, ich frage mich das gleiche haha ​​ – hellojebus

+1

Das ist die Antwort, die ich gerade gefunden habe, nachdem ich es in eine Geige geworfen habe. Fügen Sie einen Link dazu hinzu: https://jigsaw.w3.org/css-validator/ – sheriffderek

1

Sie haben einen Syntaxfehler in Ihrem CSS-Code hier:

h5 { 
 
font-size: 14px; 
 
         strong { 
 
         font-weight: 400; 
 
         } 
 
cite, 
 
         em { 
 
         font-style: italic; 
 
         }

, was fehlt? ;-)

Close 'h5' mit einem "}"


h5 { 
 
font-size: 14px; 
 
        strong { 
 
        font-weight: 400; 
 
        } 
 
cite, 
 
        em { 
 
        font-style: italic; 
 
        } 
 
}

* Viel Glück!

Verwandte Themen