Journal Style Add To Cart
jlegan
Registered Users Posts: 32 Big grins
Has anyone successfully added a custom button for the add to cart menu in the journal style? All examples use buymenu as the CSS tag, but journal uses buy-icon and as much as I have tried I cannot get it to take.
Here is a gallery: http://www.jameslegan.com/People/Kids-On-Bikes
The green box in the bottom right hand corner of each pic is as far as I have gotten it to work (removed the "Add To Cart" text from the box but my image is still not appearing and the box is still there. Here is my CSS:
/* Add To Cart */
.sm-user-ui .sm-gallery .sm-gallery-buy-icon .sm-button {
background-color: transparent;
border: none;
background-image: url(http://www.jameslegan.com/photos/i-V5n8FcB/0/X3/i-V5n8FcB-X3.png);
background-repeat: no-repeat;
background-position: center;
background-size: 137px 37px;
width: 137px;
height: 37px;
}
.sm-gallery .sm-gallery-buy-icon .sm-button-label,
.sm-gallery .sm-gallery-buy-icon .sm-fonticon {
display: none;
}
Thanks in advance,
Jim
Here is a gallery: http://www.jameslegan.com/People/Kids-On-Bikes
The green box in the bottom right hand corner of each pic is as far as I have gotten it to work (removed the "Add To Cart" text from the box but my image is still not appearing and the box is still there. Here is my CSS:
/* Add To Cart */
.sm-user-ui .sm-gallery .sm-gallery-buy-icon .sm-button {
background-color: transparent;
border: none;
background-image: url(http://www.jameslegan.com/photos/i-V5n8FcB/0/X3/i-V5n8FcB-X3.png);
background-repeat: no-repeat;
background-position: center;
background-size: 137px 37px;
width: 137px;
height: 37px;
}
.sm-gallery .sm-gallery-buy-icon .sm-button-label,
.sm-gallery .sm-gallery-buy-icon .sm-fonticon {
display: none;
}
Thanks in advance,
Jim
James Legan Photography
http://www.jameslegan.com
http://www.jameslegan.com
0
Comments
http://www.jameslegan.com
http://www.jameslegan.com
Thanks,
Jim
http://www.jameslegan.com
http://www.jameslegan.com
I finally got the button working (around post #4) but if you look closely, it is offset (appears to be a top margin in possible sm-accent) by 1 or 2 px. See attachement.
http://www.jameslegan.com
Thank you, it is getting much closer.
Padding by 8px in Chrome and Safari still offset the button by what looks like 1/2 of a pixel.
I kept tweaking it and at 7.75px top padding, Chrome is happy however Safari is not (still looks slightly off), that is until you zoom your browser in at which time it is happy.
Do we know why the no-chrome is not being applied to all of the buttons in journal style? I would argue this is a small bug with a likely relatively quick fix that is going to bite anyone else going forward with journal and wanting custom buttons.
For the time being I am going opaque the container that holds the buttons to hide the issue until it can be resolved.
Thanks again,
Jim
http://www.jameslegan.com
You're right. The padding wasn't needed. Sorry about that.
If you apply "vertical-align: top" to the buttons, the alignment issue will go away. Tested in Chrome, Safari, Firefox, and IE 10.
The 'Add to Cart' button has a 1px border by default. Applying no-chrome would make it not have a border.