Zen Cart Logo
Forums / Templates, Stylesheets, Page Layout / Aligning Attributes box with Add to Cart box

Aligning Attributes box with Add to Cart box

Views: 1,105

Results 1 to 3 of 3
15 May 2012, 11:16 AM
#1
igi2011 avatar

igi2011

New Zenner

Join Date:
Oct 2011
Location:
Kent, UK
Posts:
50
Plugin Contributions:
0

Aligning Attributes box with Add to Cart box

Hi,
I'm just starting to add attributes to some of my products. I'm using a drop-down box which I want to display above my add to cart box, on the right of the screen.

Firstly I moved the position of the attributes module in tpl_product_info_display.php so it's directly before the Add to Cart box.

In my custom stylesheet I'm using float:right; on the add to cart box and have styled the attributes box the same way, but it is showing to the right of the Add to Cart box rather than above it (presumably because it's floating to the right of everything that comes after it):

URL: http://www.needthatgift.co.uk/index.php?main_page=product_info&cPath=47_65&products_id=8424

Is there any way of positioning the attributes box in css so it still floats to the right but displays above the add to cart box?

Thanks in advance

15 May 2012, 11:41 AM
#2
lat9 avatar

lat9

Administrator

Join Date:
Sep 2009
Location:
Stuart, FL
Posts:
14,081
Plugin Contributions:
56

Re: Aligning Attributes box with Add to Cart box

To your CSS definitions for the #cartAdd, add clear: right; to position that box below the attributes box.

You are currently using the classic template to make your modifications; you should really create your own template name (initially, just copy all the stuff you've placed in the classic folders into your new-template-name folder) ... it will save you pain in the future with upgrades.

Some of the modifications that you've made have resulted in 31 HTML validation errors (http://validator.w3.org/check?verbose=1&uri=http%3A%2F%2Fwww.needthatgift.co.uk%2Findex.php%3Fmain_page%3Dproduct_info%26cPath%3D47_65%26products_id%3D8424), many of which resulting from incorrectly commenting out PHP statements with HTML comments. One of the major results of these changes is that you "lost" the closing </div> for your header, resulting in your main content and footer residing as part of the (unclosed) header <div>.

15 May 2012, 12:21 PM
#3
igi2011 avatar

igi2011

New Zenner

Join Date:
Oct 2011
Location:
Kent, UK
Posts:
50
Plugin Contributions:
0

Re: Aligning Attributes box with Add to Cart box

thanks lat9 - that fixed it! I need to try to align the picture a bit better but I should be able to work it out now.

I've been meaning to sort out the override system for ages, thanks for the reminder... and I'll look into the php/html issues (which are entirely my fault I know!)