Reputation: 1
I 'd like add a little background structure to my css buttons. That's what the button code looks like:
.button a {
color: white;
padding: 2% 6%;
width: 100%;
margin-top: 3%;
display: inline-block;
text-decoration:none;
background-color: #49c0f0; background-image: -webkit-gradient(linear, left top, left bottom, from(#49c0f0), to(#2CAFE3));
position:relative;}
Now I user :after to add an almost transparent background image to the button:
.button a:after {
content:'';
position:absolute;
top:0;
left:0;
height:100%;
width:100%;
background:url(../images/structure.png);
opacity:0.05;}
It looks pretty nice but unfortunately all of the links before and after those buttons are not clickable anymore. I was wondering if it has something to do with the absolute / relative positioning of the surrounding items...
Upvotes: 0
Views: 47