kenhas kenhas - 7 months ago 25
Javascript Question

ASP MVC website with vegas background slideshow not showing background after publishing to server

There are a lot of "no background after publish" but they all seem to have url problem, a problem i'm not having.

I created a mvc website in Visual Studio 2015. I use the Vegas Background Slideshow (Click) to show a nice background. And when i run it locally, everything is fine. But when i publish it's not. Just a blank background, no images.

Even with the absolute url, the background is not showing. When i look in Developer Tools in Chrome, i see all the images are accessible and i can see the jquery working. It changes the background every couple of seconds but the image just doesn't show.

Console is not showing any errors. I'm assuming if the images can be accessed directly, it's not a permission problem.

The vegas javascript is firing, as can be seen in Developer Tools. The vegas css in included.

It's probably going to be something extremly simpel but i just cannot see it

Answer

It looks like all your vegas styles are not being used on your site. Looking at your imported stylesheet it seems you have an issue with a css comment.

.body-content {
    background-color:white;
    filter: alpha(opacity=90);
    opacity:.90;
    padding-left:5px;
    padding-right:5px;
    /*height: 90vh;
}*/
.vegas-overlay, ....

The .body-content doesn't have a closing brace, it probably should be this:

.body-content {
    background-color:white;
    filter: alpha(opacity=90);
    opacity:.90;
    padding-left:5px;
    padding-right:5px;
    /*height: 90vh;*/
}
.vegas-overlay,