Solved

Line up price (change TD properties) on Zen cart

Posted on 2008-10-02
4
422 Views
Last Modified: 2012-05-05
Hi- To see the site, you'll need a user name/password, which are melody/magic.

On this cart I'd like to change the code so the TD properties  for  td class="productListing-data" has a vertical alignment of top. That would line the price up with the product name. So for instance, I would like to change this:

  <tr  class="productListing-odd">

   <td class="productListing-data" align="center"><a href="http://diabetic-meals.net/cart/index.php?main_page=product_info&amp;cPath=1&amp;products_id=39"><img src="images/7118.jpg" alt="Beef Tri-tip au Jus, Sliced - 2 servings" title=" Beef Tri-tip au Jus, Sliced - 2 servings " width="100" height="68" class="listingProductImage" /></a></td>
   <td class="productListing-data"><h3 class="itemTitle"><a href="http://diabetic-meals.net/cart/index.php?main_page=product_info&amp;cPath=1&amp;products_id=39">Beef Tri-tip au Jus, Sliced  - 2 servings</a></h3><div class="listingDescription">Meat-lovers rejoice! Here is an enticing meal of tender sliced grass-fed beef....</div></td>
   <td align="right" valign="bottom" class="productListing-data">$16.99<br /><br />Add: <input type="text" name="products_id[39]" value="0" size="4" /><br /><br /></td>

to this:

  <tr  class="productListing-odd">

   <td class="productListing-data" align="center"><a href="http://diabetic-meals.net/cart/index.php?main_page=product_info&amp;cPath=1&amp;products_id=39"><img src="images/7118.jpg" alt="Beef Tri-tip au Jus, Sliced - 2 servings" title=" Beef Tri-tip au Jus, Sliced - 2 servings " width="100" height="68" class="listingProductImage" /></a></td>
   <td valign="top" class="productListing-data"><h3 class="itemTitle"><a href="http://diabetic-meals.net/cart/index.php?main_page=product_info&amp;cPath=1&amp;products_id=39">Beef Tri-tip au Jus, Sliced  - 2 servings</a></h3><div class="listingDescription">Meat-lovers rejoice! Here is an enticing meal of tender sliced grass-fed beef....</div></td>
   <td align="right" valign="bottom" class="productListing-data">$16.99<br /><br />Add: <input type="text" name="products_id[39]" value="0" size="4" /><br /><br /></td>
  </tr>
  </tr>
0
Comment
Question by:mel200
  • 2
  • 2
4 Comments
 
LVL 44

Accepted Solution

by:
scrathcyboy earned 500 total points
ID: 22629526
TD.productListing-data  {text-align:right; vertical-align:top; }

in CSS will do it.  The right is to line up dollar amounts if you need it, and the vertical align can be either "top" or "text-top" -- whichever works better for you.

So vertical-align:top;   and   vertical-align:text-top;   can give you two different alignments.  Try them.
0
 

Author Comment

by:mel200
ID: 22629567
Thanks- I'll try that right away!
0
 

Author Closing Comment

by:mel200
ID: 31502598
Works like a hot damn! Thanks!
0
 
LVL 44

Expert Comment

by:scrathcyboy
ID: 22629992
glad it worked for you!
0

Featured Post

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

Why do we like using grid based layouts in website design? Let's look at the live examples of websites and compare them to grid based WordPress themes.
Since pre-biblical times, humans have sought ways to keep secrets, and share the secrets selectively.  This article explores the ways PHP can be used to hide and encrypt information.
In this tutorial viewers will learn how to style a decorative dropcap for the first letter in a paragraph using CSS. In CSS, create a new paragraph class by typing "p.fancy": Then, to style only the first letter of the first sentence, include the ps…
The viewer will learn how to count occurrences of each item in an array.

760 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

22 Experts available now in Live!

Get 1:1 Help Now