External media query stylesheet link not working

Magic

Posting Freak
Oct 11, 2012
1,026
196
Hello,
So I am working on my portfolio, I have nearly completed the index page and all is going well, I finished one media query in an external stylesheet to make it respond to a min width of 1024px which I tested and worked perfect on a monitor of that screen. I than decided to clean my directory by moving all my css into a folder called css.

My other two stylesheet links work well,

Code:
<link href="css/animations.css" rel="stylesheet">
<link rel="stylesheet" type="text/css" href="css/styles.css">

how ever my responsive.css is not accepting the move and now no longer works?

Code:
<link href="css/responsive.css" rel="stylesheet">

Someone help :(
 

Weasel

👄 I'd intercept me
Nov 25, 2011
4,135
2,461
Well both in animations.css and responsive.css you are missing type="text/css" - not sure if that's the problem though. Also check your Developer Tools -> Console for any errors.
 

Sysode

Front-End Developer
Dec 11, 2012
1,673
848
Well both in animations.css and responsive.css you are missing type="text/css" - not sure if that's the problem though. Also check your Developer Tools -> Console for any errors.
That shouldn't be an issue. Within the HTML5 spec, it's not required, most people just seem to use it for consistency - no harm done if you use it or not.

Mind if I just clear your issue up a bit more? So your CSS was all working fine until you moved the directory, now 1 CSS file doesn't work (that being the responsive one)?

Also, can you post your responsive.css contents, the linking you have should all be fine - providing it's set up correctly and placed within the <head></head> section of your page.
 

Magic

Posting Freak
Oct 11, 2012
1,026
196
That shouldn't be an issue. Within the HTML5 spec, it's not required, most people just seem to use it for consistency - no harm done if you use it or not.

Mind if I just clear your issue up a bit more? So your CSS was all working fine until you moved the directory, now 1 CSS file doesn't work (that being the responsive one)?

Also, can you post your responsive.css contents, the linking you have should all be fine - providing it's set up correctly and placed within the <head></head> section of your page.
Exactly correct,
Code:
@media only screen 
and (min-width: 1024px) {
 .cont_1_text {
 font: 400 3.5em/125% 'Amatic SC', Helvetica, Sans-serif;
 font-size: 130px;
 color: #ffffff;
}

.cont_1_text2 {
 font: 400 3.5em/125% 'Amatic SC', Helvetica, Sans-serif;
 font-size: 60px;
 color: #ffffff;
}


}
 

Sysode

Front-End Developer
Dec 11, 2012
1,673
848
Exactly correct,
Code:
@media only screen
and (min-width: 1024px) {
.cont_1_text {
font: 400 3.5em/125% 'Amatic SC', Helvetica, Sans-serif;
font-size: 130px;
color: #ffffff;
}

.cont_1_text2 {
font: 400 3.5em/125% 'Amatic SC', Helvetica, Sans-serif;
font-size: 60px;
color: #ffffff;
}


}
Do you have the following in your HTML <head> before the stylesheet linking?
HTML:
<meta content="width=device-width, initial-scale=1.0" name="viewport">
 

Users who are viewing this thread

Top