How do i add a banner to the header?
How to add a banner to the header
19 posts from 3 voices-
Posted 2 years ago #
-
Hey,
in header.php add your banner code after:
<h2 class="logo ie6fix <?php echo $logoclass; ?>"><a>/"><?php echo $logo; ?></a></h2>Ifyou like you can position it by wrapping it in a div - i.e.like:
<div class="banner"> banner code </div>At least add following css to style.css:
.banner { position: absolute; right: 0px; top: 90px; }Obviously you can adjust the css class and the position as you like.
Posted 2 years ago # -
I'm sorry, I meant an avert banner in the upper right corner of the header file. Right below the twitter and feeder icons, here's my sight:
http://www.innohealthed.org.
I tried this code: <div align="right" style="position: absolute; top: 50px; right: 0; z-index:10;"><a href="http://innohealthed.org/healthpreneurs.html"><img src="addesign.gif" /></a></div>But it doesn't work properly. I would appreciate your help.
Posted 2 years ago # -
Try:
<div style="position: absolute; top: 50px; right: 0; z-index:10;"><a href="http://innohealthed.org/healthpreneurs.html"><img src="http://my-website.com/addesign.gif" /></a></div>Instead of http://my-website.com/addesign.gif insert the ABSOLUTE path to your image (so use http://innohealthed.org/image-path )
Posted 2 years ago # -
Tried it, and it doesn't work. I must be doing something wrong. Can't figure it out???
Posted 2 years ago # -
I couldn't find the banner code on your website. Please leave it - maybe it's just a smal php problem or the image url isn't right. Wuithout code I can't investigate what's going wrong....
Posted 2 years ago # -
Want to put your new banner ad on your own website or homepage?
It's easy, just follow these steps:
1. Download your ad to your PC/Mac as described above (or receive it via email if you prefer);
2. Upload your ad from your PC/Mac to your webpage (if you need help uploading, please contact your webpage host's support materials);
3. Add the following HTML code to your webpage so that it loads and displays your new banner ad:
<img src="addesign.gif" /> (this code will simply display your ad - clicking on it will do nothing)
(if you uploaded your ad using a different file name, change "addesign.gif" to the file name you used)
OR use the following HTML code to display your banner and cause people who click on it
to be taken to a specific page on your website:
<a href="http://www.innohealthed.org/anypage.html"><img src="addesign.gif" /></a>
(if you uploaded your ad using a different file name, change "addesign.gif" to the file name you used).That's all there is to it - your ad should now appear on your webpage for all the world to see and enjoy!
Posted 2 years ago # -
Glad that you found a solution.
Posted 2 years ago # -
No, i didn't find a solution yet. I submitted to you the directions for my avert banner. I still can't figure how to put in on my website.
Posted 2 years ago # -
I think the problem is the link to your image. Please make the modification in header.php (like I instructed above) and leave it. I'll investigate the site with firebug afterwards.
Posted 2 years ago # -
OK, I made the modifications in my header.php file.
Posted 2 years ago # -
I was right. The url: http://innohealthed.org/addesign.gif is wrong and doesn't point to an image. I.e. if you try to insert your logo like:
<div style="position: absolute; top: 50px; right: 0; z-index:10;"> <a href="http://innohealthed.org/healthpreneurs.html"> <img src="http://www.innohealthed.org/wp-content/uploads/2011/04/ihe-logo.png"> </a> </div>it works because the image exists. However http://innohealthed.org/addesign.gif doesn't exist. You need to upload the image to the main server directory or (better solution) you put it in wp-content/uploads folder - the path would be http://www.innohealthed.org/wp-content/uploads/addesign.gif then.
Posted 2 years ago # -
Perfect!! Thanks for your patients and time you given to help me. I appreciate it immensely.
Posted 2 years ago # -
Oh, can I link this new avert banner to one of my post?
Posted 2 years ago # -
Yes - just replace http://innohealthed.org/healthpreneurs.html with the permalink of the post you want to link to.
Posted 2 years ago # -
Thanks, your the Man!
Posted 2 years ago # -
I meant you're the Man!
Posted 2 years ago # -
Glad that I could help you :)
Posted 2 years ago # -
Hi, I've followed the instructions above but there's still a problem. The logo to the right of the main logo works fine on the home page but on all other pages it's positioned on the left edge (should be 300 px left). Help greatly appriciated.
Posted 1 year ago #
Reply
You must log in to post.














