I came across some cool buttons on this site
Here is the code I found:
@import "https://fonts.googleapis.com/css?family=Didact+Gothic&subset=greek";
@import "https://cdn.linearicons.com/free/1.0.0/icon-font.min.css";
body {
font-family: 'Didact Gothic', sans-serif;
letter-spacing: 1px;
font-weight: bold;
}
.side-menu {
display: flex;
flex-wrap: wrap;
max-width: 300px;
position: fixed;
right: 0;
top: 50%;
-webkit-transform: translateY(-50%);
transform: translateY(-50%);
}
.side-menu > * + * {
margin-top: 0.5em;
}
.btn {
display: flex;
color: #fff;
flex: 100%;
transition: -webkit-transform 0.2s ease-out;
-webkit-transform: translateX(236px);
}
.btn:hover {
-webkit-transform: translateX(0px);
}
.btn__icon {
flex: 0 0 32px;
padding: 1rem;
font-size: 2em;
background-color: #ff6347;
}
.btn__text {
flex: 0 0 100%;
display: flex;
align-items: center;
padding: 1rem;
background-color: #ff927e;
}
I attempted to recreate these buttons in my CSS file, but encountered issues with the positioning and layout. Here is how I tried implementing it:
<a href="#" class="btn"><button>register</button></a>
It seems like there might be a simple mistake I'm missing, as I am new to CSS. Any help would be appreciated.