Solved

Line up price (change TD properties) on Zen cart

Posted on 2008-10-02
4
423 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&cPath=1&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&cPath=1&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&cPath=1&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&cPath=1&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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Build an array called $myWeek which will hold the array elements Today, Yesterday and then builds up the rest of the week by the name of the day going back 1 week.   (CODE) (CODE) Then you just need to pass your date to the function. If i…
CSS is a visual language used to classify objects and define rules about how they should be displayed. CSS skills aren’t restricted to developers anymore, there is a big benefit to having a basic understanding of the language, regardless of your occ…
The viewer will the learn the benefit of plain text editors and code an HTML5 based template for use in further tutorials.
Video by: Mark
This lesson goes over how to construct ordered and unordered lists and how to create hyperlinks.

911 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

23 Experts available now in Live!

Get 1:1 Help Now