X-Cart: shopping cart software

X-Cart forums (https://forum.x-cart.com/index.php)
-   Changing design (https://forum.x-cart.com/forumdisplay.php?f=51)
-   -   How do I insert an inmage in the head? (https://forum.x-cart.com/showthread.php?t=35674)

Swish 11-24-2007 03:49 AM

How do I insert an image in the head?
 
Hi,
On the default blue/lucid template how would one insert an image in the top part where your logo goes?

I'm assuming it would be a background image as your logo and the nav tabs are on top of it?

And what about size/stretch?

Any tips appriciated. Thanks

carpeperdiem 11-24-2007 06:11 AM

Re: How do I insert an inmage in the head?
 
Strings,

Time to learn about webmaster mode!

Webmaster mode will show you the entire template structure for any page... so you can determine that the logo lives in the file, /skin1/head.tpl

Then you can see that the logo lives in a <td> with a class="HeadLogo" --- but both td's live in a tr that does not have its own class...

SO -- if you want a background image for header, one way would be to place it using the css...

In your css, add this:

.StringsHead { BACKGROUND-IMAGE: url(images/header_background_image.gif); }

Then, put this class into the <tr> in head.tpl

FIND:
Code:

<tr>
    <td class="HeadLogo"><a href="{$http_location}/"><img src="{$ImagesDir}/xlogo.gif" width="244" height="67" alt="" /></a></td>

REPLACE WITH:
Code:

<tr class="StringsHead">
    <td class="HeadLogo"><a href="{$http_location}/"><img src="{$ImagesDir}/xlogo.gif" width="244" height="67" alt="" /></a></td>


And of course, upload your background image to /skin1/images

This is basic css -- sorry if it's too basic...

The thing to know is that xcart will tell you what template you need to edit if you use webmaster mode. Then it's basic css the rest of the way.

You can also strip the tables if you feel like it... but that's another thread.

Good luck.

Jeremy

carpeperdiem 11-24-2007 06:21 AM

Re: How do I insert an inmage in the head?
 
PS -- you may find this tutorial helpful:

http://www.w3schools.com/css/css_background.asp


All times are GMT -8. The time now is 10:56 PM.

Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.