Clipped Button in css not as Expected - html

Expected
.clipped-button {
height: 42px;
min-width:120px;
width: auto;
display: block;
border:none;
border-radius:2px;
align-items:center;
clip-path: polygon(0px 0%, 0px 60%, 18px 100%, 100% 100%, 100% 40%, calc(100% - 18px) 0px);
padding: 2.625px;
background-color: #993029;
}
.btn {
width: 100%;
height: 100%;
background-color: rgb(205, 65, 58);
display:flex;
justify-content:center;
align-items:center;
clip-path: polygon(0px 0%, 0px 60%, 16px 100%, 100% 100%, 100% 40%, calc(100% - 16px) 0px);
color: rgb(255, 255, 255);
}
<button class="clipped-button"><div class="btn">Click Me</div>
</button>
Not getting the clipped corners rounded
Please help to round the clipped corners at top right and bottom left if possible

Rather than a clip-path perhaps something similar to the following is an option.
.button {
display: inline-block;
width: 200px;
height: 50px;
padding: 10px 20px;
font-size: 1.2em;
cursor: pointer;
text-align: center;
text-decoration: none;
justify-content: center;
align-items: center;
outline: none;
color: #fff;
border-radius: 25px;
border: 5px solid rgb(190, 40, 40);
background-color: rgba(200, 60, 60, 0.6);
background-image: linear-gradient(to bottom right, rgba(255,0,0,0), rgba(200, 60, 60, 0.8));
}
.button:hover {
box-shadow: 0 10px 10px 0 rgba(0,0,0,0.2);
/*--background-color: rgba(200, 60, 60, 1.0); --alt color--*/
background-image: linear-gradient(to bottom right, rgba(255,0,0,0), rgba(250, 100, 100, 1.0));
}
.button span {
cursor: pointer;
display: inline-block;
position: relative;
transition: 0.5s;
}
.button span:after {
content: '\1F846 \1F846';
position: absolute;
opacity: 0;
top: -2px;
right: -40px;
transition: 0.5s;
}
.button:hover span {
padding-right: 40px;
}
.button:hover span:after {
opacity: 1;
right: 0;
}
<button class="button"><span> Click Me </span></button>

Related

Placeholder glitches on Chrome and Safari browser showing perfect for mozilla browser

I create login form, have email and password fields both form place changes position in chrome and safari browser
/*LOGIN*/
.login-container{
display: flex;
width: 100%;
min-height: 100vh;
}
.login-form:before{
content: "";
position: absolute;
bottom: 0px;
right: 50px;
height: 800px;
width: 800px;
background: transparent;
border: 1px solid rgba(0, 0, 0, 0.05);
border-radius: 900px;
}
.login-form{
flex-basis: 575px;
flex-grow: 0;
position: relative;
background: linear-gradient(to top left, rgba(50, 78, 225, 0.20) 0%, rgba(255, 255, 255, 0.0) 100%);
background: -moz-linear-gradient(to top left, rgba(50, 78, 225, 0.20) 0%, rgba(255, 255, 255, 0.0) 100%);
background: -webkit-linear-gradient(to top left, rgba(50, 78, 225, 0.20) 0%, rgba(255, 255, 255, 0.0) 100%);
background: -ms-linear-gradient(to top left, rgba(50, 78, 225, 0.20) 0%, rgba(255, 255, 255, 0.0) 100%);
background: -o-linear-gradient(to top left, rgba(50, 78, 225, 0.20) 0%, rgba(255, 255, 255, 0.0) 100%);
padding: 75px;
}
.login-form:after{
content: "";
position: absolute;
bottom: 0px;
right: 130px;
height: 600px;
width: 600px;
background: transparent;
border: 1px solid rgba(0, 0, 0, 0.05);
border-radius: 600px;
}
.login-form .band-identity{
height: 85px;
width: 85px;
border-radius: 20px 35px 20px 35px;
background-color: #000;
display: inline-flex;
align-items: center;
justify-content: center;
border: 5px solid #fff;
}
.login-form .brand-heading{
flex-grow: 1;
flex-basis: 0;
}
.login-form h3.page-title{
font-family: poppins-regular;
font-size: 24px;
background-color: #000000;
border-radius: 100px;
padding: 12px 30px 17px 30px;
color: #fff;
display: inline-flex;
margin-right: -150px;
float: right;
letter-spacing: 1px;
}
.login-container h4.page-title{
font-family: poppins-regular;
font-size: 24px;
background-color: #000000;
border-radius: 100px 0px 0px 100px;
padding: 20px 30px 25px 30px;
color: #fff;
display: inline-flex;
position: absolute;
bottom: 100px;
right: 0px;
}
.login-form h1 span{
font-family: poppins-medium;
font-size: 26px;
color: #000;
display: block;
line-height: 40px;
}
.login-form h1{
font-family: poppins-bold;
color: #324ee1;
font-size: 42px;
position: relative;
padding: 35px 0px 60px 0px;
}
.login-form h1:after{
content: "";
bottom: 0px;
right: 27px;
height: 50px;
width: 50px;
border-radius: 50px;
border: 10px solid #ffc000;
position: absolute;
}
.login-banner{
flex-grow: 1;
flex-basis: 0;
}
.login-banner img{
height: 100%;
width: 100%;
object-fit: cover;
}
form.material-form{
position: relative;
z-index: 1;
}
.material-form .form-group{
margin-bottom: 50px;
}
.material-form label{
color: rgba(0,0,0,0.7);
font-size: 18px;
margin-bottom: 5px;
font-family: avenir-roman;
opacity: 0.5;
}
.material-form a.btn-send-message{
white-space: nowrap;
}
.material-form #errorHandling{
display: none;
}
.material-form .form-group i {
position: absolute;
left: 15px;
top: 45px;
color: rgba(0, 0, 0, 0.60);
font-size: 20px;
}
.material-form .form-group p {
font-family: ubuntu-regular;
font-size: 18px;
opacity: 0.6;
}
.material-form input,
.material-form textarea {
margin: 0px 0px 10px 0px;
width: 100%;
display: block;
border: none;
padding: 10px 0 10px 35px;
border-bottom: solid 1px rgba(0, 0, 0, 0.15);
-webkit-transition: all 0.3s cubic-bezier(0.64, 0.09, 0.08, 1);
transition: all 0.3s cubic-bezier(0.64, 0.09, 0.08, 1);
background: -webkit-linear-gradient(top, rgba(255,255,255,0) 0%, rgba(255,255,255,0) calc(100% - 2px), #324ee1 calc(100% - 2px), #324ee1 100%);
background: linear-gradient(to bottom, rgba(255,255,255,0) 0%, rgba(255,255,255,0) calc(100% - 2px), #324ee1 calc(100% - 2px), #324ee1 100%);
background-position: 0 0;
background-size: 0px 100%;
background-repeat: no-repeat;
color: rgba(0, 0, 0, 0.95);
font-size: 20px;
resize: none;
font-family: poppins-regular;
}
/* .material-form input:focus,
.material-form input:valid,
.material-form textarea:focus,
.material-form textarea:valid { */
.material-form input:focus,
.material-form textarea:focus{
box-shadow: none;
outline: none;
background-size: 100% 100%;
border-bottom: solid 1px #324ee1;
}
.material-form input::-webkit-input-placeholder,
.material-form textarea::-webkit-input-placeholder {
font-family: 'roboto', sans-serif;
-webkit-transition: all 0.3s ease-in-out;
transition: all 0.3s ease-in-out;
font-size: 10px;
}
.material-form input:focus::-webkit-input-placeholder,
.material-form input:valid::-webkit-input-placeholder,
.material-form textarea:focus::-webkit-input-placeholder,
.material-form textarea:valid::-webkit-input-placeholder {
color: #000;
font-size: 10px;
-webkit-transform: translateY(-20px);
transform: translateY(-20px);
visibility: visible !important;
}
a.link-forgot-password {
font-family: avenir-roman;
font-size: 19px;
color: rgba(0, 0, 0, 0.55);
margin: 10px 0px;
display: block;
}
a.link-forgot-password:hover {
color: rgba(0, 0, 0, 0.75);
}
.btn-login{
margin-top: 35px;
transition: all 0.3s;
font-size: 20px;
}
.btn-login:hover{
color: #fff;
background-color: #3149c9;
margin-top: 32px;
transition: all 0.3s;
}
.btn-login:hover:after{
bottom: -1px;
opacity: 0.85;
}
.btn-login:hover i{
animation: 1s iconbounce forwards;
transition: 0.5s;
}
<form action="login.php" id="login" name="login" method="post" class="material-form py-sm-0">
<div class="row">
<div class="col-12">
<div class="form-group">
<label for="email">email</label>
<i class="far fa-envelope-open"></i>
<input type="text" id="email" name="email" aria-describedby="errorHandling" placeholder="companysupport#gmail.com" >
</div>
</div>
<div class="col-12">
<div class="form-group">
<label for="password">password</label>
<i class="fa fa-key"></i>
<input type="password" id="password" name="password" aria-describedby="errorHandling" placeholder="**********" >
</div>
</div>
<div class="col-12">
Forgot your password?
</div>
<div class="col-12">
<button type="submit" class="btn-style-1 btn-lg btn-login">login <i class="fas fa-arrow-right ml-3"></i></button>
</div>
</div>
</form>
It is showing perfect for mozilla browser
It glitches as below images for chrome and safari browsers as below
Thank You
You should remove the following rules if you don't want to alter its position
.material-form input::-webkit-input-placeholder,
.material-form textarea::-webkit-input-placeholder {
font-family: 'roboto', sans-serif;
-webkit-transition: all 0.3s ease-in-out;
transition: all 0.3s ease-in-out;
font-size: 10px;
}
.material-form input:focus::-webkit-input-placeholder,
.material-form input:valid::-webkit-input-placeholder,
.material-form textarea:focus::-webkit-input-placeholder,
.material-form textarea:valid::-webkit-input-placeholder {
color: #000;
font-size: 10px;
-webkit-transform: translateY(-20px);
transform: translateY(-20px);
visibility: visible !important;
}
/*LOGIN*/
.login-container {
display: flex;
width: 100%;
min-height: 100vh;
}
.login-form:before {
content: "";
position: absolute;
bottom: 0px;
right: 50px;
height: 800px;
width: 800px;
background: transparent;
border: 1px solid rgba(0, 0, 0, 0.05);
border-radius: 900px;
}
.login-form {
flex-basis: 575px;
flex-grow: 0;
position: relative;
background: linear-gradient(to top left, rgba(50, 78, 225, 0.20) 0%, rgba(255, 255, 255, 0.0) 100%);
background: -moz-linear-gradient(to top left, rgba(50, 78, 225, 0.20) 0%, rgba(255, 255, 255, 0.0) 100%);
background: -webkit-linear-gradient(to top left, rgba(50, 78, 225, 0.20) 0%, rgba(255, 255, 255, 0.0) 100%);
background: -ms-linear-gradient(to top left, rgba(50, 78, 225, 0.20) 0%, rgba(255, 255, 255, 0.0) 100%);
background: -o-linear-gradient(to top left, rgba(50, 78, 225, 0.20) 0%, rgba(255, 255, 255, 0.0) 100%);
padding: 75px;
}
.login-form:after {
content: "";
position: absolute;
bottom: 0px;
right: 130px;
height: 600px;
width: 600px;
background: transparent;
border: 1px solid rgba(0, 0, 0, 0.05);
border-radius: 600px;
}
.login-form .band-identity {
height: 85px;
width: 85px;
border-radius: 20px 35px 20px 35px;
background-color: #000;
display: inline-flex;
align-items: center;
justify-content: center;
border: 5px solid #fff;
}
.login-form .brand-heading {
flex-grow: 1;
flex-basis: 0;
}
.login-form h3.page-title {
font-family: poppins-regular;
font-size: 24px;
background-color: #000000;
border-radius: 100px;
padding: 12px 30px 17px 30px;
color: #fff;
display: inline-flex;
margin-right: -150px;
float: right;
letter-spacing: 1px;
}
.login-container h4.page-title {
font-family: poppins-regular;
font-size: 24px;
background-color: #000000;
border-radius: 100px 0px 0px 100px;
padding: 20px 30px 25px 30px;
color: #fff;
display: inline-flex;
position: absolute;
bottom: 100px;
right: 0px;
}
.login-form h1 span {
font-family: poppins-medium;
font-size: 26px;
color: #000;
display: block;
line-height: 40px;
}
.login-form h1 {
font-family: poppins-bold;
color: #324ee1;
font-size: 42px;
position: relative;
padding: 35px 0px 60px 0px;
}
.login-form h1:after {
content: "";
bottom: 0px;
right: 27px;
height: 50px;
width: 50px;
border-radius: 50px;
border: 10px solid #ffc000;
position: absolute;
}
.login-banner {
flex-grow: 1;
flex-basis: 0;
}
.login-banner img {
height: 100%;
width: 100%;
object-fit: cover;
}
form.material-form {
position: relative;
z-index: 1;
}
.material-form .form-group {
margin-bottom: 50px;
}
.material-form label {
color: rgba(0, 0, 0, 0.7);
font-size: 18px;
margin-bottom: 5px;
font-family: avenir-roman;
opacity: 0.5;
}
.material-form a.btn-send-message {
white-space: nowrap;
}
.material-form #errorHandling {
display: none;
}
.material-form .form-group i {
position: absolute;
left: 15px;
top: 45px;
color: rgba(0, 0, 0, 0.60);
font-size: 20px;
}
.material-form .form-group p {
font-family: ubuntu-regular;
font-size: 18px;
opacity: 0.6;
}
.material-form input,
.material-form textarea {
margin: 0px 0px 10px 0px;
width: 100%;
display: block;
border: none;
padding: 10px 0 10px 35px;
border-bottom: solid 1px rgba(0, 0, 0, 0.15);
-webkit-transition: all 0.3s cubic-bezier(0.64, 0.09, 0.08, 1);
transition: all 0.3s cubic-bezier(0.64, 0.09, 0.08, 1);
background: -webkit-linear-gradient(top, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, 0) calc(100% - 2px), #324ee1 calc(100% - 2px), #324ee1 100%);
background: linear-gradient(to bottom, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, 0) calc(100% - 2px), #324ee1 calc(100% - 2px), #324ee1 100%);
background-position: 0 0;
background-size: 0px 100%;
background-repeat: no-repeat;
color: rgba(0, 0, 0, 0.95);
font-size: 20px;
resize: none;
font-family: poppins-regular;
}
/* .material-form input:focus,
.material-form input:valid,
.material-form textarea:focus,
.material-form textarea:valid { */
.material-form input:focus,
.material-form textarea:focus {
box-shadow: none;
outline: none;
background-size: 100% 100%;
border-bottom: solid 1px #324ee1;
}
a.link-forgot-password {
font-family: avenir-roman;
font-size: 19px;
color: rgba(0, 0, 0, 0.55);
margin: 10px 0px;
display: block;
}
a.link-forgot-password:hover {
color: rgba(0, 0, 0, 0.75);
}
.btn-login {
margin-top: 35px;
transition: all 0.3s;
font-size: 20px;
}
.btn-login:hover {
color: #fff;
background-color: #3149c9;
margin-top: 32px;
transition: all 0.3s;
}
.btn-login:hover:after {
bottom: -1px;
opacity: 0.85;
}
.btn-login:hover i {
animation: 1s iconbounce forwards;
transition: 0.5s;
}
<form action="login.php" id="login" name="login" method="post" class="material-form py-sm-0">
<div class="row">
<div class="col-12">
<div class="form-group">
<label for="email">email</label>
<i class="far fa-envelope-open"></i>
<input type="text" id="email" name="email" aria-describedby="errorHandling" placeholder="companysupport#gmail.com">
</div>
</div>
<div class="col-12">
<div class="form-group">
<label for="password">password</label>
<i class="fa fa-key"></i>
<input type="password" id="password" name="password" aria-describedby="errorHandling" placeholder="**********">
</div>
</div>
<div class="col-12">
Forgot your password?
</div>
<div class="col-12">
<button type="submit" class="btn-style-1 btn-lg btn-login">login <i class="fas fa-arrow-right ml-3"></i></button>
</div>
</div>
</form>
You should use the following code to support all browsers:
Example:
.input-email::-webkit-input-placeholder {
font-style: italic;
font-size: 12px;
font-weight: 600;
color: #9b9b9b;
}
/* WebKit, Blink, Edge */
.input-email:-moz-placeholder {
font-style: italic;
font-size: 12px;
font-weight: 600;
color: #9b9b9b;
}
/* Mozilla Firefox 4 to 18 */
.input-email::-moz-placeholder {
font-style: italic;
font-size: 12px;
font-weight: 600;
color: #9b9b9b;
}
/* Mozilla Firefox 19+ */
.input-email:-ms-input-placeholder {
font-style: italic;
font-size: 12px;
font-weight: 600;
color: #9b9b9b;
}
/* Internet Explorer 10-11 */
.input-email::-ms-input-placeholder {
font-style: italic;
font-size: 12px;
font-weight: 600;
color: #9b9b9b;
}
Remove this code
-webkit-transform: translateY(-20px);
transform: translateY(-20px);
from
.material-form input:focus::-webkit-input-placeholder,
.material-form input:valid::-webkit-input-placeholder,
.material-form textarea:focus::-webkit-input-placeholder,
.material-form textarea:valid::-webkit-input-placeholder {
color: #000;
font-size: 10px;
-webkit-transform: translateY(-20px);
transform: translateY(-20px);
visibility: visible !important;
}
/*LOGIN*/
.login-container{
display: flex;
width: 100%;
min-height: 100vh;
}
.login-form:before{
content: "";
position: absolute;
bottom: 0px;
right: 50px;
height: 800px;
width: 800px;
background: transparent;
border: 1px solid rgba(0, 0, 0, 0.05);
border-radius: 900px;
}
.login-form{
flex-basis: 575px;
flex-grow: 0;
position: relative;
background: linear-gradient(to top left, rgba(50, 78, 225, 0.20) 0%, rgba(255, 255, 255, 0.0) 100%);
background: -moz-linear-gradient(to top left, rgba(50, 78, 225, 0.20) 0%, rgba(255, 255, 255, 0.0) 100%);
background: -webkit-linear-gradient(to top left, rgba(50, 78, 225, 0.20) 0%, rgba(255, 255, 255, 0.0) 100%);
background: -ms-linear-gradient(to top left, rgba(50, 78, 225, 0.20) 0%, rgba(255, 255, 255, 0.0) 100%);
background: -o-linear-gradient(to top left, rgba(50, 78, 225, 0.20) 0%, rgba(255, 255, 255, 0.0) 100%);
padding: 75px;
}
.login-form:after{
content: "";
position: absolute;
bottom: 0px;
right: 130px;
height: 600px;
width: 600px;
background: transparent;
border: 1px solid rgba(0, 0, 0, 0.05);
border-radius: 600px;
}
.login-form .band-identity{
height: 85px;
width: 85px;
border-radius: 20px 35px 20px 35px;
background-color: #000;
display: inline-flex;
align-items: center;
justify-content: center;
border: 5px solid #fff;
}
.login-form .brand-heading{
flex-grow: 1;
flex-basis: 0;
}
.login-form h3.page-title{
font-family: poppins-regular;
font-size: 24px;
background-color: #000000;
border-radius: 100px;
padding: 12px 30px 17px 30px;
color: #fff;
display: inline-flex;
margin-right: -150px;
float: right;
letter-spacing: 1px;
}
.login-container h4.page-title{
font-family: poppins-regular;
font-size: 24px;
background-color: #000000;
border-radius: 100px 0px 0px 100px;
padding: 20px 30px 25px 30px;
color: #fff;
display: inline-flex;
position: absolute;
bottom: 100px;
right: 0px;
}
.login-form h1 span{
font-family: poppins-medium;
font-size: 26px;
color: #000;
display: block;
line-height: 40px;
}
.login-form h1{
font-family: poppins-bold;
color: #324ee1;
font-size: 42px;
position: relative;
padding: 35px 0px 60px 0px;
}
.login-form h1:after{
content: "";
bottom: 0px;
right: 27px;
height: 50px;
width: 50px;
border-radius: 50px;
border: 10px solid #ffc000;
position: absolute;
}
.login-banner{
flex-grow: 1;
flex-basis: 0;
}
.login-banner img{
height: 100%;
width: 100%;
object-fit: cover;
}
form.material-form{
position: relative;
z-index: 1;
}
.material-form .form-group{
margin-bottom: 50px;
}
.material-form label{
color: rgba(0,0,0,0.7);
font-size: 18px;
margin-bottom: 5px;
font-family: avenir-roman;
opacity: 0.5;
}
.material-form a.btn-send-message{
white-space: nowrap;
}
.material-form #errorHandling{
display: none;
}
.material-form .form-group i {
position: absolute;
left: 15px;
top: 45px;
color: rgba(0, 0, 0, 0.60);
font-size: 20px;
}
.material-form .form-group p {
font-family: ubuntu-regular;
font-size: 18px;
opacity: 0.6;
}
.material-form input,
.material-form textarea {
margin: 0px 0px 10px 0px;
width: 100%;
display: block;
border: none;
padding: 10px 0 10px 35px;
border-bottom: solid 1px rgba(0, 0, 0, 0.15);
-webkit-transition: all 0.3s cubic-bezier(0.64, 0.09, 0.08, 1);
transition: all 0.3s cubic-bezier(0.64, 0.09, 0.08, 1);
background: -webkit-linear-gradient(top, rgba(255,255,255,0) 0%, rgba(255,255,255,0) calc(100% - 2px), #324ee1 calc(100% - 2px), #324ee1 100%);
background: linear-gradient(to bottom, rgba(255,255,255,0) 0%, rgba(255,255,255,0) calc(100% - 2px), #324ee1 calc(100% - 2px), #324ee1 100%);
background-position: 0 0;
background-size: 0px 100%;
background-repeat: no-repeat;
color: rgba(0, 0, 0, 0.95);
font-size: 20px;
resize: none;
font-family: poppins-regular;
}
/* .material-form input:focus,
.material-form input:valid,
.material-form textarea:focus,
.material-form textarea:valid { */
.material-form input:focus,
.material-form textarea:focus{
box-shadow: none;
outline: none;
background-size: 100% 100%;
border-bottom: solid 1px #324ee1;
}
.material-form input::-webkit-input-placeholder,
.material-form textarea::-webkit-input-placeholder {
font-family: 'roboto', sans-serif;
-webkit-transition: all 0.3s ease-in-out;
transition: all 0.3s ease-in-out;
font-size: 10px;
}
.material-form input:focus::-webkit-input-placeholder,
.material-form input:valid::-webkit-input-placeholder,
.material-form textarea:focus::-webkit-input-placeholder,
.material-form textarea:valid::-webkit-input-placeholder {
color: #000;
font-size: 10px;
visibility: visible !important;
}
a.link-forgot-password {
font-family: avenir-roman;
font-size: 19px;
color: rgba(0, 0, 0, 0.55);
margin: 10px 0px;
display: block;
}
a.link-forgot-password:hover {
color: rgba(0, 0, 0, 0.75);
}
.btn-login{
margin-top: 35px;
transition: all 0.3s;
font-size: 20px;
}
.btn-login:hover{
color: #fff;
background-color: #3149c9;
margin-top: 32px;
transition: all 0.3s;
}
.btn-login:hover:after{
bottom: -1px;
opacity: 0.85;
}
.btn-login:hover i{
animation: 1s iconbounce forwards;
transition: 0.5s;
}
<form action="login.php" id="login" name="login" method="post" class="material-form py-sm-0">
<div class="row">
<div class="col-12">
<div class="form-group">
<label for="email">email</label>
<i class="far fa-envelope-open"></i>
<input type="text" id="email" name="email" aria-describedby="errorHandling" placeholder="companysupport#gmail.com" >
</div>
</div>
<div class="col-12">
<div class="form-group">
<label for="password">password</label>
<i class="fa fa-key"></i>
<input type="password" id="password" name="password" aria-describedby="errorHandling" placeholder="**********" >
</div>
</div>
<div class="col-12">
Forgot your password?
</div>
<div class="col-12">
<button type="submit" class="btn-style-1 btn-lg btn-login">login <i class="fas fa-arrow-right ml-3"></i></button>
</div>
</div>
</form>

How change the shape of div corners?

I am trying to achieve this shape of div to hold profile information.
So far I've curved one of the corners. However, I am having problems parallel lines.
My HTML:
<div class="profile-card">
<h1>Sector Specialist</h1>
<p>Frank ocean</p>
</div>
My CSS:
.profile-card{
margin-top:150px;
float:right;
background-color: rgba(0,0,0,0.4);
height:500px;
text-align:center;
padding: 50px 40px;
border: 2px solid red;
border-top-left-radius: 39px;
}
The codepen is https://codepen.io/anon/pen/wjMQmw
Thank you in advance.
I would consider a solution with pseudo-element with some skew transformation:
.profile-card {
background: rgba(0, 0, 0, 0.4);
width: 200px;
text-align: center;
padding: 50px 0 0 40px;
border-top-left-radius: 39px;
border-left: 1px solid red;
border-top: 1px solid red;
position: relative;
}
.profile-card:before {
content: "";
position: absolute;
right: -40px;
width: 40px;
top: 0;
bottom: 0;
background: rgba(0, 0, 0, 0.4);
transform: skewY(45deg);
transform-origin: top left;
border-top: 1px solid red;
border-right: 1px solid red;
box-sizing:border-box;
}
.profile-card:after {
content: "";
position: absolute;
bottom: -40px;
height: 40px;
right: 0;
left: 0;
background: rgba(0, 0, 0, 0.4);
transform: skewX(45deg);
border-left: 1px solid red;
border-bottom: 1px solid red;
transform-origin: top left;
box-sizing:border-box;
}
body {
background:linear-gradient(to right,lightblue,pink)
}
<div class="profile-card">
<h1>Sector Specialist</h1>
<p>Frank ocean</p>
</div>
Without the border I would consider multiple gradient to achieve the layout:
.profile-card {
background:
linear-gradient(to bottom left,rgba(0, 0, 0, 0.4) 50%,transparent 51%)0 100%/50px 50px no-repeat,
linear-gradient(to top right,rgba(0, 0, 0, 0.4) 50%,transparent 51%)100% 0/50px 50px no-repeat,
linear-gradient(rgba(0, 0, 0, 0.4),rgba(0, 0, 0, 0.4))100% 100%/calc(100% - 50px) 50px no-repeat,
linear-gradient(rgba(0, 0, 0, 0.4),rgba(0, 0, 0, 0.4))0 0/calc(100% - 50px) 50px no-repeat,
linear-gradient(rgba(0, 0, 0, 0.4),rgba(0, 0, 0, 0.4))0 50px/100% calc(100% - 100px) no-repeat;
width: 200px;
text-align: center;
padding: 50px 40px;
border-top-left-radius: 39px;
}
<div class="profile-card">
<h1>Sector Specialist</h1>
<p>Frank ocean</p>
</div>
Or the clip-path solution:
.profile-card {
background:rgba(0, 0, 0, 0.4);
width: 200px;
text-align: center;
padding: 50px 40px;
border-top-left-radius: 39px;
-webkit-clip-path: polygon(1% 0%, 75% 1%, 100% 30%, 100% 100%, 21% 100%, 0% 74%);
clip-path: polygon(1% 0%, 75% 1%, 100% 30%, 100% 100%, 21% 100%, 0% 74%)
}
<div class="profile-card">
<h1>Sector Specialist</h1>
<p>Frank ocean</p>
</div>
For super complex bordering, one option is to use SVG. Here is an example of basic usage of polygon. SVG embedded into HTML can be styled using CSS easily:
body{
margin:0;
height: 500px;
background: url('https://cdn3.tropicalsky.co.uk/images/1280x720/downtown-dubai-aerial-view.jpg');
}
.profile-card{
margin-top:5px;
background-color: transparent;
height:800px;
width: 200px;
text-align:center;
padding: 50px 40px;
position: relative;
}
.profile-card h1, .profile-card p {
position: relative;
}
.frame {
position: absolute;
top: 20px;
left: 20px;
opacity: 0.7;
}
<div class="profile-card">
<svg class="frame" height="300" width="300">
<polygon points="50 0,250 0,300 50,300 300, 50 300, 0 250, 0 50,7.5 25, 15 15, 25 7.5" style="fill:lightgrey;stroke:orange;stroke-width:1" />
</svg>
<h1>Sector Specialist</h1>
<p>Frank ocean</p>
</div>

How to change the background of a parent DIV based on the checked state of an INPUT

I'm using checkboxes based on Brad Bodine's examples here. I'm thrilled with the abilities his examples gave me, but I do have one question.
I'm using slideThree (see the CSS below). It works like a charm, but I would like to change the background color of the parent DIV based on the position of the slider. I thought that maybe one of the two examples below would do it:
.slideThree input[type=checkbox]:checked { background: green; }
.slideThree input[type=checkbox]:checked + div { background: green; }
But neither one worked. Is it possible to change the background based on the selected state of the INPUT?
HTML
<div class="slideThree">
<input type="checkbox" value="None" id="test" name="check" checked />
<label for="test"></label>
</div>
CSS
/* .slideThree */
.slideThree {
width: 80px;
height: 26px;
background: #333;
margin: 20px auto;
position: relative;
border-radius: 50px;
box-shadow: inset 0px 1px 1px rgba(0, 0, 0, 0.5), 0px 1px 0px rgba(255, 255, 255, 0.2);
}
.slideThree:after {
content: 'OFF';
color: #000;
position: absolute;
right: 10px;
z-index: 0;
font: 12px/26px Arial, sans-serif;
font-weight: bold;
text-shadow: 1px 1px 0px rgba(255, 255, 255, 0.15);
}
.slideThree:before {
content: 'ON';
color: #27ae60;
position: absolute;
left: 10px;
z-index: 0;
font: 12px/26px Arial, sans-serif;
font-weight: bold;
}
.slideThree label {
display: block;
width: 34px;
height: 20px;
cursor: pointer;
position: absolute;
top: 3px;
left: 3px;
z-index: 1;
background: #fcfff4;
background: -webkit-linear-gradient(top, #fcfff4 0%, #dfe5d7 40%, #b3bead 100%);
background: linear-gradient(to bottom, #fcfff4 0%, #dfe5d7 40%, #b3bead 100%);
border-radius: 50px;
-webkit-transition: all 0.4s ease;
transition: all 0.4s ease;
box-shadow: 0px 2px 5px 0px rgba(0, 0, 0, 0.3);
}
.slideThree input[type=checkbox] {
visibility: hidden;
}
.slideThree input[type=checkbox]:checked + label {
left: 43px;
}
/* end .slideThree */
My thanks to #LGSon. His solution was perfect. Here's the working modification to the HTML and addition to the CSS. I had to add the border and box-shadow elements because Firefox didn't like my pushing the SPAN behind everything, so the SPAN was coming up square, etc.
<div class="slideThree">
<input type="checkbox" value="None" id="test" name="check" checked />
<label for="test"></label>
<span></span>
</div>
And the CSS...
.slideThree span{
display: block;
position: absolute;
width: 50px;
height: 16px;
background: red;
z-index: 0;
top: 0px;
left: 0px;
border-radius: 8px;
box-shadow: inset 0px 1px 1px rgba(0, 0, 0, 0.5), 0px 1px 0px rgba(255, 255, 255, 0.2);
}
.slideThree input[type=checkbox]:checked ~ span { background: green; }

How to get Circle Hover Effects with CSS Transitions with img tag?

I want Circle Hover Effects with CSS Transitions on <img> tag without calling the image as background image.
I have created a JSFiddle of the effect I want. But in this fiddle, image is used as a background image. I want same effect, but with image in an img tag, not as background image.
.ch-item {
width: 100%;
height: 100%;
border-radius: 50%;
position: relative;
cursor: default;
box-shadow: inset 0 0 0 0 rgba(200, 95, 66, 0.4), inset 0 0 0 16px rgba(255, 255, 255, 0.6), 0 1px 2px rgba(0, 0, 0, 0.1);
-webkit-transition: all 0.4s ease-in-out;
-moz-transition: all 0.4s ease-in-out;
-o-transition: all 0.4s ease-in-out;
-ms-transition: all 0.4s ease-in-out;
transition: all 0.4s ease-in-out;
}
.ch-img-1 {
background-image: url(http://tympanus.net/Tutorials/CircleHoverEffects/images/5.jpg);
}
.ch-img-2 {
background-image: url(http://tympanus.net/Tutorials/CircleHoverEffects/images/5.jpg);
}
.ch-img-3 {
background-image: url(http://tympanus.net/Tutorials/CircleHoverEffects/images/5.jpg);
}
.ch-info {
position: absolute;
width: 100%;
height: 100%;
border-radius: 50%;
opacity: 0;
-webkit-transition: all 0.4s ease-in-out;
-moz-transition: all 0.4s ease-in-out;
-o-transition: all 0.4s ease-in-out;
-ms-transition: all 0.4s ease-in-out;
transition: all 0.4s ease-in-out;
-webkit-transform: scale(0);
-moz-transform: scale(0);
-o-transform: scale(0);
-ms-transform: scale(0);
transform: scale(0);
-webkit-backface-visibility: hidden;
}
.ch-info h3 {
color: #fff;
text-transform: uppercase;
position: relative;
letter-spacing: 2px;
font-size: 22px;
margin: 0 30px;
padding: 65px 0 0 0;
height: 110px;
font-family: 'Open Sans', Arial, sans-serif;
text-shadow: 0 0 1px #fff, 0 1px 2px rgba(0, 0, 0, 0.3);
}
.ch-info p {
color: #fff;
padding: 10px 5px;
font-style: italic;
margin: 0 30px;
font-size: 12px;
border-top: 1px solid rgba(255, 255, 255, 0.5);
}
.ch-info p a {
display: block;
color: #fff;
color: rgba(255, 255, 255, 0.7);
font-style: normal;
font-weight: 700;
text-transform: uppercase;
font-size: 9px;
letter-spacing: 1px;
padding-top: 4px;
font-family: 'Open Sans', Arial, sans-serif;
}
.ch-info p a:hover {
color: #fff222;
color: rgba(255, 242, 34, 0.8);
}
.ch-item:hover {
box-shadow: inset 0 0 0 110px rgba(200, 95, 66, 0.4), inset 0 0 0 16px rgba(255, 255, 255, 0.8), 0 1px 2px rgba(0, 0, 0, 0.1);
}
.ch-item:hover .ch-info {
opacity: 1;
-webkit-transform: scale(1);
-moz-transform: scale(1);
-o-transform: scale(1);
-ms-transform: scale(1);
transform: scale(1);
}
#import url('normalize.css');
/* General Demo Style */
body {
font-family: Cambria, Georgia, serif;
background: #f9f9f9 url(../images/bg.jpg);
font-weight: 300;
font-size: 15px;
color: #333;
-webkit-font-smoothing: antialiased;
overflow-y: scroll;
overflow-x: hidden;
}
a {
color: #555;
text-decoration: none;
}
.container {
width: 100%;
position: relative;
}
.clr {
clear: both;
padding: 0;
height: 0;
margin: 0;
}
.main {
width: 90%;
margin: 0 auto;
position: relative;
}
.container > header {
margin: 10px;
padding: 20px 10px 10px 10px;
position: relative;
display: block;
text-shadow: 1px 1px 1px rgba(0, 0, 0, 0.2);
text-align: center;
}
.container > header h1 {
font-size: 32px;
line-height: 32px;
margin: 0;
position: relative;
font-weight: 300;
color: #777;
text-shadow: 1px 1px 1px rgba(255, 255, 255, 0.7);
}
.container > header h2 {
font-size: 14px;
font-weight: 300;
font-style: italic;
margin: 0;
padding: 15px 0 5px 0;
color: #888;
text-shadow: 1px 1px 1px rgba(255, 255, 255, 0.9);
}
/* Header Style */
.codrops-top {
line-height: 24px;
font-size: 11px;
background: #fff;
background: rgba(255, 255, 255, 0.6);
text-transform: uppercase;
z-index: 9999;
position: relative;
box-shadow: 1px 0px 2px rgba(0, 0, 0, 0.1);
}
.codrops-top a {
padding: 0px 10px;
letter-spacing: 1px;
color: #333;
display: inline-block;
}
.codrops-top a:hover {
background: rgba(255, 255, 255, 0.3);
}
.codrops-top span.right {
float: right;
}
.codrops-top span.right a {
float: left;
display: block;
}
/* Demo Buttons Style */
.codrops-demos {
text-align: center;
display: block;
line-height: 30px;
padding: 5px 0px;
}
.codrops-demos a {
display: inline-block;
font-style: italic;
margin: 0px 4px;
padding: 0px 6px;
color: #aaa;
line-height: 20px;
font-size: 13px;
text-shadow: 1px 1px 1px #fff;
border: 1px solid #fff;
background: #ffffff;
/* Old browsers */
background: -moz-linear-gradient(top, #ffffff 0%, #f6f6f6 47%, #ededed 100%);
/* FF3.6+ */
background: -webkit-gradient(linear, left top, left bottom, color-stop(0%, #ffffff), color-stop(47%, #f6f6f6), color-stop(100%, #ededed));
/* Chrome,Safari4+ */
background: -webkit-linear-gradient(top, #ffffff 0%, #f6f6f6 47%, #ededed 100%);
/* Chrome10+,Safari5.1+ */
background: -o-linear-gradient(top, #ffffff 0%, #f6f6f6 47%, #ededed 100%);
/* Opera 11.10+ */
background: -ms-linear-gradient(top, #ffffff 0%, #f6f6f6 47%, #ededed 100%);
/* IE10+ */
background: linear-gradient(top, #ffffff 0%, #f6f6f6 47%, #ededed 100%);
/* W3C */
filter: progid: DXImageTransform.Microsoft.gradient(startColorstr='#ffffff', endColorstr='#ededed', GradientType=0);
/* IE6-9 */
box-shadow: 0 1px 1px rgba(0, 0, 0, 0.1);
}
.codrops-demos a:hover {
color: #333;
background: #fff;
}
.codrops-demos a:active {
background: #fff;
}
.codrops-demos a.current-demo,
.codrops-demos a.current-demo:hover {
background: #f0f0f0;
border-color: #d9d9d9;
color: #aaa;
box-shadow: 0 1px 1px rgba(255, 255, 255, 0.7);
filter: progid: DXImageTransform.Microsoft.gradient(startColorstr='#f6f6f6', endColorstr='#f6f6f6', GradientType=0);
/* IE6-9 */
}
.support-note span {
color: #ac375d;
font-size: 16px;
display: none;
font-weight: bold;
text-align: center;
padding: 5px 0;
}
.no-cssanimations .support-note span.no-cssanimations,
.no-csstransforms .support-note span.no-csstransforms,
.no-csstransforms3d .support-note span.no-csstransforms3d,
.no-csstransitions .support-note span.no-csstransitions {
display: block;
}
.ch-grid {
margin: 20px 0 0 0;
padding: 0;
list-style: none;
display: block;
text-align: center;
width: 100%;
}
.ch-grid:after,
.ch-item:before {
content: '';
display: table;
}
.ch-grid:after {
clear: both;
}
.ch-grid li {
width: 220px;
height: 220px;
display: inline-block;
margin: 20px;
}
<section class="main">
<ul class="ch-grid">
<li>
<div class="ch-item ch-img-1">
<div class="ch-info">
<h3>Brainiac</h3>
<p>by Daniel Nyari View on Dribbble
</p>
</div>
</div>
</li>
<li>
<div class="ch-item ch-img-2">
<div class="ch-info">
<h3>Vision</h3>
<p>by Daniel Nyari View on Dribbble
</p>
</div>
</div>
</li>
<li>
<div class="ch-item ch-img-3">
<div class="ch-info">
<h3>Cylon</h3>
<p>by Daniel Nyari View on Dribbble
</p>
</div>
</div>
</li>
</ul>
</section>
I've edited your fiddle here: http://jsfiddle.net/pedwf80h/7/
Essentially I've moved the img url from the background to within the li element. Then positioned the img absolutely and used z-index to move it to the back. The li element then uses overflow: hidden and border-radius: 100% to hide any of the image that goes outside of our li element.
Hope this helps!
Try this may be this can help for you:
.ch-item {
width: 100%;
height: 100%;
border-radius: 50%;
position: relative;
cursor: default;
box-shadow: inset 0 0 0 0 rgba(200, 95, 66, 0.4), inset 0 0 0 16px rgba(255, 255, 255, 0.6), 0 1px 2px rgba(0, 0, 0, 0.1);
-webkit-transition: all 0.4s ease-in-out;
-moz-transition: all 0.4s ease-in-out;
-o-transition: all 0.4s ease-in-out;
-ms-transition: all 0.4s ease-in-out;
transition: all 0.4s ease-in-out;
z-index: 2;
}
.ch-info {
position: absolute;
width: 100%;
height: 100%;
border-radius: 50%;
opacity: 0;
-webkit-transition: all 0.4s ease-in-out;
-moz-transition: all 0.4s ease-in-out;
-o-transition: all 0.4s ease-in-out;
-ms-transition: all 0.4s ease-in-out;
transition: all 0.4s ease-in-out;
-webkit-transform: scale(0);
-moz-transform: scale(0);
-o-transform: scale(0);
-ms-transform: scale(0);
transform: scale(0);
-webkit-backface-visibility: hidden;
}
li {
position: relative;
overflow: hidden;
border-radius: 100%;
}
li img {
position: absolute;
top: 0;
left: 0;
z-index: 1;
}
.ch-item:hover {
box-shadow: inset 0 0 0 110px rgba(200, 95, 66, 0.4), inset 0 0 0 16px rgba(255, 255, 255, 0.8), 0 1px 2px rgba(0, 0, 0, 0.1);
}
.ch-item:hover .ch-info {
opacity: 1;
-webkit-transform: scale(1);
-moz-transform: scale(1);
-o-transform: scale(1);
-ms-transform: scale(1);
transform: scale(1);
}
#import url('normalize.css');
/* General Demo Style */
body{
font-family: Cambria, Georgia, serif;
background: #f9f9f9 url(../images/bg.jpg);
font-weight: 300;
font-size: 15px;
color: #333;
-webkit-font-smoothing: antialiased;
overflow-y: scroll;
overflow-x: hidden;
}
a{
color: #555;
text-decoration: none;
}
.container{
width: 100%;
position: relative;
}
.clr{
clear: both;
padding: 0;
height: 0;
margin: 0;
}
.main{
width: 90%;
margin: 0 auto;
position: relative;
}
.container > header{
margin: 10px;
padding: 20px 10px 10px 10px;
position: relative;
display: block;
text-shadow: 1px 1px 1px rgba(0,0,0,0.2);
text-align: center;
}
.container > header h1{
font-size: 32px;
line-height: 32px;
margin: 0;
position: relative;
font-weight: 300;
color: #777;
text-shadow: 1px 1px 1px rgba(255,255,255,0.7);
}
.container > header h2{
font-size: 14px;
font-weight: 300;
font-style: italic;
margin: 0;
padding: 15px 0 5px 0;
color: #888;
text-shadow: 1px 1px 1px rgba(255,255,255,0.9);
}
/* Header Style */
.codrops-top{
line-height: 24px;
font-size: 11px;
background: #fff;
background: rgba(255, 255, 255, 0.6);
text-transform: uppercase;
z-index: 9999;
position: relative;
box-shadow: 1px 0px 2px rgba(0,0,0,0.1);
}
.codrops-top a{
padding: 0px 10px;
letter-spacing: 1px;
color: #333;
display: inline-block;
}
.codrops-top a:hover{
background: rgba(255,255,255,0.3);
}
.codrops-top span.right{
float: right;
}
.codrops-top span.right a{
float: left;
display: block;
}
/* Demo Buttons Style */
.codrops-demos{
text-align:center;
display: block;
line-height: 30px;
padding: 5px 0px;
}
.codrops-demos a{
display: inline-block;
font-style: italic;
margin: 0px 4px;
padding: 0px 6px;
color: #aaa;
line-height: 20px;
font-size: 13px;
text-shadow: 1px 1px 1px #fff;
border: 1px solid #fff;
background: #ffffff; /* Old browsers */
background: -moz-linear-gradient(top, #ffffff 0%, #f6f6f6 47%, #ededed 100%); /* FF3.6+ */
background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#ffffff), color-stop(47%,#f6f6f6), color-stop(100%,#ededed)); /* Chrome,Safari4+ */
background: -webkit-linear-gradient(top, #ffffff 0%,#f6f6f6 47%,#ededed 100%); /* Chrome10+,Safari5.1+ */
background: -o-linear-gradient(top, #ffffff 0%,#f6f6f6 47%,#ededed 100%); /* Opera 11.10+ */
background: -ms-linear-gradient(top, #ffffff 0%,#f6f6f6 47%,#ededed 100%); /* IE10+ */
background: linear-gradient(top, #ffffff 0%,#f6f6f6 47%,#ededed 100%); /* W3C */
filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#ffffff', endColorstr='#ededed',GradientType=0 ); /* IE6-9 */
box-shadow: 0 1px 1px rgba(0, 0, 0, 0.1);
}
.codrops-demos a:hover{
color: #333;
background: #fff;
}
.codrops-demos a:active{
background: #fff;
}
.codrops-demos a.current-demo,
.codrops-demos a.current-demo:hover{
background: #f0f0f0;
border-color: #d9d9d9;
color: #aaa;
box-shadow: 0 1px 1px rgba(255,255,255,0.7);
filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#f6f6f6', endColorstr='#f6f6f6',GradientType=0 ); /* IE6-9 */
}
.support-note span{
color: #ac375d;
font-size: 16px;
display: none;
font-weight: bold;
text-align: center;
padding: 5px 0;
}
.no-cssanimations .support-note span.no-cssanimations,
.no-csstransforms .support-note span.no-csstransforms,
.no-csstransforms3d .support-note span.no-csstransforms3d,
.no-csstransitions .support-note span.no-csstransitions{
display: block;
}
.ch-grid {
margin: 20px 0 0 0;
padding: 0;
list-style: none;
display: block;
text-align: center;
width: 100%;
}
.ch-grid:after,
.ch-item:before {
content: '';
display: table;
}
.ch-grid:after {
clear: both;
}
.ch-grid li {
width: 220px;
height: 220px;
display: inline-block;
margin: 20px;
}
<section class="main">
<ul class="ch-grid">
<li>
<img src="http://tympanus.net/Tutorials/CircleHoverEffects/images/5.jpg" alt="Vision">
<div class="ch-item">
<div class="ch-info">
</div>
</div>
</li>
</ul>
</section>
Additional reference website...
Reference link
#import url(http://fonts.googleapis.com/css?family=Cabin:700);
body {
padding-top: 2em;
background-color: #c02227;
}
.circle-container {
position: relative;
perspective: 1000;
margin: 0 auto;
}
.circle-container:hover .circle {
transform: rotate3d(45, 45, 0, 180deg);
}
.circle-container:hover .outer-ring {
transform: rotate3d(45, 0, 0, 180deg);
}
.circle-container:hover .outer-outer-ring {
transform: rotate3d(0, 45, 0, 180deg);
}
.circle-container, .front, .back {
width: 175px;
height: 175px;
background-color: rgba(0,0,0,0);
}
.circle, .outer-ring, .outer-outer-ring {
transition: 0.5s;
transform-style: preserve-3d;
transition-timing-function: cubic-bezier(0.785, 0.135, 0.150, 0.860);
}
.circle {
position: relative;
width: 175px;
height: 175px;
}
.front, .back {
border-radius: 50%;
box-shadow: 0px 0px 20px rgba(0,0,0,0.4);
backface-visibility: hidden;
position: absolute;
top: 0;
left: 0;
}
.front {
background-color: #fff;
z-index: 2;
}
.front p {
margin-top: 1.2em;
font-family: cabin, sans-serif;
font-weight: 700;
font-size: 3em;
text-align: center;
color: #c02227;
}
.back {
transform: rotate3d(45,45,0,180deg);
background-color: #fff;
}
.back-logo {
width: 60%;
display: block;
margin: 2em auto;
}
.outer-ring {
position: absolute;
top: -10px;
left: -10px;
border-radius: 50%;
border: 2px solid #fff;
width: 191px;
height: 191px;
background-color: rgba(255,255,255,0);
box-shadow: 0px 0px 20px rgba(0,0,0,0.4);
}
.outer-outer-ring {
position: absolute;
top: -20px;
left: -20px;
border-radius: 50%;
border: 2px solid #fff;
width: 211px;
height: 211px;
background-color: rgba(255,255,255,0);
box-shadow: 0px 0px 20px rgba(0,0,0,0.4);
}

Unwanted Space next to main content on website

So next to the main content (outside of the browser width) if you scroll to the left of the page there is extra space occupied by only the background of the Body CSS background. Here's the site in action http://test.crows-perch.com/.
#charset "utf-8";
/* CSS Document */
body {
z-index: 0;
background: url(../images/background-texture%20d.jpg);
width: 100%;
}
#page {
z-index: 1;
width: 1000px;
height: 1000px;
margin-left: auto;
margin-right: auto;
}
#Footer {
width: 100%;
height: 230px;
position: absolute;
left: 0px;
}
#TopLinks {
z-index: 1;
position: absolute;
top: 0px;
left: 0px;
width: 100%;
margin: 0;
height: 37px;
border-style: solid;
border-width: 1px;
border-color: #000000;
background: url(../images/background-texture-b.jpg);
}
#Links {
position: relative;
top: 5px;
left: 329px;
text-align: center;
}
#Links a {
text-decoration: none;
color: #7F7F7F;
font-family: Verdana, Tahoma, Geneva, sans-serif;
font-size: 13px;
}
#Links a:hover {
text-decoration: none;
color: #FFFFFF;
}
#HeaderContainer {
z-index: 3;
position: absolute;
top: 28px;
left: 0px;
width: 100%;
height: 65px;
margin: 0;
background: url(../images/tri-button%20texture%20b.jpg);
border-style: solid;
border-width: 1px;
border-color: #7F7F7F;
}
#title {
z-index: 4;
position: relative;
width: 252px;
height: 70px;
margin: 0 auto;
top: -10px;
right: 383px;
}
#Home {
z-index: 4;
position: relative;
width: 96px;
height: 65px;
margin: 0 auto;
right: 204px;
top: -70px;
background: url(../images/button%20texture%20b.jpg);
border-style: solid;
border-width: 1px;
border-color: #7F7F7F;
border-top: none;
border-bottom: none;
text-align: center;
}
#Home:hover {
width: 96px;
background: url(../images/button%20overlay%20b.png) no-repeat center, url(../images/button%20texture%20b.jpg) no-repeat top left;
background-size: cover;
}
#HomeT {
text-decoration: none;
font-family: "Cinzel Regular";
font-size: 18px;
letter-spacing: 1px;
color: #D2C300;
line-height: 65px;
vertical-align: middle;
}
a.Home {
text-decoration: none;
height: 65px;
}
#Guides {
z-index: 4;
position: relative;
margin: 0 auto;
top: -135px;
right: 89px;
width: 133px;
height: 65px;
background: url(../images/button%20texture%20b.jpg);
border-style: solid;
border-width: 1px;
border-color: #7F7F7F;
border-top: none;
border-bottom: none;
text-align: center;
}
#Guides:hover {
width: 133px;
background: url(../images/button%20overlay%20b.png) no-repeat center, url(../images/button%20texture%20b.jpg) no-repeat top left;
background-size: cover;
}
#GuidesT {
text-decoration: none;
font-family: "Cinzel Regular";
font-size: 18px;
letter-spacing: 1px;
color: #D2C300;
line-height: 65px;
vertical-align: middle;
}
a.Guides {
text-decoration: none;
}
#Forum {
z-index: 4;
position: relative;
margin: 0 auto;
top: -200px;
left: 33px;
width: 114px;
height: 65px;
background: url(../images/button%20texture%20b.jpg);
border-style: solid;
border-width: 1px;
border-color: #7F7F7F;
border-top: none;
border-bottom: none;
text-align: center;
}
#Forum:hover {
width: 114px;
background: url(../images/button%20overlay%20b.png) no-repeat center, url(../images/button%20texture%20b.jpg) no-repeat top left;
background-size: cover;
}
#ForumT {
text-decoration: none;
font-family: "Cinzel Regular";
font-size: 18px;
letter-spacing: 1px;
color: #D2C300;
line-height: 65px;
vertical-align: middle;
}
a.Forum {
text-decoration: none;
}
#Blog {
z-index: 4;
position: relative;
margin: 0 auto;
top: -265px;
left: 141px;
width: 102px;
height: 65px;
background: url(../images/button%20texture%20b.jpg);
border-style: solid;
border-width: 1px;
border-color: #7F7F7F;
border-top: none;
border-bottom: none;
text-align: center;
}
#Blog:hover {
width: 102px;
background: url(../images/button%20overlay%20b.png) no-repeat center, url(../images/button%20texture%20b.jpg) no-repeat top left;
background-size: cover;
}
#BlogT {
text-decoration: none;
font-family: "Cinzel Regular";
font-size: 18px;
letter-spacing: 1px;
color: #D2C300;
line-height: 65px;
vertical-align: middle;
}
a.Blog {
text-decoration: none;
}
#Guilds {
z-index: 4;
position: relative;
margin: 0 auto;
top: -330px;
left: 262px;
width: 138px;
height: 65px;
background: url(../images/button%20texture%20b.jpg);
border-style: solid;
border-width: 1px;
border-color: #7F7F7F;
border-top: none;
border-bottom: none;
text-align: center;
}
#Guilds:hover {
width: 138px;
background: url(../images/button%20overlay%20b.png) no-repeat center, url(../images/button%20texture%20b.jpg) no-repeat top left;
background-size: cover;
}
#GuildsT {
text-decoration: none;
font-family: "Cinzel Regular";
font-size: 18px;
letter-spacing: 1px;
color: #D2C300;
line-height: 65px;
vertical-align: middle;
}
a.Guilds {
text-decoration: none;
}
#Play {
z-index: 4;
position: relative;
margin: 0 auto;
width: 168px;
height: 65px;
top: -395px;
left: 415px;
background: url(../images/button%20texture%20bright.jpg);
background-size: cover;
border-style: solid;
border-width: 1px;
border-color: #7F7F7F;
border-top: none;
border-bottom: none;
text-align: center;
}
#Play:hover {
width: 168px;
background: url(../images/button%20overlay%20c.png) no-repeat center, url(../images/button%20texture%20bright.jpg) no-repeat top left;
background-size: cover;
}
#PlayT {
text-decoration: none;
font-family: "Cinzel Bold";
font-size: 18px;
font-weight: bold;
color: #000000;
line-height: 64px;
vertical-align: middle;
}
a.Play {
text-decoration: none;
}
#Top-Gradient {
z-index: 6;
position: absolute;
top: 95px;
left: 0px;
width: 100%;
height: 25px;
margin: 0;
background: url(../images/gradient.png) repeat-x;
}
#PictureContainer-top {
z-index: 5;
position: absolute;
top: 95px;
left: -2px;
width: 100%;
height: 423px;
margin: 0;
background: url(../images/fire%20bg%20art.jpg) center no-repeat;
background-size: 100%;
}
#G1 {
z-index: 6;
width: 1037px;
height: 19px;
left: -19px;
top: 194px;
background: -webkit-gradient(linear, center top, center bottom, from(rgba(0, 0, 0, 0)), color-stop(100%, #000000));
background: -webkit-linear-gradient(top, rgba(0, 0, 0, 0), #000000 100%);
background: -o-linear-gradient(top, rgba(0, 0, 0, 0), #000000 100%);
background: linear-gradient(to bottom, rgba(0, 0, 0, 0), #000000 100%);
filter: alpha(opacity=50) progid:DXImageTransform.Microsoft.gradient(startColorstr=#00000000, endColorstr=#FF000000, GradientType=0);
-ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=50) progid:DXImageTransform.Microsoft.gradient(startColorstr='#00000000', endColorstr='#FF000000', GradientType=0)";
border-color: #000000;
opacity: 0.5;
position: relative;
}
#ContentTop {
z-index: 6;
position: relative;
margin: 0 auto;
background: url(../images/tri-button%20texture.jpg) repeat-x center top;
width: 1037px;
height: 49px;
left: -19px;
top: 173px;
-webkit-box-shadow: 0px 0px 17px -1px #000000;
box-shadow: 0px 0px 17px #000000;
border-width: 1px;
border-style: solid;
border-color: #000000;
}
#SwordL {
margin-bottom: 17px;
margin-left: 9px;
}
#TeamUp {
z-index: 6;
position: relative;
margin: 0 auto;
top: -23px;
left: 96px
}
#SwordR {
margin-bottom: 15px;
margin-left: -9px;
}
#G2 {
z-index: 6;
width: 1039px;
height: 19px;
top: -60px;
background: -webkit-gradient(linear, center top, center bottom, from(rgba(0, 0, 0, 0)), color-stop(100%, #000000));
background: -webkit-linear-gradient(top, rgba(0, 0, 0, 0), #000000 100%);
background: -o-linear-gradient(top, rgba(0, 0, 0, 0), #000000 100%);
background: linear-gradient(to bottom, rgba(0, 0, 0, 0), #000000 100%);
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr=#00000000, endColorstr=#FF000000, GradientType=0);
-ms-filter: "progid:DXImageTransform.Microsoft.gradient(startColorstr='#00000000', endColorstr='#FF000000', GradientType=0)";
border-color: #000000;
position: relative;
margin: 0 auto;
}
#ContentAfterTop {
z-index: 9;
width: 1011px;
height: 35px;
top: -60px;
position: relative;
margin: 0 auto;
webkit-box-shadow: 6px 6px 43px -1px #000000;
box-shadow: 6px 6px 43px #000000;
border-width: 1px;
border-style: solid;
border-color: #000000;
position: relative;
background: url(../images/tri-button%20texture.jpg) repeat left top;
}
#G3 {
z-index: 5;
width: 267px;
height: 19px;
position: relative;
margin: 0 auto;
left: -633px;
top: 120px;
background: -webkit-gradient(linear, center top, center bottom, from(rgba(0, 0, 0, 0)), color-stop(100%, #000000));
background: -webkit-linear-gradient(top, rgba(0, 0, 0, 0), #000000 100%);
background: -o-linear-gradient(top, rgba(0, 0, 0, 0), #000000 100%);
background: linear-gradient(to bottom, rgba(0, 0, 0, 0), #000000 100%);
filter: alpha(opacity=50) progid:DXImageTransform.Microsoft.gradient(startColorstr=#00000000, endColorstr=#FF000000, GradientType=0);
-ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=50) progid:DXImageTransform.Microsoft.gradient(startColorstr='#00000000', endColorstr='#FF000000', GradientType=0)";
border-color: #000000;
opacity: 0.5;
-webkit-transform: matrix(0, -1, 1, 0, 124, 143);
-ms-transform: matrix(0, -1, 1, 0, 124, 143);
-o-transform: matrix(0, -1, 1, 0, 124, 143);
transform: matrix(0, -1, 1, 0, 124, 143);
}
#G3-2 {
z-index: 5;
width: 269px;
height: 19px;
margin-top: 400px;
left: 730px;
background: -webkit-gradient(linear, center top, center bottom, from(rgba(0, 0, 0, 0)), color-stop(100%, #000000));
background: -webkit-linear-gradient(top, rgba(0, 0, 0, 0), #000000 100%);
background: -o-linear-gradient(top, rgba(0, 0, 0, 0), #000000 100%);
background: linear-gradient(to bottom, rgba(0, 0, 0, 0), #000000 100%);
filter: alpha(opacity=50) progid:DXImageTransform.Microsoft.gradient(startColorstr=#00000000, endColorstr=#FF000000, GradientType=0);
-ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=50) progid:DXImageTransform.Microsoft.gradient(startColorstr='#00000000', endColorstr='#FF000000', GradientType=0)";
border-color: #000000;
opacity: 0.5;
-webkit-transform: matrix(0, 1, -1, 0, 144, -125);
-ms-transform: matrix(0, 1, -1, 0, 144, -125);
-o-transform: matrix(0, 1, -1, 0, 144, -125);
transform: matrix(0, 1, -1, 0, 144, -125);
position: relative;
}
#AfterPicBreak {
z-index: 6;
height: 240px;
border-color: #000000;
background: url(../images/bg%20texture%20top.jpg) repeat-x left top;
position: absolute;
margin: 0 auto;
top: 485px;
left: 0px;
width: 100%;
}
#G4 {
z-index: 5;
height: 92px;
width: 100%;
position: absolute;
left: 0px;
top: 430px;
background: -webkit-gradient(linear, center top, center bottom, from(rgba(0, 0, 0, 0)), color-stop(100%, #000000));
background: -webkit-linear-gradient(top, rgba(0, 0, 0, 0), #000000 100%);
background: -o-linear-gradient(top, rgba(0, 0, 0, 0), #000000 100%);
background: linear-gradient(to bottom, rgba(0, 0, 0, 0), #000000 100%);
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr=#00000000, endColorstr=#FF000000, GradientType=0);
-ms-filter: "progid:DXImageTransform.Microsoft.gradient(startColorstr='#00000000', endColorstr='#FF000000', GradientType=0)";
border-color: #000000;
}
#G5 {
z-index: 6;
width: 999px;
height: 19px;
position: relative;
margin: 0 auto;
right: 999px;
top: -247px;
background: -webkit-gradient(linear, center top, center bottom, from(rgba(0, 0, 0, 0)), color-stop(100%, #000000));
background: -webkit-linear-gradient(top, rgba(0, 0, 0, 0), #000000 100%);
background: -o-linear-gradient(top, rgba(0, 0, 0, 0), #000000 100%);
background: linear-gradient(to bottom, rgba(0, 0, 0, 0), #000000 100%);
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr=#00000000, endColorstr=#FF000000, GradientType=0);
-ms-filter: "progid:DXImageTransform.Microsoft.gradient(startColorstr='#00000000', endColorstr='#FF000000', GradientType=0)";
border-color: #000000;
-webkit-transform: matrix(-1, 0, 0, -1, 999, 19);
-ms-transform: matrix(-1, 0, 0, -1, 999, 19);
-o-transform: matrix(-1, 0, 0, -1, 999, 19);
transform: matrix(-1, 0, 0, -1, 999, 19);
}
#ContentBreak {
z-index: 5;
background: url(../images/break%20-%20large.jpg) repeat-x left top;
position: relative;
left: 0px;
top: -260px;
width: 999px;
height: 61px;
}
#Content {
z-index: 7;
background: url(../images/content%20bg.jpg) repeat left top;
position: relative;
top: -268px;
left: 0px;
width: 999px;
height: 88px;
padding-bottom: 700px;
}
#G6 {
z-index: 8;
position: relative;
margin: 0 auto;
top: -1078px;
left: -997px;
width: 996px;
height: 19px;
background: -webkit-gradient(linear, center top, center bottom, from(rgba(0, 0, 0, 0)), color-stop(100%, #000000));
background: -webkit-linear-gradient(top, rgba(0, 0, 0, 0), #000000 100%);
background: -o-linear-gradient(top, rgba(0, 0, 0, 0), #000000 100%);
background: linear-gradient(to bottom, rgba(0, 0, 0, 0), #000000 100%);
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr=#00000000, endColorstr=#FF000000, GradientType=0);
-ms-filter: "progid:DXImageTransform.Microsoft.gradient(startColorstr='#00000000', endColorstr='#FF000000', GradientType=0)";
border-color: #000000;
-webkit-transform: matrix(-1, 0, 0, -1, 996, 19);
-ms-transform: matrix(-1, 0, 0, -1, 996, 19);
-o-transform: matrix(-1, 0, 0, -1, 996, 19);
transform: matrix(-1, 0, 0, -1, 996, 19);
}
#LinkText {
z-index: 7;
position: relative;
top: -1040px;
text-align: center;
width: 100%;
}
#LinkText a {
font-size: 23px;
color: #D2C300;
font-family: "Cinzel Regular";
font-weight: 700;
font-size: 23px;
text-decoration: none;
}
#ContentSmallBreak {
z-index: 7;
background: url(../images/small%20break.jpg) repeat-x left top;
width: 999px;
height: 34px;
position: relative;
margin: 0 auto;
top: -1010px;
}
#BottomG {
z-index: 6;
background: url(../images/bg%20texture%20bottom.jpg) repeat-x center bottom;
width: 100%;
height: 247px;
position: relative;
top: -140px;
left: 0px;
}
#G7 {
z-index: 10;
height: 19px;
width: 100%;
position: relative;
left: 0px;
top: -156px;
background: -webkit-gradient(linear, center top, center bottom, from(rgba(0, 0, 0, 0)), color-stop(100%, #000000));
background: -webkit-linear-gradient(top, rgba(0, 0, 0, 0), #000000 100%);
background: -o-linear-gradient(top, rgba(0, 0, 0, 0), #000000 100%);
background: linear-gradient(to bottom, rgba(0, 0, 0, 0), #000000 100%);
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr=#00000000, endColorstr=#FF000000, GradientType=0);
-ms-filter: "progid:DXImageTransform.Microsoft.gradient(startColorstr='#00000000', endColorstr='#FF000000', GradientType=0)";
border-color: #000000;
}
#FooterBreak {
z-index: 8;
background: url(../images/break%20-%20large.jpg) repeat-x left top;
height: 54px;
position: relative;
left: 0px;
top: -158px;
width: 100%;
}
#FooterBG {
z-index: 6;
background: url(../images/parchment.jpg) repeat-x;
width: 100%;
height: 149px;
position: relative;
left: 0px;
top: -158px;
}
#FooterBreak2 {
z-index: 12;
background: url(../images/FooterBreak.jpg);
width: 100%;
height: 11px;
position: relative;
left: 0px;
top: -158px;
}
#font-face {
font-family: 'Cinzel Regular';
src: url('../fonts/cinzel-regular-webfont.eot');
src: url('../fonts/cinzel-regular-webfont.woff') format('woff'), url('../fonts/cinzel-regular-webfont.svg') format('svg');
font-weight: 400;
font-style: normal;
}
#font-face {
font-family: 'Cinzel Bold';
src: url('../fonts/cinzel-regular-bold.eot');
src: url('../fonts/cinzel-regular-bold.woff') format('woff'), url('../fonts/cinzel-regular-bold.svg') format('svg');
font-weight: 400;
font-style: normal;
}
The main reason for this is the div with the ID Links. By default, is has a 100% width. Then you push it to the right by 329px (using left: 329px). These 329px are the amount of unwanted space you get.
Instead, you’ll probably want to do something like this:
#Links {
position: relative;
top: 5px;
text-align: right;
width: 1011px;
margin: 0 auto;
}
You’ll then still have two additional pixels. These are caused by the borders of #TopLinks and #HeaderContainer. You can fix this by either setting box-sizing: border-box or by getting rid of the 100% width and setting right: 0 instead.
I don't see any space to the left of the content, the space to the right is caused by the way you position elements: if you shift block elements to the right setting left property, they keep their width and need some space outside of the screen. You need to either set the width manually or change their display property toinline-block (start with #Links, you'll see what I'm talking about).