
Originally Posted by
spikeycactus
thanks, but im trying to make highlightable buttons like the ones in the link i posted on the first post.
Any tips on how to make one like that? the default setup is much like your example is it not?
I dont know much about how css works, however your center alignment thing was very helpfull.
Any other ideas?
Here's the css styling that I use:
Code:
#navMain {
margin:0;
padding: 0;
float:left;
font-size: 1.1em;
line-height: normal;
color: #fff;
width: 100%;
}
#navMain ul {
margin: 0;
padding: 0.2em 0 0 0.5em;
list-style-type: none;
text-align: center;
line-height: 1.5em;
vertical-align: middle;
}
#navMain ul li {
display: inline;
}
#navMain ul li a {
margin:0;
padding: 0 5px 0 4px;
float:left;
color: #fff;
background: url(../images/tableft.gif) no-repeat left top;
text-decoration:none;
}
#navMain ul li a span {
display:block;
background: url(../images/tabright.gif) right top;
padding:2px 15px 2px 6px;
}
#navMain ul li a:hover {
background-position:0% -42px;
}
#navMain ul li a:hover span {
padding:2px 15px 2px 6px;
background-position:100% -42px;
}
And this is the navigation in includes/templates/YOUR_TEMPLATE/common/tpl_header.php
Code:
<div id="navMain">
<ul>
<li<?php echo (($this_is_home_page) ? ' class="current">' : '>');?><?php echo '<a href="' . HTTP_SERVER . DIR_WS_CATALOG . '">'; ?><?php echo '<span>' . HEADER_TITLE_CATALOG . '</span>'; ?></a></li>
<?php if ($_SESSION['customer_id']) { ?>
<li<?php echo (($current_page_base == 'logoff') ? ' class="current">' : '>');?><a href="<?php echo zen_href_link(FILENAME_LOGOFF, '', 'SSL'); ?>"><?php echo '<span>' . HEADER_TITLE_LOGOFF . '</span>'; ?></a></li>
<?php
} else {
if (STORE_STATUS == '0') {
?>
<li<?php echo (($current_page_base == 'login') ? ' class="current">' : '>');?><a href="<?php echo zen_href_link(FILENAME_LOGIN, '', 'SSL'); ?>"><?php echo '<span>' . HEADER_TITLE_LOGIN . '</span>'; ?></a></li>
<?php } } ?>
<li<?php echo (($current_page_base == 'contact_us') ? ' class="current">' : ' class="contact">');?><a href="<?php echo zen_href_link(FILENAME_CONTACT_US, '', 'SSL'); ?>"><?php echo '<span>' . BOX_INFORMATION_CONTACT . '</span>'; ?></a></li>
<li<?php echo (($current_page_base == 'account') ? ' class="current">' : ' class="account">');?><a href="<?php echo zen_href_link(FILENAME_ACCOUNT, '', 'SSL'); ?>"><?php echo '<span>' . HEADER_TITLE_MY_ACCOUNT . '</span>'; ?></a></li>
<?php if ($_SESSION['cart']->count_contents() != 0) { ?>
<li<?php echo ((in_array($current_page_base,explode(",",'checkout_shipping,checkout_payment,checkout_confirmation,checkout_success'))) ? ' class="current">' : '>');?><a href="<?php echo zen_href_link(FILENAME_CHECKOUT_SHIPPING, '', 'SSL'); ?>"><?php echo '<span>' . HEADER_TITLE_CHECKOUT . '</span>'; ?></a></li>
<?php }?>
<li<?php echo (($current_page_base == 'shopping_cart') ? ' class="cart current">' : ' class="cart">');?><a href="<?php echo zen_href_link(FILENAME_SHOPPING_CART, '', 'NONSSL'); ?>"><?php echo '<span>' . HEADER_TITLE_CART_CONTENTS . '</span>'; ?></a></li>
</ul>