Center header image and make it clickable
Permalink
I am trying to center my header image and make it clickable.
here is the code I am trying to use
in header.php
in my css
The other issue I am having is when I use a non-clickable image, depending on the browser the image is not centered. Here is the code I was using for that
php
Right now I have the first set of code implemented.
the website is:http://www.carolinestreetptso.org...
here is the code I am trying to use
in header.php
<header> <div id="header-area"> <a href="http://www.carolinestreetptso.org"><img src="<?php echo $this->getThemePath()?>/images/layout_top.png" alt="header image" align="middle" /></a> </div><!-- #header-area ends --> </header><!-- header ends -->
in my css
header { display: block; margin-left: auto; margin-right: auto; }
The other issue I am having is when I use a non-clickable image, depending on the browser the image is not centered. Here is the code I was using for that
php
<header> <div id="header-area"> <?php $a = new Area('Header Top'); $a->display($c); ?> </div><!-- #header-area ends --> </header><!-- header ends -->
header { background: url(images/layout_top.png) no-repeat top left; position: relative; padding-top:220px; margin-left:220px; }
Right now I have the first set of code implemented.
the website is:http://www.carolinestreetptso.org...
I used your first suggestion:
I had to tweak the width in the header-area a bit, but it worked.
Can you take a look just to be sure? Thanks!!
header { display: block; height: auto; margin:0 auto; width: 100%; } #header-area { margin: 0 auto; text-align: left; width: 60%; }
I had to tweak the width in the header-area a bit, but it worked.
Can you take a look just to be sure? Thanks!!
It's ok.
You can give your header-area every width (px,%,em) and it will be in the center of the header.
You can give your header-area every width (px,%,em) and it will be in the center of the header.
First Isssu:
Css:
Second Issu:
Not Testet:
Best,
Tino