Results 1 to 3 of 3
  1. #1
    Join Date
    Feb 2011
    Location
    Between London and Cetinje
    Posts
    107
    Plugin Contributions
    0

    Idea or Suggestion Clickable Background image

    Hi,

    I'm trying to make a clickable background image in my css file. I defined a path to the background image in stylesheet.css but not shure how to make it clickable. This question is more about CSS than Zen Cart but if someone has already done this can it share with others?

    My CSS looks like this:

    body {
    margin: 0;
    font-family: arial, helvetica, sans-serif;
    font-size: 0.72em;
    color: #333333;
    background: url('/images/background.jpg') #e5e5e5;
    background-repeat:no-repeat;
    background-position:center;
    background-attachment:fixed;
    line-height: 17px;
    }
    -------------------

    The line in red is what I defined in CSS.

    Many thanks.

  2. #2
    Join Date
    May 2009
    Posts
    1,219
    Plugin Contributions
    2

  3. #3
    Join Date
    Feb 2017
    Location
    Australia
    Posts
    4
    Plugin Contributions
    0

    Default Re: Clickable Background image

    This may be useful to others.
    I am using the avignon template for the zencart version v1.5.5d, so what I did may only work for this particular template.
    I was trying to make the background image clickable but no matter what I tried I couldn't make it work.

    So I went into the file for this template "includes/templates/avignon/common/tpl_header.php" to search for the text of "store name" (which can be edited in the admin>configuration>MyStore>Store Name) to see if I could at least make that clickable (I liked the background image without any logo).

    I found the line of text that read...
    <div class="headerTitle"><h1 class="shadow"><?php echo STORE_NAME; ?></h1><h1><?php echo STORE_NAME; ?></h1></div>

    Edited that by adding (in red) a html code link as such...
    <div class="headerTitle"><a href="http://yoursite.com/"><h1 class="shadow"><?php echo STORE_NAME; ?></h1><h1><?php echo STORE_NAME; ?></h1></a></div>

    That made the whole background image in the header clickable which is what I wanted originally it to be.

    I haven't checked to see if that works in any other templates, but it at least works for this nice template.

    Cheers and I hope that helps someone else,
    Chris.

 

 

Similar Threads

  1. v150 Re: Can I make background Image clickable link?
    By scott_ease in forum Templates, Stylesheets, Page Layout
    Replies: 0
    Last Post: 30 Nov 2014, 08:40 AM
  2. Background image cover entire background w/one image
    By oxicottin in forum Templates, Stylesheets, Page Layout
    Replies: 43
    Last Post: 3 Apr 2012, 03:18 PM
  3. Clickable Background Image - How To?
    By DBB1 in forum Templates, Stylesheets, Page Layout
    Replies: 11
    Last Post: 24 Aug 2010, 06:38 AM
  4. Can I make background Image clickable link??
    By gaffettape in forum Templates, Stylesheets, Page Layout
    Replies: 9
    Last Post: 21 Apr 2010, 12:40 AM
  5. add background image to a attribute then have that background image act as hyperlink
    By sike1234 in forum Setting Up Categories, Products, Attributes
    Replies: 0
    Last Post: 14 Nov 2008, 05:38 PM

Bookmarks

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
Zen-Cart, Internet Selling Services, Klamath Falls, OR