Rich-text Reply

Smooth UX Button?

HB 12-02-14
Accepted Solution

Smooth UX Button?

Hey!

 

I'd really like to design this kind of button. Can't figure out how to do it with the visual editor, I can't seem to make the edges go away and become more round-ish?

 

Best,

Henrik

HB
Level 2

JDahlinANF 12-02-14
 

Re: Smooth UX Button?

This is all handled via CSS.  Keep in mind that this sort of thing is very finicky cross-browser and cross-device.  Here is the nutshell of what you need for "Jumbotron".

(save this as a .html page and open in your browser)

<style>
*:before, *:after {
    box-sizing: border-box;
}
*:before, *:after {
    box-sizing: border-box;
}
.btn-lg, .btn-group-lg > .btn {
    border-radius: 6px;
    font-size: 18px;
    line-height: 1.33;
    padding: 10px 16px;
}
.btn-primary {
    background-color: #337ab7;
    border-color: #2e6da4;
    color: #fff;
}
.btn {
    -moz-user-select: none;
    background-image: none;
    border: 1px solid transparent;
    border-radius: 4px;
    cursor: pointer;
    display: inline-block;
    font-size: 14px;
    font-weight: 400;
    line-height: 1.42857;
    margin-bottom: 0;
    padding: 6px 12px;
    text-align: center;
    vertical-align: middle;
    white-space: nowrap;
}
a {
    color: #337ab7;
    text-decoration: none;
}
</style>
<p>
<a class="btn btn-primary btn-lg" role="button" href="#">Learn more</a>
</p>

 

JDahlinANF 12-02-14
 

Re: Smooth UX Button?

To place this into an Optimizely experiment, turn all those lines of CSS into a variable and insert it into the HTML of your page, like this (with all of the CSS, of course, not the placeholder stuff I show below):

 

$('body').prepend('<style>.hideMe {display:none !important;}</style>');

 Once that is injected into your page, you are ready to replace the existing button (or perhaps modify it by adding right classes to an existing button).

HB 12-04-14
 

Re: Smooth UX Button?

Thanks @nap0leon !!! <3 Smiley Happy
HB
Level 2