BOOTSTRAP EDITIONS

Asked

Viewed 55 times

2

I’m using a bootstrap theme with background image but the image doesn’t change. I went to css, I changed the background anyway and the image remains even being a url that no longer exists.

As there is nothing about html code, follow the css:

body {
    margin-top: 50px; 
}

.image-bg-fluid-height,
.image-bg-fixed-height {
    text-align: center;
    -webkit-background-size: cover;
    -moz-background-size: cover;
    background-size: cover;
    -o-background-size: cover;
}

.image-bg-fluid-height {
    background-color: grey;
    padding: 100px 0;
}

.image-bg-fixed-height {
    background-color: grey;
    height: 450px;
}

.img-center {
    margin: 0 auto;
}

section {
    padding: 75px 0;
}

.section-heading {
    margin: 30px 0;
    font-size: 4em;
}

.section-lead {
    margin: 30px 0;
}

.section-paragraph {
    margin: 30px 0;
}

footer {
    margin: 50px 0;
}

@media(max-width:768px) {
    section {
        padding-top: 25px;
        padding-bottom: 25px;
    }

    .section-heading {
        font-size: 2em;
    }
}

2 answers

3


This is probably because your site is saved in the browser cache, update the page by pressing

Ctrl+F5

  • That’s exactly what it was!

  • Good! If you can say that the answer was useful

  • I still can’t because of my reputation points, but I’ll remember to do that when I do.

1

It may be that there is in some other part of the code a css defining the background with the image in question and this is generating css conflict, to solve this conflict you can use the attribute !important that will serve to prioritize the css defined by you.

body{
   background-image: url("imagem.jpg") !important;
}
  • 1

    This will be very useful for another problem in another code that I have. Thank you.

Browser other questions tagged

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