Results 1 to 2 of 2

Thread: [RESOLVED] Why doesn't my CSS class rule get used

  1. #1

    Thread Starter
    Super Moderator FunkyDexter's Avatar
    Join Date
    Apr 2005
    Location
    An obscure body in the SK system. The inhabitants call it Earth
    Posts
    7,900

    Resolved [RESOLVED] Why doesn't my CSS class rule get used

    I'm just trying to teach myself a bit of CSS and it's pretty straight forward but I am getting something odd.

    I built a css file, tried out various rules, all good.

    Now I edit the css file. Everything compiles ok but it's still using the rules as they were before I edited them. I've even removed some of them from the css file and they're still being used. I tried removing the reference to the css file and the rules all stop being used (as I'd expect) but when I add the reference back in and the old rules reappear but not the new ones. Aargh!

    I'm guessing there's some 'built' version of the css file and that's what's actually being used. But rebuilding the web sire isn't causing the built css to refresh itself so my edits aren't being picked up.

    Any clues?




    edit> forget it, I was hitting f5 not ctrl f5. Just a bit of cuture shock switching from desktop dev.
    Last edited by FunkyDexter; Jan 28th, 2012 at 12:46 PM.
    The best argument against democracy is a five minute conversation with the average voter - Winston Churchill

    Hadoop actually sounds more like the way they greet each other in Yorkshire - Inferrd

  2. #2
    ASP.NET Moderator gep13's Avatar
    Join Date
    Nov 2004
    Location
    The Granite City
    Posts
    21,963

    Re: [RESOLVED] Why doesn't my CSS class rule get used

    Hello,

    Editing and updating CSS files can be tricky. The browser that you are using will try very hard to aggressively cache any items that it can locally, rather than re-download them each time.

    When you make a CSS change, you want to make sure that you clear your browser's temporary file cache first, then access your page.

    Typically, when I have made a change, and I want to make sure that the change came through, I alternate another setting (such as background colour) so I can be sure that the change has come through to the browser.

    Gary

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width