Forums / Templates, Stylesheets, Page Layout / Excessive attribute white space w/no images

Excessive attribute white space w/no images

Locked

Views: 1,200

Results 1 to 8 of 8
This thread is locked. New replies are disabled.
25 Sep 2007, 3:02 AM
#1
rpgrayso avatar

rpgrayso

New Zenner

Join Date:
Sep 2007
Posts:
4
Plugin Contributions:
0

Excessive attribute white space w/no images

Sorry if this is a dumb question (I only have 3 days of experience with Zencart) but I've spent an hour searching the forum for an answer with no success.

I'm just starting to set up a site. My product has two attributes -- size and style. Neither of the attributes have any image associated with them. When I look at the product detail page however, it looks like Zen is leaving space for an image for each attribute. Where do I specify 'no image' for the attribute? (Assuming that's my problem.) I've found the "image styles" under product options....but that assumes you have an image.

http://greenteegraphics.com/zencart/index.php?main_page=product_info&cPath=2&products_id=6

Thanks in advance.

Richard

25 Sep 2007, 6:22 AM
#2
kobra avatar

kobra

Black Belt

Join Date:
Aug 2005
Location:
Arizona
Posts:
31,500
Plugin Contributions:
4

Re: Excessive attribute white space w/no images

You can try adding this statement to your stylesheet.css file

#cartAdd {
clear: both;
width: 95%;
}

But the best way to control this is by rearranging the order in your templates (a copy of this file) tpl_product_info_display.php and add the clear both br entry after the add to cart code block or optionally move the block to after the attributes block

Zen-Venom Get Bitten

25 Sep 2007, 5:49 PM
#3
rpgrayso avatar

rpgrayso

New Zenner

Join Date:
Sep 2007
Posts:
4
Plugin Contributions:
0

Re: Excessive attribute white space w/no images

Thanks for your suggestions, but I'm still struggling with this. I know nothing about PHP, so please bear with me.

I'd like to follow "best practices" and make updates to the tpl file rather than the CSS file. Wouldn't the applicable file in this case be the tpl_modules_attributes.php file? Would you please give me a bit more detail as to what I need to rearrange and/or edit?

Thanks!!!!

25 Sep 2007, 10:35 PM
#4
kobra avatar

kobra

Black Belt

Join Date:
Aug 2005
Location:
Arizona
Posts:
31,500
Plugin Contributions:
4

Re: Excessive attribute white space w/no images

tpl_product_info_display.php is the file for the way that the information is displayed...others normally get the info and make it available for use.

Have a look at the above file for it is well constructed in blocks that begin with BOF and end with EOF. These full blocks inclusive, can be rearranged in another order that you might prefer.

I think that you would want your add to cart block after the attributes block with a clear both in between them

Zen-Venom Get Bitten

26 Sep 2007, 4:55 PM
#5
rpgrayso avatar

rpgrayso

New Zenner

Join Date:
Sep 2007
Posts:
4
Plugin Contributions:
0

Re: Excessive attribute white space w/no images

Aha! This is starting to make some sense. Thank you for the additional info. I've moved the Add to Cart block to after the Attributes block, and it's definitely an improvement.

One follow-up question if I may. I tried inserting your 'clear both' code between the two blocks, and the code fragment ends up just displaying on one line on the screen, between the attributes and the add to cart button:

#cartAdd { clear: both; width: 95%; }

Was I supposed to wrap this code with some sort of php directives that a newbie such as me would be ignorant of?

Thanks!

Richard

27 Sep 2007, 2:45 AM
#6
kobra avatar

kobra

Black Belt

Join Date:
Aug 2005
Location:
Arizona
Posts:
31,500
Plugin Contributions:
4

Re: Excessive attribute white space w/no images

That was css for what you had previously and not for if you choose to alter the file.

This is where it should be in the file if you do not have it already

<br class="clearBoth" />

<!--bof Add to Cart Box -->

Zen-Venom Get Bitten

27 Sep 2007, 4:52 PM
#7
rpgrayso avatar

rpgrayso

New Zenner

Join Date:
Sep 2007
Posts:
4
Plugin Contributions:
0

Re: Excessive attribute white space w/no images

Got it! I really appreciate your help.

Richard

3 Nov 2007, 5:47 AM
#8
rsanchezsa avatar

rsanchezsa

New Zenner

Join Date:
Oct 2007
Posts:
2
Plugin Contributions:
0

Re: Excessive attribute white space w/no images

Hello:

How has you moved the Add to Cart block to after the Attributes block?.

I'm not able to find the way...