Optimize
1.8K members online now
1.8K members online now
Learn how to create your first experiment and get tips on creating A/B, redirect, and multivariate tests.
Guide Me
star_border
Reply

Want to hover over button in my A/B test, but this doesn't work

Visitor ✭ ✭ ✭
# 1
Visitor ✭ ✭ ✭

Hi, 

 

I have setup my first Google Optimize A/B test by simply changing the checkout button color in the cart. So far so good. 

 

Issue is, that in the original variant the button color changes when hovering over it. This didn't happen in my test variant.

 

I tried to insert  the following in the css editor: 

 

#btn-cta>hover{

 background: linear-gradient(180deg, #d70077 40%, #eb6ea3) !important;

}

 

AND 

 

.btn-cta>hover{

 background: #000 !important;

}

 

But nothing worked! I got the following as error message: "Some of the CSS code will be cleaned up or may have errors."

 

How can I make this work? 

 

Thanks in advance and best regards, 

 

Mimi

Want to hover over button in my A/B test, but this doesn't work

Visitor ✭ ✭ ✭
# 2
Visitor ✭ ✭ ✭

Solution found (thumbsup). 

 

I gave my button an id and used this id in css file. 

 

#btn-green:hover {
...
}

 

Error message still come for every change I do, but when clicking on "clear" and no css error occurs I can normally save changes.