Zen Cart Logo
Forums / Templates, Stylesheets, Page Layout / Where do you paste image ready sliced header code?

Where do you paste image ready sliced header code?

Locked

Views: 5,783

Results 1 to 20 of 28
This thread is locked. New replies are disabled.
2 May 2007, 11:16 PM
#1
gws76 avatar

gws76

Zen Follower

Join Date:
Apr 2007
Posts:
151
Plugin Contributions:
0

Where do you paste image ready sliced header code?

The header I designed in photoshop I used the slice tool in image ready to allow for hyperlink capabilities. Now I want to upload via ftp to my server to replace the current header. Where do I paste this code for the image ready slices? Also I have six different headers with the same set up (the tab is colored different depending on what page you are on. How do I set up so the header will change depending on the page you are on?

3 May 2007, 7:43 AM
#2
cam_oai avatar

cam_oai

New Zenner

Join Date:
May 2007
Posts:
11
Plugin Contributions:
0

Re: Where do you paste image ready sliced header code?

if u can coding php, use if else to change the header. at the page's top, define a name so the if else knows where ur pages are

3 May 2007, 6:48 PM
#3
gws76 avatar

gws76

Zen Follower

Join Date:
Apr 2007
Posts:
151
Plugin Contributions:
0

Re: Where do you paste image ready sliced header code?

cam_oai:

if u can coding php, use if else to change the header. at the page's top, define a name so the if else knows where ur pages are

I'm sorry but I don't understand what you are saying. I need to find the location to paste this html code for my header.

3 May 2007, 7:20 PM
#4
gjh42 avatar

gjh42

Black Belt

Join Date:
Jul 2005
Location:
Upstate NY
Posts:
21,876
Plugin Contributions:
8

Re: Where do you paste image ready sliced header code?

You would put a test before the header image display similar to

if ($current_page_base == 'index') {
    $header_img = 'header_index.gif'
    }
elseif ($current_page_base == 'product_info') {
    $header_img = 'header_productinfo.gif'
    }
etc...

and then use $header_img where the image filename should go:

<img src="' . $header_img . '">

This will probably need to be tweaked a bit to fit your actual situation. If you are using plain HTML, you will need to add <?php and ?> tags.

3 May 2007, 7:26 PM
#5
gjh42 avatar

gjh42

Black Belt

Join Date:
Jul 2005
Location:
Upstate NY
Posts:
21,876
Plugin Contributions:
8

Re: Where do you paste image ready sliced header code?

Note - there is also a method for using CSS to change the header background image... lots of possibilities.

3 May 2007, 9:13 PM
#6
gws76 avatar

gws76

Zen Follower

Join Date:
Apr 2007
Posts:
151
Plugin Contributions:
0

Re: Where do you paste image ready sliced header code?

gjh42:

You would put a test before the header image display similar to

if ($current_page_base == 'index') {
$header_img = 'header_index.gif'
}
elseif ($current_page_base == 'product_info') {
$header_img = 'header_productinfo.gif'
}
etc...

> ```php
<img src="' . $header_img . '">
```This will probably need to be tweaked a bit to fit your actual situation. If you are using plain HTML, you will need to add <?php and ?> tags.

> **gjh42:**
>
> Note - there is also a method for using CSS to change the header background image... lots of possibilities.

Sorry can you give me a little more coaching.  Right now my header image is named logo.gif.  The new headers are composed of 24 slices (which are gif images)  individually for each header.  There is a sample below of the html code for my home page header.  Which php file I'm I actually modifying to insert this code and where exactly in the php file will I paste it?  I can paste you php file for whatever one you would need if you need to look at it.

When I do a search via the develpers tools for logo.gif it shows up in 

**/home/content/v/i/t/vitamins6/html/admin/includes/languages/english.php**
 
 **/home/content/v/i/t/vitamins6/html/includes/languages/english/classic/header.php

****/home/content/v/i/t/vitamins6/html/includes/languages/english/header.php**
 
And <div id="logoWrapper"> shows up in 
 **/home/content/v/i/t/vitamins6/html/includes/templates/template_default/common/tpl_header.php**
**
**<HTML>
<HEAD>
<TITLE>home</TITLE>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
<!-- ImageReady Styles (home.psd) -->
<STYLE TYPE="text/css">
<!--

#home-01 {
    position:absolute;
    left:0px;
    top:0px;
    width:18px;
    height:176px;
}

#home-02 {
    position:absolute;
    left:18px;
    top:0px;
    width:761px;
    height:110px;
}

#home-03 {
    position:absolute;
    left:779px;
    top:0px;
    width:21px;
    height:176px;
}

#home-04 {
    position:absolute;
    left:18px;
    top:110px;
    width:761px;
    height:9px;
}

#home-05 {
    position:absolute;
    left:18px;
    top:119px;
    width:622px;
    height:2px;
}

#home-06 {
    position:absolute;
    left:640px;
    top:119px;
    width:75px;
    height:32px;
}

#home-07 {
    position:absolute;
    left:715px;
    top:119px;
    width:64px;
    height:57px;
}

#home-08 {
    position:absolute;
    left:18px;
    top:121px;
    width:140px;
    height:55px;
}

#home-09 {
    position:absolute;
    left:158px;
    top:121px;
    width:59px;
    height:23px;
}

#home-10 {
    position:absolute;
    left:217px;
    top:121px;
    width:29px;
    height:55px;
}

#home-11 {
    position:absolute;
    left:246px;
    top:121px;
    width:83px;
    height:23px;
}

#home-12 {
    position:absolute;
    left:329px;
    top:121px;
    width:9px;
    height:55px;
}

#home-13 {
    position:absolute;
    left:338px;
    top:121px;
    width:93px;
    height:23px;
}

#home-14 {
    position:absolute;
    left:431px;
    top:121px;
    width:4px;
    height:55px;
}

#home-15 {
    position:absolute;
    left:435px;
    top:121px;
    width:94px;
    height:23px;
}

#home-16 {
    position:absolute;
    left:529px;
    top:121px;
    width:12px;
    height:55px;
}

#home-17 {
    position:absolute;
    left:541px;
    top:121px;
    width:83px;
    height:23px;
}

#home-18 {
    position:absolute;
    left:624px;
    top:121px;
    width:16px;
    height:55px;
}

#home-19 {
    position:absolute;
    left:158px;
    top:144px;
    width:59px;
    height:32px;
}

#home-20 {
    position:absolute;
    left:246px;
    top:144px;
    width:83px;
    height:32px;
}

#home-21 {
    position:absolute;
    left:338px;
    top:144px;
    width:93px;
    height:32px;
}

#home-22 {
    position:absolute;
    left:435px;
    top:144px;
    width:94px;
    height:32px;
}

#home-23 {
    position:absolute;
    left:541px;
    top:144px;
    width:83px;
    height:32px;
}

#home-24 {
    position:absolute;
    left:640px;
    top:151px;
    width:75px;
    height:25px;
}

-->
</STYLE>
<!-- End ImageReady Styles -->
</HEAD>
<BODY BGCOLOR=#FFFFFF>
<!-- ImageReady Slices (home.psd) -->
<DIV ID="home-01">
    <IMG SRC="images/home_01.gif" WIDTH=18 HEIGHT=176></DIV>
<DIV ID="home-02">
    <IMG SRC="images/home_02.gif" WIDTH=761 HEIGHT=110></DIV>
<DIV ID="home-03">
    <IMG SRC="images/home_03.gif" WIDTH=21 HEIGHT=176></DIV>
<DIV ID="home-04">
    <IMG SRC="images/home_04.gif" WIDTH=761 HEIGHT=9></DIV>
<DIV ID="home-05">
    <IMG SRC="images/home_05.gif" WIDTH=622 HEIGHT=2></DIV>
<DIV ID="home-06">
    <IMG SRC="images/home_06.gif" WIDTH=75 HEIGHT=32></DIV>
<DIV ID="home-07">
    <IMG SRC="images/home_07.gif" WIDTH=64 HEIGHT=57></DIV>
<DIV ID="home-08">
    <IMG SRC="images/home_08.gif" WIDTH=140 HEIGHT=55></DIV>
<DIV ID="home-09">
    <IMG SRC="images/home_09.gif" WIDTH=59 HEIGHT=23></DIV>
<DIV ID="home-10">
    <IMG SRC="images/home_10.gif" WIDTH=29 HEIGHT=55></DIV>
<DIV ID="home-11">
    <IMG SRC="images/home_11.gif" WIDTH=83 HEIGHT=23></DIV>
<DIV ID="home-12">
    <IMG SRC="images/home_12.gif" WIDTH=9 HEIGHT=55></DIV>
<DIV ID="home-13">
    <IMG SRC="images/home_13.gif" WIDTH=93 HEIGHT=23></DIV>
<DIV ID="home-14">
    <IMG SRC="images/home_14.gif" WIDTH=4 HEIGHT=55></DIV>
<DIV ID="home-15">
    <IMG SRC="images/home_15.gif" WIDTH=94 HEIGHT=23></DIV>
<DIV ID="home-16">
    <IMG SRC="images/home_16.gif" WIDTH=12 HEIGHT=55></DIV>
<DIV ID="home-17">
    <IMG SRC="images/home_17.gif" WIDTH=83 HEIGHT=23></DIV>
<DIV ID="home-18">
    <IMG SRC="images/home_18.gif" WIDTH=16 HEIGHT=55></DIV>
<DIV ID="home-19">
    <IMG SRC="images/home_19.gif" WIDTH=59 HEIGHT=32></DIV>
<DIV ID="home-20">
    <IMG SRC="images/home_20.gif" WIDTH=83 HEIGHT=32></DIV>
<DIV ID="home-21">
    <IMG SRC="images/home_21.gif" WIDTH=93 HEIGHT=32></DIV>
<DIV ID="home-22">
    <IMG SRC="images/home_22.gif" WIDTH=94 HEIGHT=32></DIV>
<DIV ID="home-23">
    <IMG SRC="images/home_23.gif" WIDTH=83 HEIGHT=32></DIV>
<DIV ID="home-24">
    <IMG SRC="images/home_24.gif" WIDTH=75 HEIGHT=25></DIV>
<!-- End ImageReady Slices -->
</BODY>
</HTML>
3 May 2007, 10:10 PM
#7
gjh42 avatar

gjh42

Black Belt

Join Date:
Jul 2005
Location:
Upstate NY
Posts:
21,876
Plugin Contributions:
8

Re: Where do you paste image ready sliced header code?

You will want to make edits in the <!--bof branding display--> section of /includes/templates/your_template/common/tpl_header.php for the div code; I would guess that you have no mechanism for choosing which set is used, so it would probably be best to use the switch code I posted above, but wrapping one whole set of divs in each if() { } or elseif() { }.

Now how do you determine where the links are?
And for that matter, how many of those slices are different between pages? Only a half dozen or so, I would think. Best to have the static ones before the if section or after it, so only the changed ones need to be messed with. That will cut the size of the file in half or so.

The CSS should go in your stylesheet, and you should scrap all the <html> <head> <body> tags etc, because you are already in an HTML document and don't want to send headers twice.

3 May 2007, 10:21 PM
#8
gjh42 avatar

gjh42

Black Belt

Join Date:
Jul 2005
Location:
Upstate NY
Posts:
21,876
Plugin Contributions:
8

Re: Where do you paste image ready sliced header code?

A PS:
I have never used this HTML-style method of layout and don't much care for all the slices; it seems easier to me to have one large background image with a half dozen link divs positioned on it, and select the background image to be used based on the current page.

5 May 2007, 5:31 AM
#9
gws76 avatar

gws76

Zen Follower

Join Date:
Apr 2007
Posts:
151
Plugin Contributions:
0

Re: Where do you paste image ready sliced header code?

I ended up just going with the one header that the tabs are the same color for now because when I loaded it up with the the six different ones they all were loading at the same time and blending into each other. The first cut kept repeating all the way down the side until the first logo. Couldn't figure out how to make it load just the one header for that page. I will have to return to that headache later. In header.php I replaced the logo.gif with this

define('HEADER_LOGO_IMAGE', 'logo_01.gif, logo_02.gif, logo_03.gif, logo_04.gif, logo_05.gif, logo_06.gif, logo_07.gif, logo_08.gif, logo_09.gif, logo_10.gif, logo_11.gif, logo_12.gif');

because my logo is comprised of 12 cuts. This seem to solve the problem with the zen cart logo.gif in the template_default from showing up.

Now I have my header with the links on it working properly but now in Firefox it is overlapping my mainwrapper where the home and login links are. The first cut appears to be below the mainwrapper where it should be with the rest of the header pushed up. I need to get the whole header below the mainwrapper like it was before.

In internet explorer the header completely covers the main wrapper and also most of the categories side box and the welcome sentence on the index page.

What I'm leaving out?

5 May 2007, 10:15 PM
#10
gws76 avatar

gws76

Zen Follower

Join Date:
Apr 2007
Posts:
151
Plugin Contributions:
0

Re: Where do you paste image ready sliced header code?

Well I was able to get the header to move down below the main wrapper by inserting {} in the stylesheet one in the beginning and one in the end. Below is what it looks like now.

Now my problem is that the cuts are no longer together in one piece but are seperated aligned to the left .

Also it has this hyper link centered at the top just past the header. It is the phrase that would show up when you put your mouse over the logo. When you put your mouse over the hyperlink it displays that message. I need that message to appear when you put your mouse over the header and it has a capital S after the coma which needs to be changed to lower case s.

{

<!-- ImageReady Styles (logo.psd) --> <STYLE TYPE="text/css"> <!-- #logo-01 { position:absolute; left:0px; top:0px; width:18px; height:165px; } #logo-02 { position:absolute; left:18px; top:0px; width:766px; height:111px; } #logo-03 { position:absolute; left:784px; top:0px; width:16px; height:165px; } #logo-04 { position:absolute; left:18px; top:111px; width:123px; height:54px; } #logo-05 { position:absolute; left:141px; top:111px; width:96px; height:43px; } #logo-06 { position:absolute; left:237px; top:111px; width:97px; height:43px; } #logo-07 { position:absolute; left:334px; top:111px; width:99px; height:43px; } #logo-08 { position:absolute; left:433px; top:111px; width:98px; height:43px; } #logo-09 { position:absolute; left:531px; top:111px; width:99px; height:43px; } #logo-10 { position:absolute; left:630px; top:111px; width:97px; height:43px; } #logo-11 { position:absolute; left:727px; top:111px; width:57px; height:54px; } #logo-12 { position:absolute; left:141px; top:154px; width:586px; height:11px; } --> </STYLE> <!-- End ImageReady Styles -->

}

6 May 2007, 12:31 AM
#11
ladysaat avatar

ladysaat

Zen Follower

Join Date:
May 2006
Location:
Anywhere USMC points
Posts:
330
Plugin Contributions:
0

Re: Where do you paste image ready sliced header code?

1st you rock for explaining that to me.

2nd I changed one little thing in the css and the header pieces all joined back up together again BUT they were above the top green bar... so still not right. My wonderment is why removing this one thing allowed them all to join back up again?

{
<!-- ImageReady Styles (logo.psd) -->
<STYLE TYPE="text/css">
<!--

the little red thing is what I removed

6 May 2007, 2:53 AM
#12
gws76 avatar

gws76

Zen Follower

Join Date:
Apr 2007
Posts:
151
Plugin Contributions:
0

Re: Where do you paste image ready sliced header code?

Yeah that's what I had to put in to get it to move below the main wrapper where the home and log in are and to stop covering that and categories side box in IE.

Things have all moved up but they aren't all in the placing they are suppose to be. It's as if they are all aligned to the top. I've notice that only the first slice is directly aligned with the top meaning no space and the others are aligned at the top but with a seperation space. I tried your <div tags to enclose everything but no go on that one. I have been inserting some <table, <td, <tr tags in the tpl_header and that is what has moved everything up but all aligned to the top not under some of the slices like it should be. This is what it looks like in the tpl_header now. I know I'm leaving something simple out but haven't figured it out yet.

This is what my tpl_header and the source of the headache looks like now.

<!--bof-branding display--> <div id="logoWrapper"> <TABLE WIDTH=750 BORDER=0 CELLPADDING=0 CELLSPACING=0> <TR> <!-- ImageReady Slices (logo.psd) --> <TD> <DIV ID="logo-01"> <IMG SRC="includes/templates/customtemplate/images/logo_01.gif" WIDTH=18 HEIGHT=165></DIV></TD> <TD><DIV ID="logo-02"> <a href="http://sullivanvitamins.com"> <IMG SRC="includes/templates/customtemplate/images/logo_02.gif" WIDTH=766 HEIGHT=111></DIV></TD> <TD><DIV ID="logo-03"> <IMG SRC="includes/templates/customtemplate/images/logo_03.gif" WIDTH=16 HEIGHT=165></DIV></TD> <TD><DIV ID="logo-04"> <IMG SRC="includes/templates/customtemplate/images/logo_04.gif" WIDTH=123 HEIGHT=54></DIV></TD> <TD><DIV ID="logo-05"> <a href="http://sullivanvitamins.com"> <IMG SRC="includes/templates/customtemplate/images/logo_05.gif" WIDTH=96 HEIGHT=43></DIV></TD> <TD><DIV ID="logo-06"> <a href="https://sullivanvitamins.com/index.php?main_page=products_all"> <IMG SRC="includes/templates/customtemplate/images/logo_06.gif" WIDTH=97 HEIGHT=43></DIV></TD> <TD><DIV ID="logo-07"> <a href="https://sullivanvitamins.com//index.php?main_page=page_3"> <IMG SRC="includes/templates/customtemplate/images/logo_07.gif" WIDTH=99 HEIGHT=43></DIV></TD> <TD><DIV ID="logo-08"> <a href="https://sullivanvitamins.com/index.php?main_page=page_4"> <IMG SRC="includes/templates/customtemplate/images/logo_08.gif" WIDTH=98 HEIGHT=43></DIV></TD> <TD><DIV ID="logo-09"> <a href="https://sullivanvitamins.com/index.php?main_page=contact_us"> <IMG SRC="includes/templates/customtemplate/images/logo_09.gif" WIDTH=99 HEIGHT=43></DIV></TD> <TD><DIV ID="logo-10"> <a href="https://sullivanvitamins.com/index.php?main_page=index&cPath=12"> <IMG SRC="includes/templates/customtemplate/images/logo_10.gif" WIDTH=97 HEIGHT=43></DIV></TD> <TD><DIV ID="logo-11"> <IMG SRC="includes/templates/customtemplate/images/logo_11.gif" WIDTH=57 HEIGHT=54></DIV></TD> <TD><DIV ID="logo-12"> <IMG SRC="includes/templates/customtemplate/images/logo_12.gif" WIDTH=586 HEIGHT=11></DIV></TD> <!-- End ImageReady Slices --> </TR> </TABLE>
<div id="logo"><?php echo '<a href="' . HTTP_SERVER . DIR_WS_CATALOG . '">' . zen_image($template->get_template_dir(HEADER_LOGO_IMAGE, DIR_WS_TEMPLATE, $current_page_base,'images'). '/' . HEADER_LOGO_IMAGE, HEADER_ALT_TEXT) . '</a>'; ?></div>
6 May 2007, 9:36 AM
#13
gjh42 avatar

gjh42

Black Belt

Join Date:
Jul 2005
Location:
Upstate NY
Posts:
21,876
Plugin Contributions:
8

Re: Where do you paste image ready sliced header code?

Ohh boy, where should I start?

I guess first with the principle of absolute positioning; elements will be positioned with reference to the nearest ancestor container that is relatively positioned, or the html/body if none have a position: relative; property in the stylesheet. Since your positioning numbers start at 0,0, the slices will start at the absolute top left, where the header navbar normally is, and cover it. The table tags you have added may have overridden that allowing the navbar to show.
The correct way to get your absolute positioning to work is to give #logoWrapper { position: relative; } in your stylesheet. Then the slice positions will refer to that box. I don't know if they will all fall into the proper places with each other yet.

There is extra code in your stylesheet which breaks it in several ways. First, the <!-- and --> above and below the block of stylesheet declarations are HTML comment tags which don't work in CSS but mess up the first two declarations.
I don't know what effect the <STYLE TYPE="text/css"> has in your stylesheet, but it is not needed there and can't be good for it.
I don't know why adding the { and } above and below your block of stylesheet declarations helped some, but they are not correct usage.
You want nothing but style declarations like
#logo-01 {
position:absolute;
left:0px;
top:0px;
width:18px;
height:165px;
}
in your stylesheet.

In tpl_header.php, you have essentially done most everything twice with the table tags around the div tags.
You can use either table tags or div tags but don't need both for this purpose. You are setting the height & width of the images in the code, and again in the stylesheet.

Last for now, you still have the whole original logo display below your new code, so it will try to display that on the page as well.

6 May 2007, 2:41 PM
#14
gws76 avatar

gws76

Zen Follower

Join Date:
Apr 2007
Posts:
151
Plugin Contributions:
0

Re: Where do you paste image ready sliced header code?

gjh42:

Ohh boy, where should I start?

I guess first with the principle of absolute positioning; elements will be positioned with reference to the nearest ancestor container that is relatively positioned, or the html/body if none have a position: relative; property in the stylesheet. Since your positioning numbers start at 0,0, the slices will start at the absolute top left, where the header navbar normally is, and cover it. The table tags you have added may have overridden that allowing the navbar to show.
The correct way to get your absolute positioning to work is to give #logoWrapper { position: relative; } in your stylesheet. Then the slice positions will refer to that box. I don't know if they will all fall into the proper places with each other yet.

There is extra code in your stylesheet which breaks it in several ways. First, the <!-- and --> above and below the block of stylesheet declarations are HTML comment tags which don't work in CSS but mess up the first two declarations.
I don't know what effect the <STYLE TYPE="text/css"> has in your stylesheet, but it is not needed there and can't be good for it.
I don't know why adding the { and } above and below your block of stylesheet declarations helped some, but they are not correct usage.
You want nothing but style declarations like
#logo-01 {
position:absolute;
left:0px;
top:0px;
width:18px;
height:165px;
}
in your stylesheet.

In tpl_header.php, you have essentially done most everything twice with the table tags around the div tags.
You can use either table tags or div tags but don't need both for this purpose. You are setting the height & width of the images in the code, and again in the stylesheet.

Last for now, you still have the whole original logo display below your new code, so it will try to display that on the page as well.

After implementing those changings the header is together below the mainwrapper but now covering the entire categories sidebox. I added the #logowrapper {position: relative;}I remove the<!-- and --> and <STYLE TYPE="text/css"> html references you talked about. Also I remove the {} above and below in the stylesheet like you suggested. Lastly, I removed the table tags. I didn't understand where to change the last for now suggestion about the whole original header.

This is what my stylesheet looks like now.

#logo, .centerBoxContents, .specialsListBoxContents, .categoryListBoxContents, .centerBoxContentsAlsoPurch, .attribImg {
text-align: center;
}

#logoWrapper
{position: relative;
}

#logo-01 {
position:absolute;
left:0px;
top:0px;
width:18px;
height:165px;
}

#logo-02 {
position:absolute;
left:18px;
top:0px;
width:766px;
height:111px;
}

#logo-03 {
position:absolute;
left:784px;
top:0px;
width:16px;
height:165px;
}

#logo-04 {
position:absolute;
left:18px;
top:111px;
width:123px;
height:54px;
}

#logo-05 {
position:absolute;
left:141px;
top:111px;
width:96px;
height:43px;
}

#logo-06 {
position:absolute;
left:237px;
top:111px;
width:97px;
height:43px;
}

#logo-07 {
position:absolute;
left:334px;
top:111px;
width:99px;
height:43px;
}

#logo-08 {
position:absolute;
left:433px;
top:111px;
width:98px;
height:43px;
}

#logo-09 {
position:absolute;
left:531px;
top:111px;
width:99px;
height:43px;
}

#logo-10 {
position:absolute;
left:630px;
top:111px;
width:97px;
height:43px;
}

#logo-11 {
position:absolute;
left:727px;
top:111px;
width:57px;
height:54px;
}

#logo-12 {
position:absolute;
left:141px;
top:154px;
width:586px;
height:11px;
}

6 May 2007, 2:42 PM
#15
gws76 avatar

gws76

Zen Follower

Join Date:
Apr 2007
Posts:
151
Plugin Contributions:
0

Re: Where do you paste image ready sliced header code?

This is what my tpl_header looks like now.

<!--bof-branding display--> <div id="logoWrapper"> <DIV ID="logo-01"> <IMG SRC="includes/templates/customtemplate/images/logo_01.gif" WIDTH=18 HEIGHT=165></DIV> <DIV ID="logo-02"> <a href="http://sullivanvitamins.com"> <IMG SRC="includes/templates/customtemplate/images/logo_02.gif" WIDTH=766 HEIGHT=111></DIV> <DIV ID="logo-03"> <IMG SRC="includes/templates/customtemplate/images/logo_03.gif" WIDTH=16 HEIGHT=165></DIV> <DIV ID="logo-04"> <IMG SRC="includes/templates/customtemplate/images/logo_04.gif" WIDTH=123 HEIGHT=54></DIV> <DIV ID="logo-05"> <a href="http://sullivanvitamins.com"> <IMG SRC="includes/templates/customtemplate/images/logo_05.gif" WIDTH=96 HEIGHT=43></DIV> <DIV ID="logo-06"> <a href="https://sullivanvitamins.com/index.php?main_page=products_all"> <IMG SRC="includes/templates/customtemplate/images/logo_06.gif" WIDTH=97 HEIGHT=43></DIV> <DIV ID="logo-07"> <a href="https://sullivanvitamins.com//index.php?main_page=page_3"> <IMG SRC="includes/templates/customtemplate/images/logo_07.gif" WIDTH=99 HEIGHT=43></DIV> <DIV ID="logo-08"> <a href="https://sullivanvitamins.com/index.php?main_page=page_4"> <IMG SRC="includes/templates/customtemplate/images/logo_08.gif" WIDTH=98 HEIGHT=43></DIV> <DIV ID="logo-09"> <a href="https://sullivanvitamins.com/index.php?main_page=contact_us"> <IMG SRC="includes/templates/customtemplate/images/logo_09.gif" WIDTH=99 HEIGHT=43></DIV> <DIV ID="logo-10"> <a href="https://sullivanvitamins.com/index.php?main_page=index&cPath=12"> <IMG SRC="includes/templates/customtemplate/images/logo_10.gif" WIDTH=97 HEIGHT=43></DIV> <DIV ID="logo-11"> <IMG SRC="includes/templates/customtemplate/images/logo_11.gif" WIDTH=57 HEIGHT=54></DIV> <DIV ID="logo-12"> <IMG SRC="includes/templates/customtemplate/images/logo_12.gif" WIDTH=586 HEIGHT=11></DIV>
<div id="logo"><?php echo '<a href="' . HTTP_SERVER . DIR_WS_CATALOG . '">' . zen_image($template->get_template_dir(HEADER_LOGO_IMAGE, DIR_WS_TEMPLATE, $current_page_base,'images'). '/' . HEADER_LOGO_IMAGE, HEADER_ALT_TEXT) . '</a>'; ?></div>
6 May 2007, 3:10 PM
#16
gjh42 avatar

gjh42

Black Belt

Join Date:
Jul 2005
Location:
Upstate NY
Posts:
21,876
Plugin Contributions:
8

Re: Where do you paste image ready sliced header code?

This is the original code for the logo:

<div id="logo"><?php echo '<a href="' . HTTP_SERVER . DIR_WS_CATALOG . '">' . zen_image($template->get_template_dir(HEADER_LOGO_IMAGE, DIR_WS_TEMPLATE, $current_page_base,'images'). '/' . HEADER_LOGO_IMAGE, HEADER_ALT_TEXT) . '</a>'; ?></div>

Delete that, and you may want to get rid of more of the branding display section since you appear not to be using any of it. If you do, be sure to leave

</div> <!--eof-branding display-->

at the end of the section.

A better method would be to comment out the code you don't want, in case you later change your mind.

6 May 2007, 4:09 PM
#17
gws76 avatar

gws76

Zen Follower

Join Date:
Apr 2007
Posts:
151
Plugin Contributions:
0

Re: Where do you paste image ready sliced header code?

gjh42:

This is the original code for the logo:

<div id="logo"><?php echo '<a href="' . HTTP_SERVER . DIR_WS_CATALOG . '">' . zen_image($template->get_template_dir(HEADER_LOGO_IMAGE, DIR_WS_TEMPLATE, $current_page_base,'images'). '/' . HEADER_LOGO_IMAGE, HEADER_ALT_TEXT) . '</a>'; ?></div>

Delete that, and you may want to get rid of more of the branding display section since you appear not to be using any of it. If you do, be sure to leave

</div> <!--eof-branding display-->

at the end of the section.

A better method would be to comment out the code you don't want, in case you later change your mind.

I deleted the that section for the orignal logo code which made some of my links on different pages go red from green. Then I deleted the rest of the branding display below and left the </div>... and it made the header move further down. I pasted it back and now the product description and price text is red in internet explorer and black in firefox.

Something I'm leaving out that's not telling the rest of the page to stay down as everything is moved up underneath the header. This is what my tpl_header looks like now.

<!--bof-branding display--> <div id="logoWrapper"> <DIV ID="logo-01"> <IMG SRC="includes/templates/customtemplate/images/logo_01.gif" WIDTH=18 HEIGHT=165></DIV> <DIV ID="logo-02"> <a href="http://sullivanvitamins.com"> <IMG SRC="includes/templates/customtemplate/images/logo_02.gif" WIDTH=766 HEIGHT=111></DIV> <DIV ID="logo-03"> <IMG SRC="includes/templates/customtemplate/images/logo_03.gif" WIDTH=16 HEIGHT=165></DIV> <DIV ID="logo-04"> <IMG SRC="includes/templates/customtemplate/images/logo_04.gif" WIDTH=123 HEIGHT=54></DIV> <DIV ID="logo-05"> <a href="http://sullivanvitamins.com"> <IMG SRC="includes/templates/customtemplate/images/logo_05.gif" WIDTH=96 HEIGHT=43></DIV> <DIV ID="logo-06"> <a href="https://sullivanvitamins.com/index.php?main_page=products_all"> <IMG SRC="includes/templates/customtemplate/images/logo_06.gif" WIDTH=97 HEIGHT=43></DIV> <DIV ID="logo-07"> <a href="https://sullivanvitamins.com//index.php?main_page=page_3"> <IMG SRC="includes/templates/customtemplate/images/logo_07.gif" WIDTH=99 HEIGHT=43></DIV> <DIV ID="logo-08"> <a href="https://sullivanvitamins.com/index.php?main_page=page_4"> <IMG SRC="includes/templates/customtemplate/images/logo_08.gif" WIDTH=98 HEIGHT=43></DIV> <DIV ID="logo-09"> <a href="https://sullivanvitamins.com/index.php?main_page=contact_us"> <IMG SRC="includes/templates/customtemplate/images/logo_09.gif" WIDTH=99 HEIGHT=43></DIV> <DIV ID="logo-10"> <a href="https://sullivanvitamins.com/index.php?main_page=index&cPath=12"> <IMG SRC="includes/templates/customtemplate/images/logo_10.gif" WIDTH=97 HEIGHT=43></DIV> <DIV ID="logo-11"> <IMG SRC="includes/templates/customtemplate/images/logo_11.gif" WIDTH=57 HEIGHT=54></DIV> <DIV ID="logo-12"> <IMG SRC="includes/templates/customtemplate/images/logo_12.gif" WIDTH=586 HEIGHT=11></DIV>
</DIV>
<!--eof-branding display-->
6 May 2007, 4:58 PM
#18
gjh42 avatar

gjh42

Black Belt

Join Date:
Jul 2005
Location:
Upstate NY
Posts:
21,876
Plugin Contributions:
8

Re: Where do you paste image ready sliced header code?

Ah yes, another feature of absolute positioning: it puts the element outside the flow of the page display, so its size is not considered when placing elements after it. Try giving #logoWrapper a height and width in the stylesheet.

"now the product description and price text is red in internet explorer and black in firefox"
This is extremely messed up, as the header display has no bearing on the product info page display. You might try renaming tpl_header.php to save_tpl_header.php, copying in a fresh version from /template_default/common/, and applying your changes in chunks to that, starting with deleting the original logo display. See when it breaks as you describe above, and that will narrow down the suspects.

6 May 2007, 6:52 PM
#19
gws76 avatar

gws76

Zen Follower

Join Date:
Apr 2007
Posts:
151
Plugin Contributions:
0

Re: Where do you paste image ready sliced header code?

gjh42:

Ah yes, another feature of absolute positioning: it puts the element outside the flow of the page display, so its size is not considered when placing elements after it. Try giving #logoWrapper a height and width in the stylesheet.

"now the product description and price text is red in internet explorer and black in firefox"
This is extremely messed up, as the header display has no bearing on the product info page display. You might try renaming tpl_header.php to save_tpl_header.php, copying in a fresh version from /template_default/common/, and applying your changes in chunks to that, starting with deleting the original logo display. See when it breaks as you describe above, and that will narrow down the suspects.

Well I defined the logowrapper to 800px for width and 165px for height and that seemed to define its space so now it's not overlapping. Thanks alot! And I took from the saved original version of the tpl_header and pasted the branding display over the last one and that seems to take care of red font issue. So now the categories hyperlinks and product hyperlinks are green but the price, description and product title when you click on an individual product are black font which is probably good since it contrasts with the green. However, I think I would like the product title to stay green when you click on the product and go to the description. Where would you change that? This is what it looks like now my stylesheet.

#logo, .centerBoxContents, .specialsListBoxContents, .categoryListBoxContents, .centerBoxContentsAlsoPurch, .attribImg {
text-align: center;
}

#logoWrapper
{position: relative;
width: 800px;
height: 165px;
}

#logo-01 {
position:absolute;
left:0px;
top:0px;
width:18px;
height:165px;
}

#logo-02 {
position:absolute;
left:18px;
top:0px;
width:766px;
height:111px;
}

#logo-03 {
position:absolute;
left:784px;
top:0px;
width:16px;
height:165px;
}

#logo-04 {
position:absolute;
left:18px;
top:111px;
width:123px;
height:54px;
}

#logo-05 {
position:absolute;
left:141px;
top:111px;
width:96px;
height:43px;
}

#logo-06 {
position:absolute;
left:237px;
top:111px;
width:97px;
height:43px;
}

#logo-07 {
position:absolute;
left:334px;
top:111px;
width:99px;
height:43px;
}

#logo-08 {
position:absolute;
left:433px;
top:111px;
width:98px;
height:43px;
}

#logo-09 {
position:absolute;
left:531px;
top:111px;
width:99px;
height:43px;
}

#logo-10 {
position:absolute;
left:630px;
top:111px;
width:97px;
height:43px;
}

#logo-11 {
position:absolute;
left:727px;
top:111px;
width:57px;
height:54px;
}

#logo-12 {
position:absolute;
left:141px;
top:154px;
width:586px;
height:11px;
}

6 May 2007, 6:53 PM
#20
gws76 avatar

gws76

Zen Follower

Join Date:
Apr 2007
Posts:
151
Plugin Contributions:
0

Re: Where do you paste image ready sliced header code?

Also, I forgot to add how can I center my header in the page?