Home html does not connect an external CSS file

does not connect an external CSS file

Author

Date

Category

The external CSS file does not connect, but if you make the same styles from the CSS file in HTML, everything works, the path to the file has been checked several times, everything is correct. Why can styles do not work?

& lt; link href = "/ resources / style.css" REL = "STYLESHEET" & GT;
/ * Eric Meyer's 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%;
  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;
  Background-image: resursi / background.jpg;
}
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;
}
/ * End of Eric Meyer's CSS Reset * /
Article, Aside, Details, Figcaption, Figure, Footer, Header, Hgroup, Main, Nav, Section, Summary {
  Display: Block;
}
Body {
  font: 12px / 18px arial, sans-serif;
  width: 100%;
}
.wrapper {
  width: 1000px;
  Margin: 0 AUTO;
}
/ * Header.
---------------------------------------------------- --------------------------- * /
.Header {
  Height: 150px;
  Background: # 00FFFF;
}
/ * Middle
---------------------------------------------------- --------------------------- * /
.content {
  background-color: #FFFFFF;
}
/ * Footer.
---------------------------------------------------- --------------------------- * /
.footer {
  HEIGHT: 100px;
  Background: # BFF08E;
}

or something wrong with the operator? Where did I make a mistake?

http://imgur.com/bgc1gkr Now pops up this error


Answer 1

Firstly why at the end there is a slash?
It must be:

& lt; link href = "/ resources / style.css" REL = "STYLESHEET" & GT;

Next, check whether the path is correctly specified, at the beginning there is a slash, it means the path will be from the root of the site, for example:

ya.ru/resources/style.css

And if you go to this path in the browser, you should get this file, this happens?

and how it turns out that & lt; link & gt; you have along with CSS, it must be in the HTML document, and if it is, the rest of the CSS should be in the & lt; style & gt;

It is also worth sure that the file is really flooded to the server successfully.

Next, pay attention to the HTACCESS file, maybe something is not so configured in it.


Answer 2

& lt; style & gt; @import "resources / style.css" & lt; / style & gt; MB so

Programmers, Start Your Engines!

Why spend time searching for the correct question and then entering your answer when you can find it in a second? That's what CompuTicket is all about! Here you'll find thousands of questions and answers from hundreds of computer languages.

Recent questions