Follow us on Twitter X-Cart on Facebook Wiki
Shopping cart software Solutions for online shops and malls
 

Customisation of NavBar

 
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design
 
Thread Tools Search this Thread
  #1  
Old 08-14-2007, 03:40 AM
  scoobie's Avatar 
scoobie scoobie is offline
 

Advanced Member
  
Join Date: Dec 2006
Location: Sydney
Posts: 84
 

Default Customisation of NavBar

I am trying to put the little cart image along with the Cart is empty text or whatever the dollar amount in my nav bar after the my account link.

I once got it in the nav bar but it was right up against the my account link text. I couldn't figure out how to right align it nicely. Even then my whole design broke in Firefox.

This is how my head.tpl looks with the css. Can someone tell me how I can get the image on the far right. It is not looking good at the moment? Without the cart image there, everything lines up nicely in both IE and Firefox.

head.tpl
************
<table cellpadding="0" cellspacing="0" width="100%">
<tr><td>
<div class="hnav">
<ul>
<li><a href="http://www.womansworld.com.au/dev/xcart/home.php">Home</a></li>
<li><a href="http://www.womansworld.com.au/dev/xcart/help.php?section=contactus&mode=update">Contact Us</a></li>
<li><a href="http://www.womansworld.com.au/dev/xcart/register.php">Register</a></li>
<li><a href="http://www.womansworld.com.au/dev/xcart/help.php?section=login">My Account</a></li>
</ul>
</td>
{include file="customer/main/minicart.tpl"}
</div>
</tr>
</table>

minicart.tpl
*******************
{if $minicart_total_items > 0}
<td rowspan="2" width="23"><a href="cart.php"><img src="{$ImagesDir}/cart_full.gif" width="19" height="16" alt="" /></a></td>
<td class="VertMenuItems"><b>{$lng.lbl_cart_items}: </b></td>
<td class="VertMenuItems">{$minicart_total_items}</td>
<td class="VertMenuItems"><b>{$lng.lbl_total}: </b></td>
<td class="VertMenuItems">{include file="currency.tpl" value=$minicart_total_cost}
</td>
{else}
<td rowspan="2" width="23"><img src="{$ImagesDir}/cart_empty.gif" width="19" height="16" alt="" /></td>
<td class="VertMenuItems" align="center"><b>{$lng.lbl_cart_is_empty}</b></td>
{/if}



Associated CSS
*********************
.hnav ul
{
margin:0;
width: 670px;
padding-left: 190px;
list-style: none;
float:left;
background: #FFFF00 url(images/mainNavBg.jpg) repeat-x;
}

.hnav ul li {
float: left;
}

.hnav ul li a {
display:block;
padding: 0 2em;
line-height: 2.1em;
background: url(images/divider2.jpg) repeat-y left top;
color: #000000;
}

I also tried moving the width and padding from the .hnav ul to just .hnav but that made no difference.
Attached Thumbnails
Click image for larger version

Name:	layout_14082007.jpg
Views:	131
Size:	49.0 KB
ID:	512  
__________________
X-CART 4.1.8 (Add-Ons: onSale, CDSEO, AOM, Thickbox)
PHP 4.4.4
SQL 4.1.21
Linux O/S
Reply With Quote
  #2  
Old 09-12-2007, 12:33 AM
 
bbazinet bbazinet is offline
 

Newbie
  
Join Date: Sep 2007
Posts: 3
 

Default Re: Customisation of NavBar

You are missing your <tr> tags in minicart.tpl and the "rowspans" are messing up the table alignment. Try the following modification to minicart.tpl code, I managed to fit it nicely in my nav bar on one line.


minicart.tpl
---------------------------------------
Code:
{if $minicart_total_items > 0} <tr> <td width="23"><a href="cart.php"><img src="{$ImagesDir}/cart_full.gif" width="19" height="16" alt="" /></a></td> <td class="VertMenuItems"><b>{$lng.lbl_cart_items}: {$minicart_total_items}&nbsp;&nbsp;{$lng.lbl_total}: {include file="currency.tpl" value=$minicart_total_cost}</b></td> </tr> {else} <tr> <td width="23"><img src="{$ImagesDir}/cart_empty.gif" width="19" height="16" alt="" /></td> <td class="VertMenuItems" align="center"><b>{$lng.lbl_cart_is_empty}</b> </td> </tr> {/if}
__________________
x-cart 4.1.8 Gold
Reply With Quote
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -8. The time now is 05:29 PM.

   

 
X-Cart forums © 2001-2020