I make a change in CSS but after Reload it goes back to normal

Asked

Viewed 318 times

4

I have the following View:

inserir a descrição da imagem aqui

I want to, change the position of CheckBox, then on View we have a div:

<div class="form-group">
    <div class="col-md-offset-2 col-md-10">
        <div class="checkbox">
            @Html.CheckBoxFor(m => m.RememberMe)
            @Html.LabelFor(m => m.RememberMe)
        </div>
    </div>
</div>

I got into CSS, I found the class CheckBox:

.radio input[type="radio"],
.radio-inline input[type="radio"],
.checkbox input[type="checkbox"],
.checkbox-inline input[type="checkbox"] {
  position: absolute;
  margin-left: -20px;
  margin-top: 4px \9;

So I changed the value of the properties margin-left: for 1px and the property margin-top: for 1px, getting:

.radio input[type="radio"],
.radio-inline input[type="radio"],
.checkbox input[type="checkbox"],
.checkbox-inline input[type="checkbox"] {
  position: absolute;
  margin-left: 1px;
  margin-top: 1px \9;
}

And then automatically the page was:

inserir a descrição da imagem aqui

However, when you click update, the CheckBox back to the original position, and the CSS continues with the new values, namely 1px to margin-left and 1px for margin-top

Updating:

I changed the CSS directly in the source code, in Debug mode worked after making a Master-Refresh (CTRL + F5), however, when performing the publication, it is shown in the old mode still.

So I cleaned the FTP server, and I did a new post, from scratch. I cleared the browser cache and used Chrome in mode Anonimo

And yet you still keep showing up the old-fashioned way.

  • 3

    Have you changed the CSS settings in the browser or edited the file in the source code? If you changed the source code, you have already tested a hard refresh in the browser? (CTRL + F5 in most browsers).

  • I changed the source code directly, I tested the (CTRL + F5) in Debug mode and it worked, but when I publish it still shows the old way.. I tried to delete the Bootstrap file from the server and send the new version, and it didn’t work...

  • 4

    It seems to be cache problem even, try to add a "version identifier" where you insert your stylesheet into html, something like that: <link rel="stylesheet" type="text/css" href="theme.css?v1">. Putting the ?v1 (may be whatever you prefer after the ?) the browser will fetch your again css caching. Ideally, we have compiled and minified code, but if that’s not possible, this is a good way to avoid caching problems. If that’s the problem. hehe

  • 2

    @Thomaserichpimentel two suggestions: 1-) include in the question that about where you changed the CSS and the fact that you have already changed on the server 2-) try Pedro’s suggestion in his comment above.

  • @Pedrocamarajunior guy, I don’t believe it’s cache, until pq, I cleared the browser cache, and also used it in version Anonima

  • @Renan update made.

  • 2

    You reported that on your machine after giving one (CTRL+F5) worked but on the server even cleaning cache and everything else continues the old way, right? I’ve had some similar problems with Ocaweb hosting. Some services use server caching that renews itself every time (hours, minutes, depends on configuration) and the way I found to solve this was @Pedrocamarajunior’s tip. Put a ?v=1 at the end of the css call and tell us what happened.

  • @Could Pedrocamarajunior give me some direction? How can I search about this? css version identifier? Thank you.

  • 1

    So@Thomaserichpimentel re-reading your question, and if you say it’s not cache, is your css not being overwritten? Take a test, create a new class for your checkbox and put it in your own style sheet and tell us the result. :)

  • 3

    @Pedrocamarajunior really was being written down, I created a new class, and then it worked. Thanks..

Show 5 more comments
No answers

Browser other questions tagged

You are not signed in. Login or sign up in order to post.