eliteitsolutions.ie Posted November 26, 2014 Share Posted November 26, 2014 Hi I can't seem to add a image to the background of my theme. I have tried a few different codes but none of them seem to work?Any ideas please? Link to comment Share on other sites More sharing options...
eliteitsolutions.ie Posted November 27, 2014 Author Share Posted November 27, 2014 Is there any help on this at all please? Link to comment Share on other sites More sharing options...
eliteitsolutions.ie Posted November 27, 2014 Author Share Posted November 27, 2014 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 More sharing options...
eliteitsolutions.ie Posted November 27, 2014 Author Share Posted November 27, 2014 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.belvg_backgroundpages.zip Link to comment Share on other sites More sharing options...
eliteitsolutions.ie Posted November 27, 2014 Author Share Posted November 27, 2014 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. belvg_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 More sharing options...
eliteitsolutions.ie Posted November 27, 2014 Author Share Posted November 27, 2014 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 More sharing options...
Recommended Posts