i was wondering if I can change the "fa fa-cube" so the background is not transparent. I want to use it on top of a playingcard-background and as you can see below, it doesn't look that great like this...
The best would be a white or light-blue fill.
Maybe i can put another cube behind it? But i am really a beginner.
.deck {
border: 2px dashed #080808;
width: 160px;
height: 120px;
}
.deck .card {
justify-content: space-around;
font-size: 50px;
color: #0023F5;
display: flex;
flex-direction: column;
position: relative;
text-align: center;
transform-origin: center;
border-radius: 15px;
border: 5px solid black;
height: 116px;
background-color: #e5e5f7;
opacity: 0.8;
background-image: linear-gradient(135deg, #F74141 25%, transparent 25%), linear-gradient(225deg, #F74141 25%, transparent 25%), linear-gradient(45deg, #F74141 25%, transparent 25%), linear-gradient(315deg, #F74141 25%, #e5e5f7 25%);
background-position: 10px 0, 10px 0, 0 0, 0 0;
background-size: 10px 10px;
background-repeat: repeat;
}
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css">
<div class="deck">
<div class="card">
<i class="drawing fa fa-cube"></i>
</div>
</div>
PS: i tried aria-hidden="true" but didn't really know what this does.
Probably not the most elegant solution but it works. Basically, I layered in copies of the icon (as filler) and used a couple of different clip-paths to render the white background where the transparent parts are, then put everything in a container and used z-index to push the white parts behind the actual blue icon so the background fillers wouldn't overlap the actual blue icon. You can use the container for positioning etc.
.deck {
border: 2px dashed #080808;
width: 160px;
height: 120px;
}
.deck .card {
justify-content: space-around;
font-size: 50px;
color: #0023F5;
display: flex;
flex-direction: column;
position: relative;
text-align: center;
transform-origin: center;
border-radius: 15px;
border: 5px solid black;
height: 116px;
background-color: #e5e5f7;
opacity: 0.8;
background-image: linear-gradient(135deg, #F74141 25%, transparent 25%), linear-gradient(225deg, #F74141 25%, transparent 25%), linear-gradient(45deg, #F74141 25%, transparent 25%), linear-gradient(315deg, #F74141 25%, #e5e5f7 25%);
background-position: 10px 0, 10px 0, 0 0, 0 0;
background-size: 10px 10px;
background-repeat: repeat;
}
.faContainer {
display: flex;
flex-direction: column;
padding: 0;
margin: 0 auto;
position: relative;
}
.fa-cube {
z-index: 1;
}
.fa-cubeBGTop {
position: absolute;
z-index: 0;
background-color: white;
clip-path: polygon(7% 28%, 47% 14%, 86% 29%, 46% 44%);
}
.fa-cubeBGSide {
position: absolute;
z-index: 0;
background-color: white;
clip-path: polygon(43% 50%, 85% 30%, 90% 78%, 38% 95%);
}
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css">
<div class="deck">
<div class="card">
<div class="faContainer">
<i class="drawing fa fa-cube"></i>
<i class="fa fa-cube fa-cubeBGTop"></i>
<i class="fa fa-cube fa-cubeBGSide"></i>
</div>
</div>
</div>
Related
So, I'm trying to fade out an image that has border-radius: 50% but I can't seem to get it down.
<section id="main">
<h1>Non-Important-Text</h1>
<h4>
it's all fun and games until you can't find a damn solution....
</h4>
<div id="img-container">
<img src="./assets/1.jpg" />
</div>
</section>
/* ... */
#main #img-container {
border-radius: 50%;
display: inline-block;
position: relative;
}
#main #img-container img {
width: 30em;
border-radius: 50%;
display: block;
border: 1px solid white;
}
#main #img-container img::after {
content: "";
display: block;
background: radial-gradient(
ellipse at center,
rgba(255, 255, 255, 0) 0%,
rgba(255, 255, 255, 1) 100%
); /* This doesn't work! */
border-radius: 50%;
position: absolute;
top: 0;
left: 0;
right: 0;
bottom: 0;
}
My Image, is circle, and does have a border. But it doensn't get faded out( in a circular way). How can I achieve that
Goal:
What I Get:
I tried everything from, radial-gradient, -webkit-gradient, to even, -webkit-radial-gradient. But they all produce the same result!
you need to use mask-image
div{
background: skyblue;
padding: 20px;
}
img{
-webkit-mask-image: radial-gradient(circle at center, rgba(0,0,0,1) 0, rgba(0,0,0,0) 70%);
mask-image: radial-gradient(circle at center, rgba(0,0,0,1) 0, rgba(0,0,0,0) 70%);
display: block;
margin: 0 auto
}
<div><img src='data:image/jpeg;base64,/9j/4AAQSkZJRgABAQAAAQABAAD/2wCEAAoHCBUVFRgREhUSGBgYGBgYGBIYGBgYGBgYGBgZG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want the "social media" header and icons to wrap onto the second row of the footer but for some reason whenever I set the "container" class to flex-wrap: wrapeverything in the footer becomes aligned vertically down the screen.
.container {
position: relative;
bottom: 0;
width: 100%;
display: flex;
flex-direction: row;
justify-content: space-evenly;
align-items: baseline;
background: black;
text-decoration: none;
color: white;
}
.items {
background: transparent;
order: 5;
flex: 1 auto;
color: white;
padding: 40px 0;
width: 100%;
height: auto;
text-align: center;
font-family: Arial, sans-serif;
font-size: 15px;
text-decoration: none;
text-transform: uppercase;
}
.items a {
text-decoration: none;
color: #a2a4a7;
}
.items a:hover {
cursor: pointer;
color: white;
}
#footer-headings {
font-family: 'Cabin Condensed', sans-serif;
font-size: 20px;
padding: 10px;
}
.fa-facebook {
background: #3B5998;
color: white;
font-size: 20px;
width: 50px;
padding: 15px;
margin: 5px 2px;
border-radius: 50%;
}
.fa-twitter {
background: #55ACEE;
color: white;
font-size: 20px;
width: 50px;
padding: 15px;
margin: 5px 2px;
border-radius: 50%;
}
.fa-instagram {
background: radial-gradient(circle farthest-corner at 35% 90%, #fec564, transparent 50%), radial-gradient(circle farthest-corner at 0 140%, #fec564, transparent 50%), radial-gradient(ellipse farthest-corner at 0 -25%, #5258cf, transparent 50%), radial-gradient(ellipse farthest-corner at 20% -50%, #5258cf, transparent 50%), radial-gradient(ellipse farthest-corner at 100% 0, #893dc2, transparent 50%), radial-gradient(ellipse farthest-corner at 60% -20%, #893dc2, transparent 50%), radial-gradient(ellipse farthest-corner at 100% 100%, #d9317a, transparent), linear-gradient(#6559ca, #bc318f 30%, #e33f5f 50%, #f77638 70%, #fec66d 100%);
color: white;
font-size: 20px;
width: 50px;
padding: 15px;
margin: 5px 2px;
border-radius: 50%;
}
#media only screen and (max-width: 650px) {
.fa-instagram {
background: radial-gradient(circle farthest-corner at 35% 90%, #fec564, transparent 50%), radial-gradient(circle farthest-corner at 0 140%, #fec564, transparent 50%), radial-gradient(ellipse farthest-corner at 0 -25%, #5258cf, transparent 50%), radial-gradient(ellipse farthest-corner at 20% -50%, #5258cf, transparent 50%), radial-gradient(ellipse farthest-corner at 100% 0, #893dc2, transparent 50%), radial-gradient(ellipse farthest-corner at 60% -20%, #893dc2, transparent 50%), radial-gradient(ellipse farthest-corner at 100% 100%, #d9317a, transparent), linear-gradient(#6559ca, #bc318f 30%, #e33f5f 50%, #f77638 70%, #fec66d 100%);
color: white;
font-size: 20px;
width: 50px;
padding: 15px;
margin: 5px 2px;
border-radius: 50%;
}
.fa-twitter {
background: #55ACEE;
color: white;
font-size: 10px;
width: 50px;
padding: 15px;
margin: 5px 2px;
border-radius: 50%;
}
.fa-facebook {
background: #3B5998;
color: white;
font-size: 10px;
width: 50px;
padding: 15px;
margin: 5px 2px;
border-radius: 50%;
}
}
.underline {
display: inline;
position: relative;
overflow: hidden;
}
.underline:after {
content: "";
position: absolute;
z-index: 1;
left: 0;
right: 100%;
bottom: -5px;
background: white;
height: 2.5px;
transition-property: left right;
transition-duration: 0.3s;
transition-timing-function: ease-out;
}
.underline:hover:after,
.underline:focus:after,
.underline:active:after {
right: 0;
}
#media only screen and (max-width: 650px) {
.items {
font-size: 10px;
}
#footer-headings {
font-size: 10px;
}
}
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css">
<div class="container">
<div class="items">
<p id="footer-headings">Useful Links</p><br>
<p>Find a Store</p><br>
<p>Sign Up For Email</p><br>
<p>Become A Member</p><br>
<p>Site Feedback</p>
</div>
<!-- <div class="vertical-right-1" style="left: 25%; height: 90%; margin: 10px auto; padding: 20px 0; ">
</div> -->
<div class="items" style="text-decoration: none; color: white;">
<strong>
<p id="footer-headings">About The
League</p><br>
</strong>
<p>About Us</p><br>
<p>Careers</p><br>
<p>News</p><br>
<p>Sustainability</p>
</div>
<!-- <div class="vertical-right-1" style="left: 50%; height: 90%; margin: 10px auto; padding: 20px 0; ">
</div> -->
<div class="items" style="text-decoration: none; color: white;">
<p id="footer-headings">
<strong>Policies</strong></p><br>
<p>Terms of service</p><br>
<p>Refund</p><br>
<p>Privacy</p><br>
<p>Shipping</p>
</div>
<!-- <div class="vertical-right-1" style="left: 75%; height: 90%; margin: 10px auto; ">
</div> -->
<div class="items" style="text-decoration: none; color: white;">
<p id="footer-headings">Need To Talk?</p><br>
<p>Order Status</p><br>
<p>Returns</p><br>
<p>Payment Options</p><br>
<p>Contact Us</p><br>
</div>
<div class="items wrap">
<h3 id="footer-headings">Follow Us!</h3><br>
</div>
</div>
Any help with getting the "Follow Us" and the social icons belew it to wrap onto the next row and remain horizontal and ideally centered would be greatly appreciated.
you should use flex-wrap:wrap inside the container, but also remove width:100% from items.
.container {
position: relative;
bottom: 0;
width: 100%;
display: flex;
flex-direction: row;
flex-wrap: wrap;
justify-content: space-evenly;
align-items: baseline;
background: black;
text-decoration: none;
color: white;
}
.full {
/* flex-grow: -1; */
}
.items {
background: transparent;
order: 5;
flex: 1 auto;
color: white;
padding: 40px 0;
/* width: 100%; */
height: auto;
text-align: center;
font-family: Arial, sans-serif;
font-size: 15px;
text-decoration: none;
text-transform: uppercase;
}
.items a {
text-decoration: none;
color: #a2a4a7;
}
.items a:hover {
cursor: pointer;
color: white;
}
#footer-headings {
font-family: 'Cabin Condensed', sans-serif;
font-size: 20px;
padding: 10px;
}
.fa-facebook {
background: #3B5998;
color: white;
font-size: 20px;
width: 50px;
padding: 15px;
margin: 5px 2px;
border-radius: 50%;
}
.fa-twitter {
background: #55ACEE;
color: white;
font-size: 20px;
width: 50px;
padding: 15px;
margin: 5px 2px;
border-radius: 50%;
}
.fa-instagram {
background: radial-gradient(circle farthest-corner at 35% 90%, #fec564, transparent 50%), radial-gradient(circle farthest-corner at 0 140%, #fec564, transparent 50%), radial-gradient(ellipse farthest-corner at 0 -25%, #5258cf, transparent 50%), radial-gradient(ellipse farthest-corner at 20% -50%, #5258cf, transparent 50%), radial-gradient(ellipse farthest-corner at 100% 0, #893dc2, transparent 50%), radial-gradient(ellipse farthest-corner at 60% -20%, #893dc2, transparent 50%), radial-gradient(ellipse farthest-corner at 100% 100%, #d9317a, transparent), linear-gradient(#6559ca, #bc318f 30%, #e33f5f 50%, #f77638 70%, #fec66d 100%);
color: white;
font-size: 20px;
width: 50px;
padding: 15px;
margin: 5px 2px;
border-radius: 50%;
}
#media only screen and (max-width: 650px) {
.fa-instagram {
background: radial-gradient(circle farthest-corner at 35% 90%, #fec564, transparent 50%), radial-gradient(circle farthest-corner at 0 140%, #fec564, transparent 50%), radial-gradient(ellipse farthest-corner at 0 -25%, #5258cf, transparent 50%), radial-gradient(ellipse farthest-corner at 20% -50%, #5258cf, transparent 50%), radial-gradient(ellipse farthest-corner at 100% 0, #893dc2, transparent 50%), radial-gradient(ellipse farthest-corner at 60% -20%, #893dc2, transparent 50%), radial-gradient(ellipse farthest-corner at 100% 100%, #d9317a, transparent), linear-gradient(#6559ca, #bc318f 30%, #e33f5f 50%, #f77638 70%, #fec66d 100%);
color: white;
font-size: 20px;
width: 50px;
padding: 15px;
margin: 5px 2px;
border-radius: 50%;
}
.fa-twitter {
background: #55ACEE;
color: white;
font-size: 10px;
width: 50px;
padding: 15px;
margin: 5px 2px;
border-radius: 50%;
}
.fa-facebook {
background: #3B5998;
color: white;
font-size: 10px;
width: 50px;
padding: 15px;
margin: 5px 2px;
border-radius: 50%;
}
}
.underline {
display: inline;
position: relative;
overflow: hidden;
}
.underline:after {
content: "";
position: absolute;
z-index: 1;
left: 0;
right: 100%;
bottom: -5px;
background: white;
height: 2.5px;
transition-property: left right;
transition-duration: 0.3s;
transition-timing-function: ease-out;
}
.underline:hover:after,
.underline:focus:after,
.underline:active:after {
right: 0;
}
#media only screen and (max-width: 650px) {
.items {
font-size: 10px;
}
#footer-headings {
font-size: 10px;
}
}
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css">
<div class="container">
<div class="items">
<p id="footer-headings">Useful Links</p><br>
<p>Find a Store</p><br>
<p>Sign Up For Email</p><br>
<p>Become A Member</p><br>
<p>Site Feedback</p>
</div>
<!-- <div class="vertical-right-1" style="left: 25%; height: 90%; margin: 10px auto; padding: 20px 0; ">
</div> -->
<div class="items" style="text-decoration: none; color: white;">
<strong>
<p id="footer-headings">About The
League</p><br>
</strong>
<p>About Us</p><br>
<p>Careers</p><br>
<p>News</p><br>
<p>Sustainability</p>
</div>
<!-- <div class="vertical-right-1" style="left: 50%; height: 90%; margin: 10px auto; padding: 20px 0; ">
</div> -->
<div class="items" style="text-decoration: none; color: white;">
<p id="footer-headings">
<strong>Policies</strong></p><br>
<p>Terms of service</p><br>
<p>Refund</p><br>
<p>Privacy</p><br>
<p>Shipping</p>
</div>
<!-- <div class="vertical-right-1" style="left: 75%; height: 90%; margin: 10px auto; ">
</div> -->
<div class="items" style="text-decoration: none; color: white;">
<p id="footer-headings">Need To Talk?</p><br>
<p>Order Status</p><br>
<p>Returns</p><br>
<p>Payment Options</p><br>
<p>Contact Us</p><br>
</div>
<div class="items wrap full">
<h3 id="footer-headings">Follow Us!</h3><br>
</div>
</div>
I wanted to add a certain font awesome icon (fa-arrow-alt-circle-down), but it's not showing. I copied the classes from the website and entered them in my HTML. I tried other icons before and there was no issue with them. Sometimes I change .far to .fa, but now that doesn't work either. Can someone see why?
<div class="jumbotron jumbotron-fluid">
<h1 class="heading-primary heading-primary--main"> Wizard's unite fans</h1>
<div class="navigation-container">
<button class="find-locals-nav-btn">Find Local players</button>
<button class="forum-nav-btn">Forum</button>
<button>login / register</button>
</div>
<i class="far fa-arrow-alt-circle-down"></i>
</div>
SCSS file
.jumbotron {
height: 100vh;
background-image: linear-gradient(
rgba(0, 0, 0, 0.5),
rgba(0, 0, 0, 0.5)
), url("https://i.amz.mshcdn.com/-7R3bLC1xTVhrjc86pBeYAogXFY=/950x534/filters:quality(90)/https%3A%2F%2Fblueprint-api-production.s3.amazonaws.com%2Fuploads%2Fcard%2Fimage%2F760683%2F2117d274-d2cf-46b9-b60c-698d65361438.jpg");
background-size: cover;
position: relative;
padding: 5rem;
margin-bottom: 2rem;
-webkit-clip-path: polygon(0 0, 100% 0, 100% 85vh, 0 100%);
clip-path: polygon(0 0, 100% 0, 100% 85%, 0 100%);
text-align: center;
display: flex;
align-items: center;
justify-content: center;
.heading-primary {
opacity: .8;
}
#include respond(phone) {
-webkit-clip-path: polygon(0 0, 100% 0, 100% 90vh, 0 100%);
clip-path: polygon(0 0, 100% 0, 100% 90vh, 0 100%);
background-position: center top;
}
.navigation-container {
border-radius: 20px;
background-color: #fff;
font-size: 2rem;
width: 70%;
margin: 4rem auto 0 auto;
display: flex;
text-align: center;
justify-content: center;
padding: 1rem;
background-image: linear-gradient(to bottom right, #ccc, #666);
> * {
background-color: transparent;
border: none;
flex: 1 0 0;
cursor: pointer;
color: #fff;
text-transform: uppercase;
letter-spacing: 1px;
&:hover {
transform: translateY(-.2rem);
}
&:not(:last-child) {
border-right: 1px solid #444;
}
}
}
.fa-arrow-alt-circle-down {
font-size: 4rem;
color: #fff;
}
}
.fa Font Awesome are v4. .far are v5.
For all icons existing in both, changing far to fa will do the trick. For the ones added in v5, obviously, it won't, as they do not exist in v4.
You can view all v4.7 icons here.
For future notice, finding version specific FA icons is by searching for "font awesome x.x cheatsheet". Replace x.x with the proper version.
I don't know if this is duplicated or not, but I searched but couldn't find anything.
I'm trying to do a div with a half circle in the middle of the top border like the picture bellow:
Th black square is a div (intended to be a modal) and in the middle the border is cut with a circle. The red part is the page background (can be anything... images, text...).
How can I do this in html/css? I'm trying to avoid images to do this!!
Thank you
You can try this...
body{
background-color:#333;
passing:0px;
height:0px;
}
#app{
background:#333 url('https://source.unsplash.com/random') no-repeat;
background-size:cover;
width:360px;
height:560px;
position:relative;
overflow:hidden;
}
.app-bar{
width:100%;
height:50px;
position:absolute;
bottom:0px;
left:0;
}
.app-bar .bar{
line-height:50px;
position:relative;
width:100%;
height:50px;
background-image: radial-gradient(circle 35px at 315px 0, transparent 700px, #f44336 50px);
}
.app-bar .bar i{
color:#FFF;
display:block;
line-height:50px;
float:left;
width:50px;
text-align:center;
cursor:pointer;
margin-top:0px;
}
.app-bar .bar i:hover{
background-color:rgba(0,0,0,.1);
}
.app-bar .bar button{
padding:0px;
box-sizing:border;
text-align:center;
margin:0px;
bordeR:0px;
outline:0px;
width:60px;
height:60px;
line-height:60px;
cursor:pointer;
color:#FFFFFF;
display:block;
border-radius:50%;
position:absolute;
top:-30px;
left:100%;
margin-left:-75px;
background-color:#f44336;
transition: all .2s ease;
}
.app-bar .bar button span{
line-height:60px;
font-size:30px;
}
.app-bar .bar button:hover{
transform:rotate(45deg);
transition: all .2s ease;
}
<div id="app">
<div class="app-bar">
<div class="bar">
<i class="material-icons">menu</i>
<i class="material-icons">search</i>
<button class="button">
<span class="material-icons">add</span>
</button>
</div>
</div>
<link rel="stylesheet" type="text/css" href="https://cdnjs.cloudflare.com/ajax/libs/material-design-icons/3.0.1/iconfont/material-icons.min.css" >
One way of doing it:
* {margin: 0; padding: 0; box-sizing: border-box}
html, body {height: 100%}
body {
display: flex;
justify-content: center;
align-items: center;
background: #f00;
}
.black {
display: flex;
justify-content: center;
width: 200px;
height: 200px;
background: #000;
}
.white {
position: relative;
top: -25px;
width: 50px;
height: 50px;
border: 2px solid #f00;
border-radius: 50%;
background: #fff;
}
<div class="black">
<div class="white"></div>
</div>
And the "starter kit" solution you'd like to have:
* {margin: 0; padding: 0; box-sizing: border-box}
html, body {height: 100%}
body {
display: flex;
justify-content: center;
align-items: center;
background: linear-gradient(to bottom left, Navy, Tomato, Skyblue);
background-repeat: no-repeat;
background-attachment: fixed;
}
.outer {
display: flex;
flex-direction: column;
justify-content: space-evenly;
align-items: center;
width: 275px;
height: 550px;
background: linear-gradient(Navy 33.33%, Tomato 66.66%, Skyblue 100%);
box-shadow: 0 15px 15px #000;
}
.outer > span {color:#fff}
.outer > .inner {
display: flex;
flex-direction: column;
justify-content: space-evenly;
align-items: center;
position: relative;
padding-top: 20px;
width: 225px;
height: 275px;
border-radius: 5px;
background: #fff;
box-shadow: 0 10px 10px #000;
}
.outer > .inner > #user {
display: block;
position: absolute;
top: -35px;
width: 70px;
height: 70px;
border: 2px solid #fff;
border-radius: 50%;
background: Navy;
box-shadow: 0 0 0 10px Navy;
}
.outer > .inner > input[type=text],
.outer > .inner > #sign_in {
width: 80%;
padding: 5px;
}
.outer > .inner > #sign_in {
display: block;
padding: 10px 0;
color: #fff;
text-align: center;
text-decoration: none;
text-shadow: 1px 1px 1px #000;
background: Tomato;
box-shadow: 0 5px 5px #000;
}
<div class="outer">
<span>My Account</span>
<div class="inner">
<img src="http://www.ecovadis.com/wp-content/themes/ecovadis/images/Icon-user.png" alt="User" id="user">
<input type="text" placeholder="Username">
<input type="text" placeholder="Password">
Sign in
</div>
<span></span> <!-- just to make things easier -->
</div>
You can go on from here.
Thank you for all the help.
For my problem I found a solution in this post
here
and I adapted.
So for anyone that needs also the solution:
#wrapper {
width: 500px;
height:400px;
background: transparent;
border: 0;
/* Define half of half semi-cicle on the top for all */
background:
radial-gradient(circle at 0 100%, transparent 0, yellow 0) bottom left,
radial-gradient(circle at 100% 100%, transparent 0, yellow 0) bottom right,
radial-gradient(circle at 0 0, transparent 25%, yellow 15px) top right,
radial-gradient(circle at 100% 0, transparent 25%, yellow 15px) top left;
/*Define top half of half circle background for specific Safari 5.1- 6.0*/
background:
-webkit-radial-gradient(circle at 0 100%, transparent 0, yellow 0) bottom left,
-webkit-radial-gradient(circle at 100% 100%, transparent 0, yellow 0) bottom right,
-webkit-radial-gradient(circle at 0 0, transparent 25%, yellow 15px) top right,
-webkit-radial-gradient(circle at 100% 0, transparent 25%, yellow 15px) top left;
/*Define top half of half circle background for specific Opera 11.6-12.0*/
background:
-o-radial-gradient(circle at 0 100%, transparent 0, yellow 0) bottom left,
-o-radial-gradient(circle at 100% 100%, transparent 0, yellow 0) bottom right,
-o-radial-gradient(circle at 0 0, transparent 25%, yellow 15px) top right,
-o-radial-gradient(circle at 100% 0, transparent 25%, yellow 15px) top left;
/*Define top half of half circle background for specific Firefox 3.6-15*/
background:
-moz-radial-gradient(circle at 0 100%, transparent 0, yellow 0) bottom left,
-moz-radial-gradient(circle at 100% 100%, transparent 0, yellow 0) bottom right,
-moz-radial-gradient(circle at 0 0, transparent 25%, yellow 15px) top right,
-moz-radial-gradient(circle at 100% 0, transparent 25%, yellow 15px) top left;
/*repeat half of half circle*/
background-size: 51% 51%;
background-repeat: no-repeat;
border: 0;
-webkit-box-sizing: border-box;
-moz-box-sizing: border-box;
box-sizing: border-box;
}
#content{
padding-top: 25%;
word-wrap: break-word;
}
<div id="wrapper" class="half-circle">
<div id="content">asdasdasdasdasdasdasdasdasdasdasdasdasdasdsdasdasdasdasdasdasdasdasdasdasdasdasdasdassdasdadasasdasdasdasdasd</div>
</div>
I have problem when I tried to get this type of zigzag I tried a lot but unfortunately it didn't work.
I tried this way of coding
CSS
.zigzag:before {
content: "";
display: block;
position: absolute;
top: -10px;
width: 100%;
height: 10px;
}
.container2:before {
background:
linear-gradient(
45deg, transparent 33.333%,
#E2E2E2 33.333%, #E2E2E2 66.667%,
transparent 66.667%
),
linear-gradient(
-45deg, transparent 33.333%,
#E2E2E2 33.333%, #E2E2E2 66.667%,
transparent 66.667%
);
background-size: 20px 40px;
}
but i get like rectangle zigzag but what i need is like line not rectangle
i want like this
div{
height: 50px;
background:
linear-gradient(135deg, white 35%, transparent 25%) -25px 0,
linear-gradient(225deg, white 35%, transparent 25%) -25px 0,
linear-gradient(315deg, white 35%, transparent 25%),
linear-gradient(45deg, white 35%, transparent 25%);
background-size: 50px 50px;
background-color: black;
}
http://jsfiddle.net/4ay1uduz/
Simply change all 50px to your element's height, and change all 25px to half its height.
Take a look JsFiddle here. Hope this will help you.
HTML:
<div class="container4 zigzag"></div>
CSS:
.zigzag {
position: relative;
width: 100%;
height: 200px;
}
.zigzag:before {
content: "";
display: block;
position: absolute;
top: -10px;
width: 100%;
height: 10px;
}
.container4 {
background: #CCC;
}
.container4:before {
background:
linear-gradient(
45deg, transparent 33.333%,
#CCC 33.333%, #CCC 66.667%,
transparent 66.667%
),
linear-gradient(
-45deg, transparent 33.333%,
#CCC 33.333%, #CCC 66.667%,
transparent 66.667%
);
background-size: 20px 40px;
}
Html:
<div class="container1">
</div>
<div class="container2">
</div>
Css:
.container1 {
background: white;
}
.container1:after {
background: linear-gradient(-45deg, black 16px, transparent 0), linear-gradient(45deg, black 16px, transparent 0);
background-position: left-bottom;
background-repeat: repeat-x;
background-size: 32px 32px;
content: " ";
display: block;
bottom: 0px;
left: 0px;
width: 100%;
height: 32px;
}
.container2 {
margin-top: -27px;
}
.container2:after {
background: linear-gradient(-45deg, white 16px, transparent 0), linear-gradient(45deg, white 16px, transparent 0);
background-position: left-bottom;
background-repeat: repeat-x;
background-size: 32px 32px;
content: " ";
display: block;
bottom: 0px;
left: 0px;
width: 100%;
height: 32px;
}
Here is a fiddle.