Hi, I was wondering if someone could tell me how to centre my header image on my website www.linuxdisks.co.uk?
Thanks,
Ian
Hi, I was wondering if someone could tell me how to centre my header image on my website www.linuxdisks.co.uk?
Thanks,
Ian
Being another Reading person, I'll try and help!
OK, in stylesheet_original.css, add the following additional definition just below the the top "main" item:
.header {
text-align: center;
}
And you're done!
See the "useful" section of my sig: using the "developers toolkit" extension to Firefox, finding stuff like this is easy!
Since you used the tabled template, Kelvyn's solution will not work.
Open your CUSTOM_TEMPLATE/common/tpl_header.php
Find this table:
Remove the right hand table cell to end up with this:Code:<table border="0" width="100%" cellspacing="0" cellpadding="0" class="header"> <tr><!-- All HEADER_ definitions in the columns below are defined in includes/languages/english.php //--> <td valign="middle" height="<?php echo HEADER_LOGO_HEIGHT; ?>" width="<?php echo HEADER_LOGO_WIDTH; ?>"> <?php echo '<a href="' . zen_href_link(FILENAME_DEFAULT) . '">' . zen_image($template->get_template_dir(HEADER_LOGO_IMAGE, DIR_WS_TEMPLATE, $current_page_base,'images'). '/' . HEADER_LOGO_IMAGE, HEADER_ALT_TEXT) . '</a>'; ?> </td> <td align="center" valign="top"> <?php if (HEADER_SALES_TEXT != '') { echo HEADER_SALES_TEXT; } if (SHOW_BANNERS_GROUP_SET2 != '' && $banner = zen_banner_exists('dynamic', SHOW_BANNERS_GROUP_SET2)) { if ($banner->RecordCount() > 0) { echo zen_display_banner('static', $banner); } } ?> </td> </tr> </table>
Code:<table border="0" width="100%" cellspacing="0" cellpadding="0" class="header"> <tr><!-- All HEADER_ definitions in the columns below are defined in includes/languages/english.php //--> <td valign="middle" height="<?php echo HEADER_LOGO_HEIGHT; ?>" width="<?php echo HEADER_LOGO_WIDTH; ?>"> <?php echo '<a href="' . zen_href_link(FILENAME_DEFAULT) . '">' . zen_image($template->get_template_dir(HEADER_LOGO_IMAGE, DIR_WS_TEMPLATE, $current_page_base,'images'). '/' . HEADER_LOGO_IMAGE, HEADER_ALT_TEXT) . '</a>'; ?> </td> </tr> </table>
What...ever! Did you actually do it on his site?
Try it. It works.
Trust me Kelvyn- I have been doing that header for 3 years - if you do not remove the empty cell you will end up slight off center in certain browsers.
Note: you should also upgrade to the current v1.3.0.1 ...
Be sure to backup both your site and your database before performing an upgrade ...
Linda McGrath
If you have to think ... you haven't been zenned ...
Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!
Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today!]
Officially PayPal-Certified! Just click here
Try our Zen Cart Recommended Services - Hosting, Payment and more ...
Signup for our Announcements Forums to stay up to date on important changes and updates!
OK, sorry if I came across as harsh, but I applied the modified stylesheet both in IE7 and FF1.5 and it looked centre to me, and as the CSS tweak was the easiest way for a newbie, I used that.
I now noticed that in Firefox it looks OK, but in IE7, the yellow bars are missing!
See http://www.funnfrolic.co.uk/party-store/
I wonder why my CSS generated yellow bars are missing in IE? Any ideas gratefully received!
Thanks