First, a few notes:
1) Your image should probably be part of the HTML. It will be changing and is part of the page content (vs design).
2) You can't use unicode in CSS the same way you do in HTML. You need a backslash before the number (see Placing Unicode character in CSS content value)
Now, on to the answer to your main question...
Option 1:
If you want the CSS content value to always be the same, you can use CSS pseudo elements ::after
and/or ::before
to accomplish what you were trying to do (see snippet below). You can't use content in CSS without these, though.
.cart-item-link {
position: relative;
display: inline-block;
border: transparent !important;
background-color: transparent !important;
}
.cart-item-link:hover::before {
content: "Add to Cart";
position: absolute;
bottom: 20%;
left: 50%;
transform: translateX(-50%);
bottom: 20%;
padding: 15px;
background-color: rgba(100, 230, 230, 0.5);
min-width: 80%;
text-align: center;
}
<a href="/?preview_id=4212&preview_nonce=a62d30b2b8&preview=true&add-to-cart=5767" class="cart-item-link">
<img src="http://neuronade.com/wp-content/uploads/bfi_thumb/Shop-Produktbild_Bundle_englisch-min-mhvx28jvtfhpc0dhkugvgrvgvg1h17l9ze3zkr118a.jpg" alt="" />
</a>
Option 2:
Of course, there is another possibility, too: The "add to cart" could also be placed into a <span>
tag which could then use CSS with a slightly different selector like .cart-item-link:hover > .cart-item-info { ... }
. (see snippet below)
.cart-item-link {
position: relative;
display: inline-block;
border: transparent !important;
background-color: transparent !important;
}
.cart-item-link > .cart-item-info {
display: none;
position: absolute;
bottom: 20%;
left: 50%;
transform: translateX(-50%);
bottom: 20%;
padding: 15px;
background-color: rgba(100, 230, 230, 0.5);
min-width: 80%;
text-align: center;
}
.cart-item-link:hover > .cart-item-info {
display: block;
}
<a href="/?preview_id=4212&preview_nonce=a62d30b2b8&preview=true&add-to-cart=5767" class="cart-item-link">
<span class="cart-item-info">Add to Cart</span>
<img src="http://neuronade.com/wp-content/uploads/bfi_thumb/Shop-Produktbild_Bundle_englisch-min-mhvx28jvtfhpc0dhkugvgrvgvg1h17l9ze3zkr118a.jpg" alt="" />
</a>