Results 1 to 9 of 9
  1. #1
    Join Date
    Dec 2008
    Location
    Canberra, Australia
    Posts
    85
    Plugin Contributions
    0

    Default Changing background colours from hex code to image tile

    Hi guys,

    I have installed zencart onto my existing site. The background colours on my site are images tiled "bg_yel.gif" and "bg_gy.gif"

    How can I instruct my stylesheet to use these images as the background and not a hex code?

    Or alternatively, is there a way I can use a program to tell me what the hex colours of these gifs are? They are block colours, not patterns.

    Thanks in advance.

  2. #2
    Join Date
    Apr 2006
    Location
    London, UK
    Posts
    10,569
    Plugin Contributions
    25

    Default Re: Changing zen background colours from hex code to image tile

    Adding the following to the styles for the element whose background you want to set would do it
    background-image: url(../images/bg_yel.gif)
    To find out what color the images are you could use any graphics package that has a color picker, or the ColorZilla add-in to Firefox.
    Kuroi Web Design and Development | Twitter

    (Questions answered in the forum only - so that any forum member can benefit - not by personal message)

  3. #3
    Join Date
    Dec 2008
    Location
    Canberra, Australia
    Posts
    85
    Plugin Contributions
    0

    Default Re: Changing zen background colours from hex code to image tile

    Thanks very much, Ill give that a go!

  4. #4
    Join Date
    Jul 2005
    Location
    Upstate NY
    Posts
    22,010
    Plugin Contributions
    25

    Default Re: Changing zen background colours from hex code to image tile

    Note that you are not going to get alternating tiles of two different background images in one element, if that is what you had in mind (you didn't say exactly how they were used).
    If you do want alternating "tiles", your best bet is to combint the two images into one bigger image, quartered with two squares one color and two squares the other. Then when that image tiles, you will get the alternating tile look.


    OK, found your site and you are not wanting alternating tiles, but different colors on different elements. Nevermind :)

  5. #5
    Join Date
    Dec 2008
    Location
    Canberra, Australia
    Posts
    85
    Plugin Contributions
    0

    Default Re: Changing zen background colours from hex code to image tile

    Hey guys, what images folder should I put the background tile in? I tried it in the following images folder and it didnt work...

    \includes\templates\template_default\images

    this was in conjunction with the code Kuroi gave me which looks fine to me.

    code: background-image: url(../images/bg_yel.gif)

    Do the files for backgrounds have to be gifs or are jpgs fine too? I used jpg as I didnt think there would be a difference.

  6. #6
    Join Date
    Jul 2005
    Location
    Upstate NY
    Posts
    22,010
    Plugin Contributions
    25

    Default Re: Changing zen background colours from hex code to image tile

    You can use any kind of image for the background tile, but if you put in your stylesheet
    background-image: url(../images/bg_yel.gif);
    the image has to be a gif. If you want to use a jpeg, call it like
    background-image: url(../images/bg_yel.jpg);

    Which element did you add that background-image to?

    The image file should go in the /images/ folder of your custom template, whatever its name is.
    You need to add the background-image code to the stylesheet for your custom template, too.
    What is your template's folder name?

  7. #7
    Join Date
    Dec 2008
    Location
    Canberra, Australia
    Posts
    85
    Plugin Contributions
    0

    Default Re: Changing background colours from hex code to image tile

    Hi all, I got it working now. If you check out www.sgtpepper.com.au and www.sgtpepper.com.au/store you will see that the backgrounds are now identical. Im quite stoked about this.

    Not sure what I did wrong the first time.

    Now I have another question re some buttons I want to add to my zencart. Ill post seperately for that, if you guys could help again it would be much appreciated.

  8. #8
    Join Date
    Feb 2009
    Posts
    2
    Plugin Contributions
    0

    Default Re: Changing background colours from hex code to image tile

    I made these changes but the image isn't going to the background. I put the same image to the body and to the mainwrapper, but nothing. Could this have something to do with GoDaddy also?

  9. #9
    Join Date
    Feb 2009
    Posts
    2
    Plugin Contributions
    0

    Default Re: Changing background colours from hex code to image tile

    Never mind - I have an eroneous underscore in my path - works fine now.

 

 

Similar Threads

  1. Background,colours,Logo image
    By mayhem13 in forum Templates, Stylesheets, Page Layout
    Replies: 13
    Last Post: 11 Jan 2011, 02:44 PM
  2. Tile Image
    By electrifire in forum Templates, Stylesheets, Page Layout
    Replies: 3
    Last Post: 8 Feb 2010, 11:49 PM
  3. changing background image from many tiles to one piece.
    By birdlim in forum Templates, Stylesheets, Page Layout
    Replies: 5
    Last Post: 28 Mar 2008, 09:33 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg