skip to Main Content

I am using Twitter Bootstrap and made some changes to the navigation bar and the width of my content area through my custom stylesheet offline. Everything looked good locally.

But then I uploaded everything to the server and my new CSS rules are not applying. I opened the editor on the stylesheet on the server just to make sure that the changes I made were uploaded.

My style sheet IS there and is working except for the new rules.

Why aren’t my new rules being applied?

2

Answers


  1. It could be a number of things and without seeing your code it is hard to say. Check a few things. 1. that there aren’t extra spaces between your rules (for example width: 50 px; …there shouldn’t be a space between the 50 and the px…..Also make sure that if you have div class=”oneTwo” that you get the capitalization correct…sometimes locally these types of things are very forgiving of mistakes…

    Have you tried deleting the already existing files on your server then uploading fresh (instead of just replacing them)

    designarti has a point (has happened to me) where I’ve uploaded something and the old rules still apply but maybe 30 minutes later they kick in (especially on mobile)

    Best bet would be to post your code so people here can see if there is a mistake

    Login or Signup to reply.
  2. You can use F12 debugger to pin point the applied style sheet of particular element. For situation like this you can not just rely on one browser. Switch between various IE, FF, Chrome, some of them are more useful in particular situations.

    Also try FirFox FireBug and FireFox Web Developer. We with Web Developer, you edit css live which can be useful.

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search