Ok i have fixed the squished products, now back to what i wanted to make it look like...
How do i add a box around the item and center it both vertically and horizontally?
Thanks for your patience
.centerBoxWrapperContents table {border: 1px dotted #555555;}
Adjust as required.
You appear to have gotten the listing elements nicely centered already.
OK... a really close look at the Dealsdirect site (faint lines!) shows that what you are after is not a solid grid, but separate boxes around each product, with space between them.
Sorry for all the running around; all you need for this is to specify the border on .centerBoxContentsProducts, as well as height and a margin:
.centerBoxContentsProducts {border: 1px solid #999999; margin: 3px; height: 260px;}
Since this will make the products add up to wider than the space available, you will need to edit a file to reduce the assigned width of products. I'll have to go look that up and get back.
Last edited by gjh42; 8 Dec 2008 at 07:38 AM.
In your Column Grid version of /includes/modules/your_template/product_listing.php, find this section:and change both instances ofPHP Code:// Used for Column Layout (Grid Layout) add on module
$column = 0;
if (PRODUCT_LISTING_LAYOUT_STYLE == 'columns') {
if ($num_products_count < PRODUCT_LISTING_COLUMNS_PER_ROW || PRODUCT_LISTING_COLUMNS_PER_ROW == 0 ) {
$col_width = floor(100/$num_products_count) - 0.5;
} else {
$col_width = floor(100/PRODUCT_LISTING_COLUMNS_PER_ROW) - 0.5;
}
}
floor(100/...) - 0.5
to
floor(100/...) - 1.5
Adjust the 1.5 as required to work with the margin you want.PHP Code:// Used for Column Layout (Grid Layout) add on module
$column = 0;
if (PRODUCT_LISTING_LAYOUT_STYLE == 'columns') {
if ($num_products_count < PRODUCT_LISTING_COLUMNS_PER_ROW || PRODUCT_LISTING_COLUMNS_PER_ROW == 0 ) {
$col_width = floor(100/$num_products_count) - 1.5;
} else {
$col_width = floor(100/PRODUCT_LISTING_COLUMNS_PER_ROW) - 1.5;
}
}
There are several ways you can tweak this calculation; experiment if you wish once you understand the logic.
Thanks for the advise can i just ask what exactly does the above do? I have been playing around with it for the past hour and i have not seen any changes :S
Also i have any question if you have a look at the picture a have attached of the new products you will see that they dont size properly how can i get them to stay the same size all the time evenly spread vertically and horizontally like the products in my categories and dealsdirect?