Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Adding a border to new products feed


Name Name

Recommended Posts

Hi, I want to add a border to every product at the new product feed, like this (apologies for my paint skillspost-310690-0-63492000-1339081800_thumb.png)

 

But how would I do that? I'm trying to find the php file where this is located, but no luck. Ok, I know that I can add the border with this line in my css:

.contentText tbody td{border:1px solid black;}

BUT This has no margin at all. I tried this:

.contentText tbody td{border:1px solid black; margin-top:5px; margin-bottom:5px; margin-left:5px; margin-right:5px;}

But not working.

Link to comment
Share on other sites

The new products on home page come from the new_products.php. (includes/modules/new_products.php) By default I think there is no specific class set for the products, so go to new_products.php and find this line

 

$new_prods_content .= '<td width="33%" align="center" valign="top">

 

add a class you want e.g class="productsHome"

 

and add your css.

 

.productsHome {
border: 1px solid #000;
}

Find this post helpful? Click the 'Like this' button. :)

Link to comment
Share on other sites

There's no need to that to give the border property. .contentText tbody td{border:1px solid black;} will work fine. but I want to give every product a 5px margin from any other product

Link to comment
Share on other sites

@

 

If you go to the new_products.php file and find the table tag that should be just above the td I showed you in the previous post.

 

make sure your cellspacing in there is 5, that should work like you wanted.

 

$new_prods_content = '<table border="0" width="100%" cellspacing="5" cellpadding="2">';

while ($new_products = tep_db_fetch_array($new_products_query)) {

$counter++;

 

if ($col === 0) {

$new_prods_content .= '<tr>';

}

 

$new_prods_content .= '<td width="33%" style="border: 1px solid #000" align="center" valign="top"><a h........

Find this post helpful? Click the 'Like this' button. :)

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...