Forums

CSS disappears after saving HTML file.

I reload the app, refresh the page in question, but still no CSS style. My static file are loading properly, but the CSS style disappears from my HTML page after saving it. Same things happens to inline CSS directly applied to the HTML. Anyone else had this problem. For an example, please see http://spivotron.pythonanywhere.com/signup/ The content should be centered but is thrust to the left.

Which CSS rule in which file is meant to be centering it? It looks like it's laying out correctly based on the rules I can see.

If you haven't used it already (sorry if I'm telling you about something you're already an expert in!), the "Elements" tab in Chrome's "Developer tools" is a useful way of debugging this kind of thing.

Also Firefox's Developer Tools (F12) is complaining about missing jQuery re. some of your included .js files.

Thanks for posting, guys. I have used the Elements tab before. In fact that's where I noticed my style wasn't showing up. If I try to add a <div> to the page, like <div class= "login">, it won't show. If I add the login class to an existing element, the class disappears. On the signup page, there is a form. If I apply the login class with <form class = "login">, then class = "login" disappears.

Thanks for your help. Once I find a solution, I will post back here. In the meantime, I welcome any and all suggestions.

Regards, Henry

I wonder if it's what jgmdavies says, something to do with the missing jQuery? Perhaps that's breaking some JavaScript somewhere and that's causing knock-on effects on the CSS. I can't quite see how, but Bootstrap is pretty complex and there could easily be non-obvious dependencies. I think you just need to add a <script> tag for jQuery.