I’m doing a project for my buddy and he is using big cartel. I want the t-shirt to show and then a circle in the top right corner of the t-shirt to display the price and if the product is on sale. I used the below HTML/CSS to get what I have so far but as you can see it’s not coming out the way I intended and when I tried to add padding or margin to the product price it doesn’t move…any suggestions?
Note – the $19.99 is the coded price…the $14.99 price and where it says on sale is just an image I placed it underneath it for reference so I put it in the exact spot that it was designed in Photoshop
CSS Being Used:
#products {
float: left;
margin-top:35px;
}
#product-1, #product-2, #product-3, #product-4, #product-5, #product-6, #product-7, #product-8, #product-9, #product-10,
#product-11, #product-12, #product-13, #product-14, #product-15, #product-16, #product-17, #product-18, #product-19, #product-20,
#product-21, #product-22, #product-23, #product-24, #product-25, #product-26, #product-27, #product-28, #product-29, #product-30,
#product-31, #product-32, #product-33, #product-34 #product-35, #product-36, #product-37, #product-38, #product-39, #product-40, #product-41, #product-42, #product-43, #product-44, #product-45, #product-46, #product-47, #product-48, #product-49, #product-50, #product-51, #product-52, #product-55, #product-56, #product-57, #product-58, #product-59, #product-60, #product-61, #product-62, #product-63, #product-64, #product-65, #product-66, #product-67 #product-68, #product-69, #product-70, #product-71, #product-72, #product-73, #product-74, #product-75, #product-76, #product-77, #product-78, #product-79, #product-80, #product-81, #product-82, #product-83, #product-84, #product-85, #product-86, #product-87, #product-88, #product-89, #product-90, #product-91, #product-92, #product-93, #product-94, #product-95, #product-96, #product-97,
#product-98, #product-99, #product-100 {
float:left;
}
#products .product-img {width:225px; margin-left:5px; margin-right:5px;}
#products .product-title {font-size:16px;}
#products .product-price {color:#fff; font-family:Arial; font-size:13px;}
#products .pink-circle {background-image: url(http://soireeclothing.com/images/price-bg.png); height:54px; width:54px; margin-top:-250px; margin-left:170px;}
Result I’m Getting:
https://i.stack.imgur.com/RGLxK.png
Result I Want:
https://i.stack.imgur.com/dZzwc.jpg
Please post your html code.
I recommend changing your products to have one class to make your CSS cleaner.
A possible solution to your problem would be to use the CSS property
z-indexin a sale class. This could hide/show the sale price behind another element.To implement this into a product you could either manually put the sale price element into your HTML markup for each item on sale, or add it via Javascript.
Even easier with JQuery!
$('#Element').addClass('Class');