I am trying to get a CSS file to turn the background of the website blue (more of a learning exercise than something practical)
I started by using inline CSS and that was fine. I thought the process would be as simple as replacing this inline CSS with a link to a CSS file that had the same code as the previous inline CSS
however when doing that I get a 404 error for the css file and the background does not turn blue. I can’t really find anything online showing me where I am going wrong and would be grateful for any feedback.
I have attached pictures to show what I mean in greater detail.
Please do not post images of code here - copy/paste the actual code into the text of your post, surrounded by lines of three backtick - ` characters. This means you’ll have a line of ```, then your code, then another line of ```.
You are correct in your assumption - it wasn’t clear to me that you were using Windows.
Note that you do not have a file named style.css. You have a file named style.css.txt
Side note: Regarding the images, it’s not so much a rule as a “strongly suggested” guideline. You’re not going to get in trouble, or anything like that, if you post images. However, you generally have a better chance of getting answers when you do post text.
There are three reasons why we request this:
The images aren’t always readable on every device being used to read the forum. (I write a fair number of replies on my cell phone - images can be particularly problematic there.)
The data in the images aren’t indexed by the forum and so don’t show up in a search.
The data in images can’t be quoted when there’s specific information that should be highlighted in a reply.
(And yes, there are cases where a picture may be worth 1000 words - in which case the images would be most appropriate - it’s a judgement call.)
That all makes sense. I assume my issue must be coming from the name of the file then. When I created the file I replaced the .txt with .css and thought that was enough but it must have put the .txt on the end anyway. Thanks for pointing that out I’ll try sorting that out and see if my problem is solved. Thanks a lot