Zen Cart Logo
Forums / Templates, Stylesheets, Page Layout / Need to 'float' my logo in the top-left corner

Need to 'float' my logo in the top-left corner

Locked

Views: 3,545

Results 1 to 4 of 4
This thread is locked. New replies are disabled.
22 Feb 2007, 2:53 AM
#1
rstevenson avatar

rstevenson

Totally Zenned

Join Date:
Nov 2006
Location:
Dartmouth, NS Canada
Posts:
2,400
Plugin Contributions:
0

Need to 'float' my logo in the top-left corner

Hi folk,

I hope someone's awake. :P

I can show my logo in the top-left corner by just putting it in the usual header.php file. But that forces the header to be too deep, because my logo is a vertical format.

I'd like to add it somewhere in a core file - no idea which one though - so that I can use CSS to position it where I want it and then I can use margins on other elements to keep them out of the way. In the CSS, position: absolute; would take my logo out of the flow, but I don't know where to add the logo. Which file should I put it in? And how?

I tried adding it to tpl_header.php, but only got its alt text to appear. I thought the path to the image must be wrong, but I tried every combination I could think of to no avail. This is what I started with, inside a div of course...

<img src="../images/TDP_logo_sm.jpg" alt="logo" border="0" width="96" height="200">

I also tried without ../ and without ../images/ but neither worked.

At the moment this version of the site is on my local machine, so it's not visible from the real world, if that's where you happen to be. :D

Any help gratefully received.

Rob (who is heading to bed because his eyes are crossing but who promises to read all your brilliant suggestions first thing tomorrow) :sleep:

22 Feb 2007, 4:17 AM
#2
stephantoth avatar

stephantoth

New Zenner

Join Date:
Jun 2006
Location:
Westminster
Posts:
47
Plugin Contributions:
0

Re: Need to 'float' my logo in the top-left corner

Have you tried identifying the existing logo gif or jpg file and just replacing that one with a picture of your logo?
Kind regards
Stephan Toth https://www.london-directory.biz

22 Feb 2007, 6:42 AM
#3
kobra avatar

kobra

Black Belt

Join Date:
Aug 2005
Location:
Arizona
Posts:
31,500
Plugin Contributions:
4

Re: Need to 'float' my logo in the top-left corner

Try this:

<img src="url(../images/TDP_logo_sm.jpg)" alt="logo" border="0" width="96" height="200">
22 Feb 2007, 2:09 PM
#4
rstevenson avatar

rstevenson

Totally Zenned

Join Date:
Nov 2006
Location:
Dartmouth, NS Canada
Posts:
2,400
Plugin Contributions:
0

Re: Need to 'float' my logo in the top-left corner

Hi kobra and Stephan,

Adding url() to the code didn't help kobra, though it was an interesting idea. It may still be that I was not putting my IMG tag in the right place, but...

Stephan's response, though I had already done what he suggested, pushed me to go back and have another look. Why add a new bit of code when I could just apply my styles to the existing bit? Sure enough, I can leave the logo where it already is in the code, replacing the image with my own of course, and then using position:absolute in the stylesheet I can take it out of the flow and move other things around to avoid it.

Must remember: if I'm rolling down the highway on four round things, I don't need to reinvent the wheel. :smartass:

Rob