+ 1
Please read, I can't connect my CSS file with my HTML file...
I've been trying for like an hour to connect my CSS file with my HTML file, I added to the "link" type="text/css", and nothing; I added media="screen" and nothing; I added to the html doc <!DOCTYPE html> as a last hope, and nothing... Both docs are in the same file, CSS is in a file inside the same file that html is, and I'm saying this because I didn't forget to put hre="css/estilos.css". I did every single thing I found on the Internet to solve my problem, but nothing happened, PLEASE HELP!
6 odpowiedzi
+ 3
The correct syntax for embedding external stylesheet is:
<link rel="stylesheet" href="styles.css">
I think you forget the rel attribute with the stylesheet value.
And remember that you can also embed CSS in HTML 4 with the link Tag and doesn't need to change the HTML type to HTML 5 for doing that.
0
No I didn't forget that value, I'm using SublimeText in my computer so it put the structure automatically, I don't know what to do
0
Try:
- Adding a "/" character before the style.css string.
- Using the attribute media, and giving it the "all" value:
<link type="text/css" rel="stylesheet" href="/style.css" media="all">
0
I can't because, as I said, I have it in a file so I put href=css/....
0
hola Sebastian necesitas colocarl tu archivo estilos.css en una carpeta llamada css. creala y coloca el archivo en ella. o elimina css/ y coloca solamente href=estilos.css
0
La tengo puesta en una carpeta que se llama css y, como ya dije, no me olvidé de poner en el href "css/estilos.css"...