Page 1 of 1
Add image into middle of the header...Help!!
Posted: Tue Feb 11, 2014 10:05 pm
by thye
Hi ,
How to add image into the middle of the header?
What is the actual size there?
Need help....!!

Re: Add image into middle of the header...Help!!
Posted: Wed Feb 12, 2014 1:48 am
by sammysomerset
You need to add the image to your header file and then reference it in the stylesheet... You're using a theme from the looks of it so make sure you edit the right ones. Make sure you back up any file you edit first!
In the header (ie catalog/view/theme/YOURTHEME/template/common/header.tpl), before <div id="welcome"> add a new line:
Code: Select all
<div id="yourpic"><img src="/catalog/view/theme/YOURTHEME/image/yourpicname.png" title="Your pic" alt="Your pic" /></div>
In the stylesheet (ie catalog/view/theme/YOURTHEME/stylesheet/stylesheet.css) at the end add:
Code: Select all
#yourpic {position:absolute; top:20px; left:370px; }
Upload the image to the directory you're referencing. Make sure the id matches the stylesheet one, and replace the filenames, title and alt with your ones, and just fiddle with the position (ie add more or less to the top or left in the css) until it's right.
For the size just do a screen grab and open in any design software, you can work out the size by creating a shape in the area you want there...
Hope that helps.
cheers,
Sam
Re: Add image into middle of the header...Help!!
Posted: Thu Feb 13, 2014 9:09 am
by thye
Hi Sam,
Thanks for your help.
I using opencart version 1.5.1.3.
Is this version work?
Rgd,
Re: Add image into middle of the header...Help!!
Posted: Fri Feb 14, 2014 1:23 am
by sammysomerset
Hi there, not sure - but assuming it's a similar setup to the one's I've been using (1.5.4 - 1.5.6), I can't see why not.
Just make sure you have a copy of the files you're editing.