PDA

View Full Version : Header on every page?


Karenl39
Mar-24-2007, 02:36 PM
Hi,

I have been trying to figure this out for days and cannot find out if this is possible. Does the header have to be on every page? I don't know if it is the same thing as a banner or not, but I don't have my header graphic set up as a banner.

Thanks!

Karen

www.karenlynch.smugmug.com

Andy
Mar-24-2007, 03:02 PM
Hi Karen,

Linked in our Sticky thread "start here" is this tutorial on Making a site with multiple banners :)

http://dgrin.smugmug.com/gallery/1932865

The other thing you can do is this:

Give your header a div:

<div id="myheader"></div>

then, you do this in CSS:

#myheader {display: none;}
.homepage #myheader {display: block;}

So, there's two ways :thumb

Karenl39
Mar-24-2007, 06:17 PM
Ok, maybe the banner code works better? The header one didn't work at all. I probably did something wrong. :dunno

Allen
Mar-24-2007, 06:26 PM
Ok, maybe the banner code works better? The header one didn't work at all. I probably did something wrong. :dunno
Banner, header all mean same thing, image usually at top of page. I see four things, the big Klynch image, ScottsShots, paypal and mailing list join.

Do you want all only on homepage?
Do you want all on homepage and some on other pages?

Spell out the combos for different pages and we can help.

Karenl39
Mar-26-2007, 06:05 AM
Banner, header all mean same thing, image usually at top of page. I see four things, the big Klynch image, ScottsShots, paypal and mailing list join.

Do you want all only on homepage?
Do you want all on homepage and some on other pages?

Spell out the combos for different pages and we can help.

I would like all on the homepage and then klynch on the other pages and then Scottshots only on his gallery. Does that make sense?

Allen
Mar-26-2007, 07:25 AM
I would like all on the homepage and then klynch on the other pages and then Scottshots only on his gallery. Does that make sense?
You're going to have to assign each of these id's (div's) to
be able to control where they are displayed.

I though this together pretty fast so hope it works.

Add the green in your header code.

<div id="klynch" align="center">
<img src="http://karenlynch.smugmug.com/photos/93646165-L.jpg"></div>
</div>

<div id="ScottShots" align="center">
<h3>ScottShots</h3>
</div>

<div id="myPaypal">
<table border="0" cellpadding="10" cellspacing="0">
<tbody><tr><td align="center"><a href="#" onclick="javascript:window.open('https://www.paypal.com/us/cgi-bin/webscr?cmd=xpt/cps/popup/OLCWhatIsPayPal-outside','olcwhatispaypal','toolbar=no, location=no, directories=no, status=no, menubar=no, scrollbars=yes, resizable=yes, width=400, height=350');"><img src="https://www.paypal.com/en_US/i/bnr/horizontal_solution_PP.gif" alt="Solution Graphics" border="0"></a></td></tr></tbody></table><!-- PayPal Logo -->
</div>

<!-- BEGIN: Constant Contact Basic Opt-in Email List Form -->
<div id="mailList" align="right">
<table sty ...
....
... dth="168"></a>
</div>
<!-- END: SafeSubscribe -->
Then in the CSS add these

#mailList,
#myPaypal,
#ScottShots {display:none;}

#klynch,
.homepage #mailList,
.homepage #myPaypal,
.gallery_xxxxxxxxx #ScottShots {display:block; }

xxxxxxxxx = Scott's gallery number

Holler back if you have any problems or questions.

Karenl39
Jul-11-2007, 08:44 AM
You're going to have to assign each of these id's (div's) to
be able to control where they are displayed.

I though this together pretty fast so hope it works.

Add the green in your header code.

<div id="klynch" align="center">
<img src="http://karenlynch.smugmug.com/photos/93646165-L.jpg"></div>
</div>

<div id="ScottShots" align="center">
<h3>ScottShots</h3>
</div>

<div id="myPaypal">
<table border="0" cellpadding="10" cellspacing="0">
<tbody><tr><td align="center"><a href="#" onclick="javascript:window.open('https://www.paypal.com/us/cgi-bin/webscr?cmd=xpt/cps/popup/OLCWhatIsPayPal-outside','olcwhatispaypal','toolbar=no, location=no, directories=no, status=no, menubar=no, scrollbars=yes, resizable=yes, width=400, height=350');"><img src="https://www.paypal.com/en_US/i/bnr/horizontal_solution_PP.gif" alt="Solution Graphics" border="0"></a></td></tr></tbody></table><!-- PayPal Logo -->
</div>

<!-- BEGIN: Constant Contact Basic Opt-in Email List Form -->
<div id="mailList" align="right">
<table sty ...
....
... dth="168"></a>
</div>
<!-- END: SafeSubscribe -->
Then in the CSS add these

#mailList,
#myPaypal,
#ScottShots {display:none;}

#klynch,
.homepage #mailList,
.homepage #myPaypal,
.gallery_xxxxxxxxx #ScottShots {display:block; }

xxxxxxxxx = Scott's gallery number

Holler back if you have any problems or questions.

I finally got around to trying this. Yikes! After I put the css in, nothing appeared on my home page except for my header! Any ideas why?

Thank you,

Karen

www.karenlynch.smugmug.com

Allen
Jul-11-2007, 06:38 PM
I finally got around to trying this. Yikes! After I put the css in, nothing appeared on my home page except for my header! Any ideas why?

Thank you,

Karen

www.karenlynch.smugmug.com (http://www.karenlynch.smugmug.com)
Add one more closing div in your header.

<!-- END: SafeSubscribe -->
</div>

Then add this to your CSS

#mailList,
#myPaypal,
#ScottShots {display:none;}

#klynch,
.homepage #mailList,
.homepage #myPaypal,
.category_ScottShots #ScottShots
{display: block;}