views:

370

answers:

2

I'm confused by some behavior in Firebug.

I'm trying to update my CSS and I made changes to the actual CSS file and saved them.

If I update a directive on an existing selector, those changes will be rendered when I reload the page. However, if I add a new class ( e.g. boxQuestion ), and create a new selector, it won't render at all. The new selector doesn't seem to be displaying at all. Neither in the rendered HTML or in what Firebug is displaying.

I have tried clearing the cache and restarting my development server, but it still won't add the new selectors.

What am I doing wrong?

I'm developing in Django and using runserver.

A: 

possibly your CSS is incorrect. Do your changes appear in source view?

SpliFF
I'm not completely sure which source view you are refering too, I'm going to assume you mean the CSS buttom to view CSS source in Firebug.The answer to that question is; no, the new selector is not showing up in that window.Here is the CSS for class=boxQuestion:.boxQuestion { border-top:1px solid #EFEFEF; clear:both;}
BryanWheelock
I'm talking about View->Page Source (Ctrl-U). But anyway, assuming your changes are actually reaching the browser the reason is likely to be a line in your CSS file that is preventing all lines below it from being parsed. Run your CSS and HTML through the w3c validator and see if any errors come up.
SpliFF
+1  A: 

Things to try

  1. double clicking the browser refresh button to get the new css
  2. restarting the development server
  3. quit Firebug and restart the browser
  4. see if your development server is server the correct CSS file and selectors http://localhost:8000/media/liquid.css

The Most Import thing is to: 5. Validate your CSS with the CSS validator:

 http://jigsaw.w3.org/css-validator/

I had some comments in the CSS file immediately before the class selector. I had just used # to annotate the comments. This is incorrect syntax for CSS

When I surrounded the comments with /* #comment */ the problem went away.

BryanWheelock