Jump to content

Background image make static no repeat


Recommended Posts

Hi all and thanks in advance.

I have read a few topics on here and managed to set my background to an image,

my css etc skills are "in developement" shall we say :-)

 

website link is

http://obd2equipment.com/shop/index.php

 

what i want to do is set the image so it does not repeat, i have tried adding "no-repeat" after the text where i set my image correctly but it did not work, the image then disappeared and gave me a white background

this was the code as i wrote it

background-image: url(../img/bg.jpg) no-repeat!important; }

 

after I have achieved this then what i would like to do next is to set it set the image so it is static to the screen size and have the shop content move over the image

an example of this is on my website in the bottom container of my website where the black and red image stays static and the webpage moves over the image (it is in the container in this example but i want it to be static over the entire shop main body)

http://obd2equipment.com

 

James

Link to comment
Share on other sites

Yeah i managed to figure it out, this is for version 1.6

around line 240 the new code is

 

body {
  font-family: Arial, Helvetica, sans-serif;
  font-size: 13px;
  line-height: 1.42857;
  color: #777777;
   background-image: url(../img/bg.jpg);
    background-repeat: no-repeat;
  background-attachment: fixed;
  background-size: cover; }
 
this is me modifying the standard default bootstrap theme
I made my picture and saved it as a jpeg (bg.jpg)
uploaded it to the images folder
went to the /shop/themes/default-bootstrap/css folder
modify the global.css file
changed the line "background:" to "background-image:" then added in the "url(../img/bg.jpg)"
to fix the image and have no repeat add in the 3 extra lines
background-repeat: no-repeat;
background-attachment: fixed;
background-size: cover;
 
and dont forget the "}" to finish the command
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...