Results 1 to 7 of 7
  1. #1
    Join Date
    Feb 2009
    Posts
    49
    Plugin Contributions
    0

    Default How do I add second link to header image?

    I'm looking to make the "Get your Salon and day spa package today" image, link to my products page. Anyone know how I can do this?

    www.SalonRoyalty.com

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

    Default Re: How do I add second link to header image?

    Does noone know how to do this?

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

    Default Re: How do I add second link to header image?

    It doesn't appear that the "Get Your..." image is a separate image, but part of the header bg. Is this correct? Assuming it is, you can add a new link to the header, and size it and position it absolutely so it covers the desired area.
    Something like
    PHP Code:
    <?php echo '<a id="spaDealLink" href="' HTTP_SERVER DIR_WS_CATALOG 'index.php?main_page=index&cPath=1">'?><span class="textAway">Get your Salon & Day Spa package today!</span></a></li>
    Add to your stylesheet:
    Code:
    #spaDealLink {
        display: block;
        position: absolute;
        top: 123px;
        left: 542px;
        width: 200px;
        height: 200px;
        }
    
    .textAway {
        position: relative;
        left: -9999px;
        }
    The .textAway allows the link to be meaningful to anyone, even using a screenreader, but puts the text way off the screen for ordinary users.

    The index.php?main_page=index&cPath=1 may need to be adjusted a bit, I don't have time right now to check it.

    Add the new link to /includes/templates/your_template/common/tpl_header.php below the logo code block.

  4. #4
    Join Date
    Feb 2009
    Posts
    49
    Plugin Contributions
    0

    Default Re: How do I add second link to header image?

    Thanks alot!! I really appreciate the help...a little tweaking and it is perfect. I had to remove the textaway because when you click the link a tan box pops up and runs the length of the screen. Unsure how to turn that off but I'm happy with the current results.

    Bravo!!

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

    Default Re: How do I add second link to header image?

    Glad to see you have it working.
    I'm going to guess that you have a 1280px monitor.
    The clickable area on my 1024px monitor is offset to the right of the text, because the position: absolute is calculating from the extreme left edge of the screen, which varies depending on the window width.
    In your stylesheet, find
    Code:
    /*wrappers - page or section containers*/
    #mainWrapper {
    
    	text-align: left;
    	width: 842px;
    	vertical-align: top;
    	background-image: url(../images/mainwrapper_tile.jpg);
    	background-repeat: repeat-y;
    	background-position: center;
    	}
    and add
    Code:
    	position: relative;
    Adjust the left spacing of the link as required.
    This will make the link position itself relative to the left edge of the main content, irrespective of the window width.

  6. #6
    Join Date
    Feb 2009
    Posts
    49
    Plugin Contributions
    0

    Default Re: How do I add second link to header image?

    I didn't even notice this and when I did, I came back to find the answer and you already had it posted. That's awesome!! Thanks so much!

  7. #7
    Join Date
    Oct 2006
    Location
    Alberta, Canada
    Posts
    4,571
    Plugin Contributions
    1

    Default Re: How do I add second link to header image?

    That's a nicely coded solution Glenn and sure beats using an Image Map.

    Thanks for sharing.

 

 

Similar Threads

  1. How to add second header image???
    By keis779 in forum Templates, Stylesheets, Page Layout
    Replies: 8
    Last Post: 30 Dec 2009, 04:50 PM
  2. Can I Add second image to main Icon image
    By touchclothing in forum General Questions
    Replies: 4
    Last Post: 30 Nov 2009, 09:19 PM
  3. Add image to EZPages header link
    By fbords in forum Templates, Stylesheets, Page Layout
    Replies: 1
    Last Post: 31 Dec 2008, 11:21 AM
  4. How do I add a second logo to the header?
    By gaukler in forum Templates, Stylesheets, Page Layout
    Replies: 7
    Last Post: 25 Nov 2006, 05:22 AM

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