unm4sk
unm4sk

Reputation: 345

Font (from Google Fonts) not showing up on website

@import url(https://fonts.googleapis.com/css?family=Raleway);

/* CSS RESET */
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%;
    vertical-align: baseline;
}

/* END CSS RESET */

body {
    background-color: #F5F5F5;
    font-family: 'Raleway', sans-serif;
}

.header {
    padding: 0% 1% 0% 1%;
    width: 98%;
    height: 60px;
    border-bottom: 1px solid #dbdbdb;
    display:flex;
    align-items:center;
}

.header .logo {
    padding-top:15px;
    height:45px;
    width:24%;
    float: left;
}

.header .logo img {
    max-width: 100%;
    height:30px;
}

.search {
    text-align: center;
    width: 50%;
    float: left;
    vertical-align: middle;
}

.mb {
    display: none;
}

.search input[type="text"] {
    border: 0;
    background-color: transparent;
    color: #dbdbdb;
    border: 1px solid #111111;
    border-radius: 9px;
    text-align: center;
}

.search input[type="text"]:focus {
    border: 2px solid #007AFF;
    outline: none;
    color: black;
}

.reglog {
    width: 24%;
    float: right;
    text-align: right;
}

.reglog button {
    background-color: transparent;
    border: 2px solid #009CFF;
    border-radius: 15px;
    padding: 1.5%;
    margin: 1%;
}

@media only screen and (min-width: 0px) and (max-width: 599px) {
    .search input[type="text"] {
        display: none
    }
    .mb {
        display: block;
    }
    body {
        font-family: 'Raleway'
    }
}

That's my CSS. I have tried linking it through file, through HTML, nothing works. This is the only CSS file. I'm really running out of ideas here, everything worked fine before. What could be the issue here?

Upvotes: 0

Views: 1289

Answers (3)

unm4sk
unm4sk

Reputation: 345

Apparently, something broke when I was making VirtualHosts on Apache, I have no idea how, disabling VHosts and returning to my standard URL scheme fixed the problem. Weird..

Anyways, thank you all that tried to help, I appreciate it.
Farewell!

Upvotes: 0

escplat12
escplat12

Reputation: 2511

You have to put the link in the html's head section, not in the css. Like this:

<head>
<link rel="https://fonts.googleapis.com/css?family=Raleway">
</head>

Then, you can call your font-family in the stylesheet.

Upvotes: 0

vignesh
vignesh

Reputation: 1011

As the google fonts while including in css file like this

@import url(https://fonts.googleapis.com/css?family=Raleway:400,500,400italic);

and not be as

@import url(https://fonts.googleapis.com/css?family=Raleway);

Upvotes: 1

Related Questions