i am very very new to neocities and html and all that. I am having an issue whenever i save my edits to the code and i click view my changes dont show up and when i leave and go back to the dashboard the file resets to its previous version. I don't know if this is something wrong with neocities or something wrong on my end.
Style.css troubles
CSS Not Working on Neocities
CSS won't update in the browser - Stack Overflow
.CSS not updating with .HTML file on neocities
You could have any number of issues, but I'd like to point out a cool tip when using Chrome.
On your page, with the developer tools open if you press and hold the reload button you get a great option to clear the cache and hard reload!

This is very handy to make sure you have the "freshest" copy while developing.
Update: As for your scenario (after reading updates) it sounds like an HTTP header issue with your CSS file.
Check what HTTP headers are being sent with your CSS file response. If you are not specifying a cache header it will likely try to cache for you. Set an expires header (in the past) when in development, but far in the future when in production. In the Network tab of your developer tools (most browsers) you should be able to see these headers, or you can use a too like Fiddler that will let you deeply inspect your network traffic.
Alternatively if you can't easily tweak the HTTP Headers, then set a far expires header, but ensure the path to the file changes whenever you make a code change. Options include:
- adding a time() stamp (always changes (yeah!) but doesn't cache (boo))
- add the version control # to the file URL (works great, but you need to manage the updates properly within your tooling)
- something fancier that creates a generated "fake" path to the file that auto changes on any modification to the file... but also loads the URL as expected, and sets the cache to "forever" (max 365 days according to the HTTP specs)
You may try queries to force the browser to load fresh CSS when it loads. To do this
<link rel="stylesheet" type="text/css" href="css-file-name.css?v=1.1">
If you are comfortable with php you may try below code to force the browser to load most updated CSS to load. To do this
<link rel="stylesheet" type="text/css" href="http://example.com/style.css?d=<?php echo time(); ?>" />
This will ensure browsers always load fresh CSS with last modified time stamp.
Hope this help you.
I'm new to html and css so my code might be wrong here but I've been trying to change the background colour and add a sidebar to make a menu on my neocities website but the .css files arent changing anything related to the website.
I'll add some detail and code also, so I have a index.css and style.css file, in the style.css I have a code that said 'body {
background-color: darkred;
}', I've now darkred to black but for some reason the .css hasnt changed (I click view and it still says darkred)
In the index.css I have code that says:
'#menubar {
width: 200px;
float: right;
padding: 10px;
background: white;
border: 2px black solid;
border-radius: 8px;
margin-top: 8px;
}'
and in the index.html i have '<div class="#menubar">'
edit: for some reason it works in codepen also but not neocities?
Hello! I'm absolutely brand new to this (I learned very basic HTML as a child but not much), so I've been following this tutorial to try and make a basic layout for my site. I've been writing the code in CodePen and everything seems to look fine (don't mind the silly placeholder text): https://codepen.io/catciuin/pen/OJvNzeM
I've already added the basic HTML to Neocities, which is also working fine. However, when I try to add the CSS link using <link rel="stylesheet" href="style.css">, it just doesn't show up at all. The stylesheet is just saved as "style.css" and is in the same folder as index.html - just the default folder, I haven't added any new ones. I've googled around and tried a few solutions with no luck, including adding other tags, creating a new .css file, adding . or ./ in front of style.css.
It also doesn't show up even if I add it into the HTML, without a separate file. I've tried adding it at the top or bottom of the page, inside <head> tags, just about every suggestion I've been able to find.
I can't figure out if I'm missing something really obvious or what :( any help would be really appreciated!
EDIT: I ran the same HTML & CSS on w3spaces and it seems to be just fine. Is this a neocities specific issue? :s