0

about using css files on more than one page

I was on my programmer journey, and to save space, I decided to create an file called 'styleLayout.css', and in order to deploy it on more than one html page I connected all these html files with the styleLayoult file, but none accepted the styling that I had put it on.Question: can i only connect one css file to one html file? Grades: all files are at the same "directory level", so there are no problems with the 'href' of the 'link' Thanks for listening :)

10th Aug 2020, 10:38 PM
JoĂŁo Hoffman
JoĂŁo Hoffman - avatar
4 Answers
+ 4
No, reusing CSS that way is good! Are you sure that you added the stylesheet correctly? Your link should look something like <link rel="stylesheet" href="./styleLayout.css" /> Maybe try the old body { background: green; } to see if anything is happening at all.
10th Aug 2020, 10:44 PM
Schindlabua
Schindlabua - avatar
+ 2
JoĂŁo Hoffman Oh, yeah, maybe. If you can, start programming on a PC or laptop. You have a lot more control that way. (Also, a keyboard :D)
10th Aug 2020, 10:55 PM
Schindlabua
Schindlabua - avatar
+ 1
Schindlabua I tried using './' but it still didn't work, I believe the problem is the app I use, thanks for everything :)
10th Aug 2020, 10:52 PM
JoĂŁo Hoffman
JoĂŁo Hoffman - avatar
0
Schindlabua Yes man, maybe that's it, I'm in the struggle to get a computer, it really needs to be
10th Aug 2020, 10:58 PM
JoĂŁo Hoffman
JoĂŁo Hoffman - avatar