Checkmark

Thank you for your feedback

How do I customize Cross-Sell placement and appearance?

Learn how to change the layout and properties of Cross-Sell items using CSS.

Article ID: SLN19560

You can modify your store's CSS to customize the placement and appearance of cross-sell items on your product detail and cart pages. Below is a list of IDs and classes that may be modified, and descriptions of what each corresponds to.

IDs and classes are prefaced by the element each belongs to. Some elements include multiple classes, and are listed together. Conditional classes are highlighted in red.

IDDescription

div#ys_relatedItems

Div element, containing the cross-sell merchandising area
table.ystore-cross-sell-tableCross-sell table element
table.ystore-cross-sell-table-horizontalConditional cross-sell table element, used if horizontal cross-sell display has been selected
table.ystore-cross-sell-table-verticalConditional cross-sell table element, used if vertical display has been selected

/* Title Row */

tr.ystore-cross-sell-title-rowTable row element, used to style the title row

td.ystore-cross-sell-title-cell

Table data element, used to style the title row table data cell
h3.ystore-cross-sell-titleH eader element, used to style the Cross-Sell Header text

/* Recommendation Row */

tr.ystore-cross-sell-rowTable row element, used to style the recommendation row
tr.ystore-cross-sell-row-firstConditional table row element (used to style the first recommendation row only)
tr.ystore-cross-sell-row-lastConditional table row element (used to style the last recommendation row only)

/* A Single Recommendation (up to 3 per row) */

td.ystore-cross-sell-cellTable data element, used to style individual cross-sell item table data cells
td.ystore-cross-sell-cell-firstConditional table data element, used to style individual cross-sell item table data cells (used for the first table data cell only)
td.ystore-cross-sell-cell-lastConditional table data element, used to style individual cross-sell item table data cells (used for the last table data cell only)
td.ys_relatedItemDescTable data element, used to style the table data cell containing a product description
a.ystore-cross-sell-product-image-linkLink element, used to style a linked product image
img.ystore-cross-sell-product-imageImage element, used to style product images
div.ystore-cross-sell-product-captionDiv element, used to style the product caption area
h4.ystore-cross-sell-product-nameHeader element, used to style the product name
p.ystore-cross-sell-product-priceParagraph element, used to style the product price
p.ys_promoCondtional paragraph element, used to style the discount price of a product (used if a discount price has been set for the product only)
 

Sample CSS code

Cross-Sell Styles. */

.ystore-cross-sell-table { width: 100%; font: 100%; }
.ystore-cross-sell-title { padding-bottom: 6px; color: $item-caption-title-text-color; font: bold $item-caption-title-text-size $item-caption-title-text-font; }
.ystore-cross-sell-table-vertical .ystore-cross-sell-cell { width: 100%; }
.ystore-cross-sell-table-horizontal .ystore-cross-sell-cell { width: 28%; padding-right: 5%; }

.ystore-cross-sell-product-image-link { padding-bottom: 8px; }
.ystore-cross-sell-product-caption { padding-bottom: 16px; }
.ystore-cross-sell-product-caption p,
.ystore-cross-sell-product-caption h4 { margin: 0 0 10px; }
.ystore-cross-sell-table .ys_promo { }
 

Merchants using new templates can modify the css-edits file to make these changes. Merchants using other templates can add these rules to any external CSS file their pages are referencing, or embed the styles in the head section of their pages.

Note: Cross-Sell Manager is available only with Merchant Solutions Standard, Professional, and Store v.1 packages.

See Also: