Forums / Templates, Stylesheets, Page Layout / category_row.php - How do I give main page cateogry image a border?

category_row.php - How do I give main page cateogry image a border?

Views: 595

Results 1 to 3 of 3
23 Feb 2012, 1:42 PM
#1
mi16chap avatar

mi16chap

New Zenner

Join Date:
Oct 2011
Location:
West Yorkshire - England
Posts:
38
Plugin Contributions:
0

category_row.php - How do I give main page cateogry image a border?

Afternoon all.

I am displaying all my categories and their images on my main page of the site.

http://test.italianhampers.co.uk

I would like to give the images a border as per the cateogry images on any cateogry listing page, example

http://test.italianhampers.co.uk/index.php?main_page=index&cPath=6

I think I need to edit category_row.php which generates the main index category listing on how it builds the page, I dont know where I insert the code, or the syntax.

//    $categories->fields['products_name'] = zen_get_products_name($categories->fields['products_id']);

    $list_box_contents[$row][$col] = array('params' => 'class="categoryListBoxContents"' . ' ' . 'style="width:' . $col_width . '%;"',
                                           'text' => '<a href="' . zen_href_link(FILENAME_DEFAULT, $cPath_new) . '">' . zen_image(DIR_WS_IMAGES . $categories->fields['categories_image'], $categories->fields['categories_name'], SUBCATEGORY_IMAGE_WIDTH, SUBCATEGORY_IMAGE_HEIGHT) . '<br />' . $categories->fields['categories_name'] . '</a>');

Can I use the piece of CSS that is already in my stylesheet for the category listing?(2nd link)

Thanks for any help.

23 Feb 2012, 2:02 PM
#2
gjh42 avatar

gjh42

Black Belt

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

Re: category_row.php - How do I give main page cateogry image a border?

Add the part in red to this rule:
stylesheet.css (line 1042) ```
.categoryListBoxContents img, .listingProductImage {
padding:0px;
border: 2px solid #cfcfcf;
margin: 8px;
}

23 Feb 2012, 10:50 PM
#3
mi16chap avatar

mi16chap

New Zenner

Join Date:
Oct 2011
Location:
West Yorkshire - England
Posts:
38
Plugin Contributions:
0

Re: category_row.php - How do I give main page cateogry image a border?

That worked a treat...thank you for looking and for your time. :smile:
7