.zero-clipboard { position: relative; display: none; } .btn-clipboard { position: absolute; top: 0; right: 0; z-index: 10; display: block; padding: 5px 8px; font-size: 12px; color: #767676; cursor: pointer; background-color: #fff; border: 1px solid #e1e1e8; border-radius: 0 4px 0 4px; } .btn-clipboard-hover { color: #fff; background-color: #563d7c; border-color: #563d7c; } @media (min-width: 768px) { .zero-clipboard { display: block; } .bs-example + .zero-clipboard .btn-clipboard { top: -16px; border-top-right-radius: 0; } }