Guest Posted July 3, 2011 Posted July 3, 2011 Hello I want to add a image in the top right of the page to the header of the website Can anyone let me know on how to do this please Thank you so much Ian
germ Posted July 3, 2011 Posted July 3, 2011 Depends on which version of osC you have installed. I don't see that mentioned anywhere. :) If I suggest you edit any file(s) make a backup first - I'm not perfect and neither are you. "Given enough impetus a parallelogramatically shaped projectile can egress a circular orifice." - Me - "Headers already sent" - The definitive help "Cannot redeclare ..." - How to find/fix it SSL Implementation Help Like this post? "Like" it again over there >
Guest Posted July 3, 2011 Posted July 3, 2011 Sorry does help dont it I have oscommerce 2.3.1 installed
germ Posted July 3, 2011 Posted July 3, 2011 One way: /catalog/includes/header.php Find the current code for the logo. On a vanilla install it looks like this: <div id="storeLogo"><?php echo '<a href="' . tep_href_link(FILENAME_DEFAULT) . '">' . tep_image(DIR_WS_IMAGES . 'store_logo.png', STORE_NAME) . '</a>'; ?></div> Change to: <div id="storeLogo"><?php echo '<a href="' . tep_href_link(FILENAME_DEFAULT) . '">' . tep_image(DIR_WS_IMAGES . 'store_logo.png', STORE_NAME) . '</a>'; ?> <?php echo tep_image(DIR_WS_IMAGES . 'your_image_name_here', 'Alt text here', '', '', 'style="margin-left: 545px; margin-top: 5px;"'); ?> </div> In that code change your_image_name_here to the name of the other image you want to display. Also change Alt text here to the text you want displayed on a mouseover. Depending on the width of the new image you also might need to adjust the number in this part of the code: margin-left: 545px; Then in /catalog/stylesheet.css find this code: #header { height: 60px; } Change to something like this: #header { height: 110px; } Again, depending on the size of the image you may have to adjust the new number. All the numbers I used are based on duplicating the existing stock logo so it's approx. flush with the right side. Sometimes after changing the stylesheet in order to see any change you have to hold the <Ctrl> key down while doing a page refresh in the browser to force the browser to reload all contents from the server, including the newly changed stylesheet. I tried this on my WAMP server and it worked fine in IE7 and FF3.0 Alway backup a file before making any edits. A file that doesn't work quite like you want it to is better than one than won't work at all. :) If I suggest you edit any file(s) make a backup first - I'm not perfect and neither are you. "Given enough impetus a parallelogramatically shaped projectile can egress a circular orifice." - Me - "Headers already sent" - The definitive help "Cannot redeclare ..." - How to find/fix it SSL Implementation Help Like this post? "Like" it again over there >
Recommended Posts
Archived
This topic is now archived and is closed to further replies.