Forums / Templates, Stylesheets, Page Layout / how do i eliminate the white space between attributes?

how do i eliminate the white space between attributes?

Views: 3,387

Results 1 to 10 of 10
22 May 2007, 12:18 AM
#1
humbll avatar

humbll

Zen Follower

Join Date:
Jan 2007
Location:
USA
Posts:
219
Plugin Contributions:
0

how do i eliminate the white space between attributes?

If you look at this page: http://rda-enterprises.com/index.php?main_page=product_info&cPath=1_2&products_id=9
you will see that there are two attributes set: duration and soundtrack. There is a whole lot of white space in between them, but i would like them to be one right under the other. How do i go about this? thanks in advance...

Grasshopper, **GOT BOOK?** - I don't, and I am constantly in here begging for help and **Donating to Zen Cart** in feeble attempts to bribe the developers for help. **Get your copy today**** and avoid my fate!**

22 May 2007, 3:05 AM
#2
gjh42 avatar

gjh42

Black Belt

Join Date:
Jul 2005
Location:
Upstate NY
Posts:
21,876
Plugin Contributions:
8

Re: how do i eliminate the white space between attributes?

The cause of the white space is two <br class="clearBoth" /> tags after attribute displays. The clearBoth forces the break to be below any other nearby floated element, i.e. the add to cart box.

I don't have access to the actual files at the moment, but you can start by looking at /includes/templates/your_template/templates/tpl_product_info_display.php; a modules/?/product_info.php and/or (?)tpl_attributes.php will likely be the place to strip the clearBoth out of the attribute output building. I can look again when I get home if you still need help.

22 May 2007, 4:42 AM
#3
humbll avatar

humbll

Zen Follower

Join Date:
Jan 2007
Location:
USA
Posts:
219
Plugin Contributions:
0

Re: how do i eliminate the white space between attributes?

gjh42:

The cause of the white space is two <br class="clearBoth" /> tags after attribute displays. The clearBoth forces the break to be below any other nearby floated element, i.e. the add to cart box.

I don't have access to the actual files at the moment, but you can start by looking at /includes/templates/your_template/templates/tpl_product_info_display.php; a modules/?/product_info.php and/or (?)tpl_attributes.php will likely be the place to strip the clearBoth out of the attribute output building. I can look again when I get home if you still need help.

Well I cannot make heads or tails of it all, i found what i think is the right file, the template i am using is the sophie blue-grey, and it did not have a file named tpl_product_info_display.php, but i did find one in /includes/templates/template_default/templates, but it did not look like it had a <br class="clearBoth" /> tag in it. So I will take you up on that offer to lok it up when you get home.. THanks in advance..

Grasshopper, **GOT BOOK?** - I don't, and I am constantly in here begging for help and **Donating to Zen Cart** in feeble attempts to bribe the developers for help. **Get your copy today**** and avoid my fate!**

22 May 2007, 5:02 AM
#4
humbll avatar

humbll

Zen Follower

Join Date:
Jan 2007
Location:
USA
Posts:
219
Plugin Contributions:
0

Re: how do i eliminate the white space between attributes?

Ideally i wold like to get it looking like this:
http://www.decaldepot.net/zencart/index.php?main_page=product_info&cPath=21_25&products_id=214
I really like the way that looks, with the add 2 cart button below the attributes so that they are impossible to miss. unfortunately the thread where i found this was a question similar to mine, but they did not say how they got it like this...

Grasshopper, **GOT BOOK?** - I don't, and I am constantly in here begging for help and **Donating to Zen Cart** in feeble attempts to bribe the developers for help. **Get your copy today**** and avoid my fate!**

22 May 2007, 12:57 PM
#5
gjh42 avatar

gjh42

Black Belt

Join Date:
Jul 2005
Location:
Upstate NY
Posts:
21,876
Plugin Contributions:
8

Re: how do i eliminate the white space between attributes?

That makes the question really easy.

In tpl_product_info_display.php, each section of output is contained between <!--bof xxxx--> and <!--eof xxxx--> comments; simply move the add to cart section below the attributes section, and they will fall into line. You may also need to change float or text-align in the stylesheet for proper arrangement.

It's the interaction of elements on the same line that is causing your present awkwardness.

22 May 2007, 8:57 PM
#6
humbll avatar

humbll

Zen Follower

Join Date:
Jan 2007
Location:
USA
Posts:
219
Plugin Contributions:
0

Re: how do i eliminate the white space between attributes?

gjh42:

That makes the question really easy.

In tpl_product_info_display.php, each section of output is contained between <!--bof xxxx--> and <!--eof xxxx--> comments; simply move the add to cart section below the attributes section, and they will fall into line. You may also need to change float or text-align in the stylesheet for proper arrangement.

It's the interaction of elements on the same line that is causing your present awkwardness.

Worked like a charm!! Thank you soo much!

Grasshopper, **GOT BOOK?** - I don't, and I am constantly in here begging for help and **Donating to Zen Cart** in feeble attempts to bribe the developers for help. **Get your copy today**** and avoid my fate!**

2 Dec 2010, 4:33 PM
#7
coldfirepromotions avatar

coldfirepromotions

New Zenner

Join Date:
Dec 2010
Posts:
7
Plugin Contributions:
0

Re: how do i eliminate the white space between attributes?

I hate to bump (really) old threads, but this was one of the first options in Google and it worked absolutely perfect! Even 3 1/2 years later! :clap:

9 Feb 2011, 12:22 PM
#8
philipb avatar

philipb

New Zenner

Join Date:
Feb 2011
Location:
Manchester, UK
Posts:
55
Plugin Contributions:
0

Re: how do i eliminate the white space between attributes?

gjh42:

The cause of the white space is two <br class="clearBoth" /> tags after attribute displays. The clearBoth forces the break to be below any other nearby floated element, i.e. the add to cart box.

I don't have access to the actual files at the moment, but you can start by looking at /includes/templates/your_template/templates/tpl_product_info_display.php; a modules/?/product_info.php and/or (?)tpl_attributes.php will likely be the place to strip the clearBoth out of the attribute output building. I can look again when I get home if you still need help.

Hi gjh42,

I am following your advice above; looking for a way to align attributes alongside the Add to Cart button.

Please can you advise further on which file to find the associated <br class="clearBoth" /> tags.

Using V1.3.9 and Contemporary Green template.

Many thanks,
P

9 Feb 2011, 3:43 PM
#9
gjh42 avatar

gjh42

Black Belt

Join Date:
Jul 2005
Location:
Upstate NY
Posts:
21,876
Plugin Contributions:
8

Re: how do i eliminate the white space between attributes?

/includes/templates/your_template/templates/tpl_modules_attributes.php is the file that has the clearBoth (copy it from /includes/templates/template_default/templates/tpl_modules_attributes.php).

You may be able to take care of your display issues just in the stylesheet, though. Add these rules:

#productDetailsList+br, .wrapperAttribsOptions br, .wrapperAttribsOptions+br {display: none;}

#productTellFriendLink {clear: both;}

You may not need all of these selectors, depending on your exact current layout. Seeing your site will let me advise exactly what you need.

10 Feb 2011, 4:39 PM
#10
philipb avatar

philipb

New Zenner

Join Date:
Feb 2011
Location:
Manchester, UK
Posts:
55
Plugin Contributions:
0

Re: how do i eliminate the white space between attributes?

Hi gjh42,

Pologies for delay! Thanks or your suggestions; have worked to an acceptable conclusion using the CSS option.

Had to adjust the cartAdd top margin and the wrapperAttribsOptions width and then add a line in the CSS to reduce the productReviewLink margin.

Hope it works out for the rest of the site! Will find out I guess.

Thanks again & regards,
P