Jump to content

How to add image in backgroud V:1.5


Recommended Posts

When I put the code in as:

background-image: url('..themes/default/img/christmas.jpg');
it can't find the image.

Put then when I look on the website it shows up this code:

url('http://www.eliteitsolutions.ie/themes/default/css/..themes/default/img/christmas.jpg')

so I have created the following path with the image to see: themes/default/css/themes/default/img put it still doesn't seem to work.

Really any help on this would be great please
Link to comment
Share on other sites

I also tried using this module which works great. But I don't want it as repeat. I want it as center center fixed which makes the image perfect.

 

But I can only edit the code from the public website and can't seem to find the code through the css files.

 

attachicon.gifbelvg_backgroundpages.zip

Ok I got it resolved with this module here:

 

This module works fine, i just didn't want the image to repeat on the page.

 

I had to edit the code in: belvg_backgroundpages/js/jquery.belvg_backgroundpages.js

 

line: 4,8,10 and 65

 

var backgroundPages = {
init : function(){
if(specific_img){
$('body').css('background', 'url('+specific_img+') no-repeat center center fixed ');
return;
}
if($.cookie("bg_pattern")){
$('body').css('background', 'url('+$.cookie("bg_pattern")+') no-repeat center center fixed ');
}else if(default_pattern){
$('body').css('background', 'url('+default_pattern+') no-repeat center center fixed ');
}
if($('#switch').hasClass('opened')){
backgroundPages.toggleBox(this);
}
resetCookie : function(){
$('#reset_cookie').click(function(){
$.cookie("bg_pattern", null);
$('body').css('background', 'url('+default_pattern+') no-repeat center center fixed; ');
$('#patterns .var, #patterns .non-var').removeClass('active');
var is_empty = true;
$('#patterns div div').each(function(){
if($(this).find('img').attr('src')==default_pattern){
is_empty = false;
$(this).addClass('active');
}
});
if(is_empty){
$('#patterns .non-var').addClass('active');
}
});
}
 
Link to comment
Share on other sites

 

Ok I got it resolved with this module here:

 

This module works fine, i just didn't want the image to repeat on the page.

 

I had to edit the code in: belvg_backgroundpages/js/jquery.belvg_backgroundpages.js

 

line: 4,8,10 and 65

var backgroundPages = {
init : function(){
if(specific_img){
$('body').css('background', 'url('+specific_img+') no-repeat center center fixed ');
return;
}
if($.cookie("bg_pattern")){
$('body').css('background', 'url('+$.cookie("bg_pattern")+') no-repeat center center fixed ');
}else if(default_pattern){
$('body').css('background', 'url('+default_pattern+') no-repeat center center fixed ');
}
if($('#switch').hasClass('opened')){
backgroundPages.toggleBox(this);
}
resetCookie : function(){
$('#reset_cookie').click(function(){
$.cookie("bg_pattern", null);
$('body').css('background', 'url('+default_pattern+') no-repeat center center fixed; ');
$('#patterns .var, #patterns .non-var').removeClass('active');
var is_empty = true;
$('#patterns div div').each(function(){
if($(this).find('img').attr('src')==default_pattern){
is_empty = false;
$(this).addClass('active');
}
});
if(is_empty){
$('#patterns .non-var').addClass('active');
}
});
}
 

 

Ok it works great on desktop. But the center center fix doesn't seem to work on mobile?

Link to comment
Share on other sites

×
×
  • Create New...