Box with clipped corners - html

I need a box with all clipped corners. Here's what I have so far:
body {
height: 200px;
background: -webkit-linear-gradient(left, rgba(255, 0, 0, 0), rgba(255, 0, 0, 1));
background: -o-linear-gradient(right, rgba(255, 0, 0, 0), rgba(255, 0, 0, 1));
background: -moz-linear-gradient(right, rgba(255, 0, 0, 0), rgba(255, 0, 0, 1));
background: linear-gradient(to right, rgba(255, 0, 0, 0), rgba(255, 0, 0, 1));
}
#block {
width: 330px;
height: 200px;
margin-left: 20%;
background-color: #222;
-webkit-clip-path: polygon(4% 0, 96% 0, 100% 9%, 100% 90%, 96% 100%, 4% 100%, 0 90%, 0 10%);
clip-path: polygon(4% 0, 96% 0, 100% 9%, 100% 90%, 96% 100%, 4% 100%, 0 90%, 0 10%)
}
<div id="block"></div>
Unfortunately there is no Edge support and I can't use box-shadow. Is there another way to accomplish this?

Could we do something using overflow hidden and a rotated pseudo element?
.box{
width:100px;
height:100px;
position:relative;
overflow:hidden;
}
.box:after{
content: '';
width:120px;
height:120px;
position:absolute;
background:#465;
left:50%;
top:50%;
transform:translateX(-50%) translateY(-50%) rotateZ(45deg);
}
<div class="box"></div>

Related

CSS two layer gradient effect

I have CSS command
.overlay-menu {
top: 0px;
left: 0px;
width: 300px;
height: 300px;
background: radial-gradient(closest-side, #3f87a6, #ebf8e1, #f69d3c);}
but i have problem. How i can add layer for next layer?
My idea from this command add next layer where is:
background: linear-gradient(to bottom, rgba(0, 0, 0, 0) 0%, rgba(0, 0, 0, 1) 49%, rgba(0, 0, 0, 0) 100%);
I wanted circle with linear tranparency.
You can use two gradients together.
.overlay-menu {
top: 0px;
left: 0px;
width: 300px;
height: 300px;
background: linear-gradient(to bottom, #f69d3c, #f69d3c, transparent, #f69d3c, #f69d3c),
radial-gradient(closest-side, #3f87a6, #ebf8e1, #f69d3c);
}
<div class="overlay-menu"></div>
Yes it is solution, but i want replace orange color as transparency.
My solution i am adding:
.overlay-menu {
top: 0px;
left: 0px;
width: 300px;
height: 300px;
background: radial-gradient(closest-side, #3f87a6, #ebf8e1, #f69d3c);
-webkit-mask-image:
-webkit-gradient(linear, center bottom, center top,
color-stop(0, rgba(0, 0, 0, 0)),
color-stop(0.15, rgba(0, 0, 0, 0.6)),
color-stop(0.5, rgba(0, 0, 0, 0.8)),
color-stop(0.75, rgba(0, 0, 0, 0.6)),
color-stop(0.85, rgba(0, 0, 0, 0.5)),
color-stop(0.95, rgba(0, 0, 0, 0)));
}
<div class="overlay-menu"></div>

Align text to bottom in a button and in front of background

How can I align the text in the button to the bottom?
I tried to set line-height and vertical-align: bottom; in my CSS but neither worked.
UPDATE:
Also, I want the text to be in front of the background. I have set back gradients in the normal, hover and active states, so I my white text to be in front of that.
Code:
.img-panel {
position: relative;
height: 300px;
width: 100%;
background-size: cover;
color: white;
}
.img-panel:after {
content: "";
width: 100%;
height: 100%;
top: 0;
left: 0;
position: absolute;
background: -webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(0%, rgba(0, 0, 0, 0)), color-stop(40%, rgba(0, 0, 0, 0)), color-stop(100%, #000000));
background: -moz-linear-gradient(top, rgba(0, 0, 0, 0) 0%, rgba(0, 0, 0, 0) 40%, #000000 100%);
background: -webkit-linear-gradient(top, rgba(0, 0, 0, 0) 0%, rgba(0, 0, 0, 0) 40%, #000000 100%);
background: linear-gradient(to bottom, rgba(0, 0, 0, 0) 0%, rgba(0, 0, 0, 0) 40%, #000000 100%);
}
.img-panel:hover:after {
background: -webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(0%, rgba(0, 0, 0, 0.3)), color-stop(40%, rgba(0, 0, 0, 0.3)), color-stop(100%, #000000));
background: -moz-linear-gradient(top, rgba(0, 0, 0, 0.3) 0%, rgba(0, 0, 0, 0.3) 40%, #000000 100%);
background: -webkit-linear-gradient(top, rgba(0, 0, 0, 0.3) 0%, rgba(0, 0, 0, 0.3) 40%, #000000 100%);
background: linear-gradient(to bottom, rgba(0, 0, 0, 0.3) 0%, rgba(0, 0, 0, 0.3) 40%, #000000 100%);
}
.img-panel:active:after {
background: -webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(0%, rgba(0, 0, 0, 0.6)), color-stop(40%, rgba(0, 0, 0, 0.6)), color-stop(100%, #000000));
background: -moz-linear-gradient(top, rgba(0, 0, 0, 0.6) 0%, rgba(0, 0, 0, 0.6) 40%, #000000 100%);
background: -webkit-linear-gradient(top, rgba(0, 0, 0, 0.6) 0%, rgba(0, 0, 0, 0.6) 40%, #000000 100%);
background: linear-gradient(to bottom, rgba(0, 0, 0, 0.6) 0%, rgba(0, 0, 0, 0.6) 40%, #000000 100%);
}
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css" integrity="sha384-1q8mTJOASx8j1Au+a5WDVnPi2lkFfwwEAa8hDDdjZlpLegxhjVME1fgjWPGmkzs7" crossorigin="anonymous">
<div class="row">
<div class="col-md-4 img-panel-container">
<button class="img-panel translucent-overlay-light" style="background-image: url('http://placeimg.com/500/300/any')">
Hello
</button>
</div>
</div>
For some reason bootstrap is not working in the code snippet
You can create a child element in your button (here a span) that you position to the bottom of the button.
Because the button is position: relative, the span with position: absolute will be position according to the button.
We also create a child element to display the background, via the ::before pseudo-element selector.
To resolve which child will be display on top, between two position: absolute elements, the browser use the HTML/DOM order. So a ::before element will be displayed below the others, while a ::after will be displayed on top.
You also can force the stacking order with the z-index property.
.img-panel {
position: relative;
height: 300px;
width: 100%;
background-size: cover;
}
.img-panel::before {
content: '';
position: absolute;
top: 0; left: 0; right: 0; bottom: 0;
background: linear-gradient(to bottom, transparent 40%, black 100%);
}
.img-panel:hover::before {
background: linear-gradient(to bottom, rgba(0, 0, 0, 0.3) 40%, black 100%);
}
.img-panel > span {
position: absolute;
left: 0; right: 0; bottom: 0;
text-align: center;
color: white;
}
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css" integrity="sha384-1q8mTJOASx8j1Au+a5WDVnPi2lkFfwwEAa8hDDdjZlpLegxhjVME1fgjWPGmkzs7" crossorigin="anonymous">
<button class="img-panel translucent-overlay-light" style="background-image: url('http://placeimg.com/500/300/any')">
<span>Hello</span>
</button>
You could use vertical-align: bottom; but to do this you need to apply a display:table to the container and display:table-cell to the button and give him some specific height.
Take a look to this examples: http://daker.me/2014/04/4-css-tricks-for-vertical-alignment.html
Try adding this:
<style>
span{
position: absolute;
bottom: 0;
}
</style>
And in html markup add:
<span>Hello</span>
Try this
.img-panel {
display: flex;
flex-direction: column-reverse;
align-items: center;
}
If your button's height is 300px, you can try with a padding-top property :
CSS:
.img-panel {
position: relative;
height: 300px;
width: 100%;
background-size: cover;
color: white;
padding-top:250px;
}
Bootply : http://www.bootply.com/AHSl2MVDIy
Place your button text in a span, give it absolute positioning and set bottom to 0:
See the .img-panel span.button-title rule.
Update:
To place the text above the background, just add a higher z-index for the button text. A low number will do it.
.img-panel {
position: relative;
height: 300px;
width: 100%;
background-size: cover;
color: white;
}
.img-panel:after {
content: "";
width: 100%;
height: 100%;
top: 0;
left: 0;
position: absolute;
background: -webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(0%, rgba(0, 0, 0, 0)), color-stop(40%, rgba(0, 0, 0, 0)), color-stop(100%, #000000));
background: -moz-linear-gradient(top, rgba(0, 0, 0, 0) 0%, rgba(0, 0, 0, 0) 40%, #000000 100%);
background: -webkit-linear-gradient(top, rgba(0, 0, 0, 0) 0%, rgba(0, 0, 0, 0) 40%, #000000 100%);
background: linear-gradient(to bottom, rgba(0, 0, 0, 0) 0%, rgba(0, 0, 0, 0) 40%, #000000 100%);
}
.img-panel:hover:after {
background: -webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(0%, rgba(0, 0, 0, 0.3)), color-stop(40%, rgba(0, 0, 0, 0.3)), color-stop(100%, #000000));
background: -moz-linear-gradient(top, rgba(0, 0, 0, 0.3) 0%, rgba(0, 0, 0, 0.3) 40%, #000000 100%);
background: -webkit-linear-gradient(top, rgba(0, 0, 0, 0.3) 0%, rgba(0, 0, 0, 0.3) 40%, #000000 100%);
background: linear-gradient(to bottom, rgba(0, 0, 0, 0.3) 0%, rgba(0, 0, 0, 0.3) 40%, #000000 100%);
}
.img-panel:active:after {
background: -webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(0%, rgba(0, 0, 0, 0.6)), color-stop(40%, rgba(0, 0, 0, 0.6)), color-stop(100%, #000000));
background: -moz-linear-gradient(top, rgba(0, 0, 0, 0.6) 0%, rgba(0, 0, 0, 0.6) 40%, #000000 100%);
background: -webkit-linear-gradient(top, rgba(0, 0, 0, 0.6) 0%, rgba(0, 0, 0, 0.6) 40%, #000000 100%);
background: linear-gradient(to bottom, rgba(0, 0, 0, 0.6) 0%, rgba(0, 0, 0, 0.6) 40%, #000000 100%);
}
.img-panel span.button-title {
position: absolute;
bottom: 0;
z-index: 10;
}
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css" integrity="sha384-1q8mTJOASx8j1Au+a5WDVnPi2lkFfwwEAa8hDDdjZlpLegxhjVME1fgjWPGmkzs7" crossorigin="anonymous">
<div class="row">
<div class="col-md-4 img-panel-container">
<button class="img-panel translucent-overlay-light" style="background-image: url('http://placeimg.com/500/300/any')">
<span class="button-title">Hello</span>
</button>
</div>
</div>

CSS Opacity Fade

I'm trying to take this as a CSS background on a div, but I'd like to have the image start fading in to the background at around 200px like this (black background used for example). Is there a CSS only method of doing this?
I plan on wrapping this project in NodeWebkit, so as long as it works in Chrome I'm not worried about other browsers.
Thanks in advance!
HTML:
<div class="profileBox">
...
</div>
CSS:
.profileBox {
background-image: url('http://ddragon.leagueoflegends.com/cdn/img/champion/loading/Morgana_6.jpg');
background-repeat: no-repeat;
width: 300px;
}
Try this solution, no modification of your HTML is required and not JS.
Basically you can create your gradient using -webkit-linear-gradient adding property url for your image.
http://jsfiddle.net/0kj8t1zq/6/
<div class="profileBox"></div>
.profileBox {
position: absolute;
background: -moz-linear-gradient(top, rgba(0, 0, 0, 0) 0%, rgba(0, 0, 0, 0) 59%, rgba(0, 0, 0, 0.65) 100%), url('http://ddragon.leagueoflegends.com/cdn/img/champion/loading/Morgana_6.jpg') no-repeat;
background: -webkit-gradient(linear, left top, left bottom, color-stop(0%, rgba(0, 0, 0, 0)), color-stop(59%, rgba(0, 0, 0, 0)), color-stop(100%, rgba(0, 0, 0, 0.65))), url('http://ddragon.leagueoflegends.com/cdn/img/champion/loading/Morgana_6.jpg') no-repeat;
background: -webkit-linear-gradient(top, rgba(0, 0, 0, 0) 0%, rgba(0, 0, 0, 0) 59%, rgba(0, 0, 0, 0.65) 100%), url('http://ddragon.leagueoflegends.com/cdn/img/champion/loading/Morgana_6.jpg') no-repeat;
background: -o-linear-gradient(top, rgba(0, 0, 0, 0) 0%, rgba(0, 0, 0, 0) 59%, rgba(0, 0, 0, 0.65) 100%), url('http://http://ddragon.leagueoflegends.com/cdn/img/champion/loading/Morgana_6.jpg') no-repeat;
s-linear-gradient(top, rgba(0, 0, 0, 0) 0%, rgba(0, 0, 0, 0) 59%, rgba(0, 0, 0, 0.65) 100%), url('http://ddragon.leagueoflegends.com/cdn/img/champion/loading/Morgana_6.jpg') no-repeat;
background: linear-gradient(to bottom, rgba(0, 0, 0, 0) 0%, rgba(0, 0, 0, 0) 59%, rgba(0, 0, 0, 0.65) 100%), url('http://ddragon.leagueoflegends.com/cdn/img/champion/loading/Morgana_6.jpg') no-repeat;
width: 308px;
You have already answers to fade it to black.
If you want to fade it to transparent, you need masking. It doesn't have much support, but it works in Chrome
.profileBox {
background-image: url('http://ddragon.leagueoflegends.com/cdn/img/champion/loading/Morgana_6.jpg');
background-repeat: no-repeat;
width: 300px;
height: 400px;
-webkit-mask-image: linear-gradient(0deg, transparent 100px, black 200px);
border: solid 2px white;
}
body {
background-color: blue;
}
<div class="profileBox"></div>
Changed body background to blue to see it is really transparent
For the fade effect, you can use rgba in webkit-gradient.
To get an image AND a gradient as background you can play with opacity. But there is no CSS property background-opacity, so you can fake it by inserting a pseudo element with regular opacity the exact size of the element behind it (source).
.profileBox {
width: 300px;
height: 300px;
display: block;
position: relative;
background-image: -webkit-linear-gradient(top, rgba(255, 255, 255, 1), rgba(255, 255, 255, 0));
background-image: -webkit-gradient(linear, left top, left bottom, from(rgba(255, 255, 255, 1)), to(rgba(255, 255, 255, 0))); /* Saf4+, Chrome */
background-image: -webkit-linear-gradient(top, rgba(255, 255, 255, 1), rgba(255, 255, 255, 0)); /* Chrome 10+, Saf5.1+ */
background-image: -moz-linear-gradient(top, rgba(255, 255, 255, 1), rgba(255, 255, 255, 0)); /* FF3.6+ */
background-image: -ms-linear-gradient(top, rgba(255, 255, 255, 1), rgba(255, 255, 255, 0)); /* IE10 */
background-image: -o-linear-gradient(top, rgba(255, 255, 255, 1), rgba(255, 255, 255, 0)); /* Opera 11.10+ */
background-image: linear-gradient(top bottom, rgba(255, 255, 255, 1), rgba(255, 255, 255, 0)); /* W3C */
}
.profileBox::after {
content: "";
opacity: 0.5;
top: 0;
left: 0;
bottom: 0;
right: 0;
position: absolute;
z-index: -1;
background-repeat: no-repeat;
background-image: url(http://ddragon.leagueoflegends.com/cdn/img/champion/loading/Morgana_6.jpg);
}
<div class="profileBox">
</div>

Create a hr radial-gradient below the line

There is a wonderful hr gradient here in the answer (the jsfiddle he links to shows an updated css) - Create a beautiful horizontal line with CSS only. It is exactly what I am after but I would like the gradient to appear below then line instead of above it.
The html is very simple -
hr.fancy-line {
border: 0;
height: 1px;
position: relative;
margin: 0.5em 0;
/* Keep other elements away from pseudo elements*/
}
hr.fancy-line:before {
top: -0.5em;
height: 1em;
}
hr.fancy-line:after {
content: '';
height: 0.5em;
/* half the height of :before */
top: 1px;
/* height of hr*/
}
hr.fancy-line:before,
hr.fancy-line:after {
content: '';
position: absolute;
width: 100%;
}
hr.fancy-line,
hr.fancy-line:before {
background: -moz-radial-gradient(center, ellipse cover, rgba(0, 0, 0, 0.1) 0%, rgba(0, 0, 0, 0) 75%);
background: -webkit-gradient(radial, center center, 0px, center center, 75%, color-stop(0%, rgba(0, 0, 0, 0.1)), color-stop(75%, rgba(0, 0, 0, 0)));
background: -webkit-radial-gradient(center, ellipse cover, rgba(0, 0, 0, 0.1) 0%, rgba(0, 0, 0, 0) 75%);
background: -o-radial-gradient(center, ellipse cover, rgba(0, 0, 0, 0.1) 0%, rgba(0, 0, 0, 0) 75%);
background: -ms-radial-gradient(center, ellipse cover, rgba(0, 0, 0, 0.1) 0%, rgba(0, 0, 0, 0) 75%);
background: radial-gradient(ellipse at center, rgba(0, 0, 0, 0.1) 0%, rgba(0, 0, 0, 0) 75%);
}
body,
hr.fancy-line:after {
background: #f4f4f4;
}
<hr class="fancy-line"></hr>
I have tried various different things but cannot get it to work, plus whenever I change it, the line itself disappears.
Please can someone help... thank you
hr.fancy-line:after {
content:'';
height: 0.5em;
top: -8px; /*change or bottom:0; */
}
hr.fancy-line {
border: 0;
height: 1px;
position: relative;
margin: 0.5em 0;
}
hr.fancy-line:before {
top: -0.5em;
height: 1em;
}
hr.fancy-line:after {
content: '';
height: 0.5em;
top: -8px; /*or bottom:0; */
}
hr.fancy-line:before,
hr.fancy-line:after {
content: '';
position: absolute;
width: 100%;
}
hr.fancy-line,
hr.fancy-line:before {
background: -moz-radial-gradient(center, ellipse cover, rgba(0, 0, 0, 0.1) 0%, rgba(0, 0, 0, 0) 75%);
background: -webkit-gradient(radial, center center, 0px, center center, 75%, color-stop(0%, rgba(0, 0, 0, 0.1)), color-stop(75%, rgba(0, 0, 0, 0)));
background: -webkit-radial-gradient(center, ellipse cover, rgba(0, 0, 0, 0.1) 0%, rgba(0, 0, 0, 0) 75%);
background: -o-radial-gradient(center, ellipse cover, rgba(0, 0, 0, 0.1) 0%, rgba(0, 0, 0, 0) 75%);
background: -ms-radial-gradient(center, ellipse cover, rgba(0, 0, 0, 0.1) 0%, rgba(0, 0, 0, 0) 75%);
background: radial-gradient(ellipse at center, rgba(0, 0, 0, 0.1) 0%, rgba(0, 0, 0, 0) 75%);
}
body,
hr.fancy-line:after {
background: #f4f4f4;
}
<hr class="fancy-line"></hr>

CSS doesn't work in Chrome but works in Firefox

I have piece of CSS code which works fine in Firefox but not in Chrome.
I guess made a mistake when using -webkit-linear-gradient which shows invalid value in chrome
HTML code:
<div class="laptop">
<div class="glare-xl"></div>
<div class="screen-xl">
<img src="http://www.psdgraphics.com/file/silver-laptop-icon.jpg" alt="laptop" />
</div>
<div class="base-xl"></div>
<div class="addons-xl "></div>
<div class="button-xl"></div>
</div>
CSS code:
.laptop:before {
background: none repeat scroll 0 0 padding-box #d3d4d6;
border-color: #cecece #b7b7b9 #5e5d62;
border-radius: 12px 12px 0 0;
border-style: solid;
border-width: 1px;
bottom: 0;
content: "";
height: 317px;
left: 0;
margin-bottom: -1px;
margin-left: -6px;
margin-top: -6px;
position: absolute;
top: 0;
width: 536px;
z-index: -3;
}
.laptop:after {
background: none repeat scroll 0 0 padding-box #000000;
border: 1px solid #bdbec0;
border-radius: 10px 10px 0 0;
bottom: 0;
content: "";
height: 311px;
left: 1px;
margin-bottom: -1px;
margin-left: -5px;
margin-top: -6px;
position: absolute;
top: 2px;
width: 532px;
z-index: -2;
}
.laptop {
background: none repeat scroll 0 0 padding-box #010101;
border: 1px solid #101113;
border-radius: 8px 8px 0 0;
display: inline-block;
height: 230px;
margin-bottom: 40px;
margin-left: 60px;
position: relative;
width: 528px;
}
.glare-xl {
background-clip: padding-box;
background-image: -moz-linear-gradient(-27% bottom , rgba(0, 0, 0, 0.1) 55%, rgba(0, 0, 0, 0.1) 55%, rgba(255, 255, 255, 0.25) 55.05%);
background-image: -webkit-linear-gradient(-27% bottom , rgba(0, 0, 0, 0.1) 55%, rgba(0, 0, 0, 0.1) 55%, rgba(255, 255, 255, 0.25) 55.05%);
background-image: -ms-linear-gradient(-27% bottom , rgba(0, 0, 0, 0.1) 55%, rgba(0, 0, 0, 0.1) 55%, rgba(255, 255, 255, 0.25) 55.05%);
background-image: -o-linear-gradient(-27% bottom , rgba(0, 0, 0, 0.1) 55%, rgba(0, 0, 0, 0.1) 55%, rgba(255, 255, 255, 0.25) 55.05%);
background-image: linear-gradient(-27% bottom , rgba(0, 0, 0, 0.1) 55%, rgba(0, 0, 0, 0.1) 55%, rgba(255, 255, 255, 0.25) 55.05%);
border-radius: 7px 7px 0 0;
height: 308px;
position: absolute;
top: -1px;
width: 610px;
z-index: 100;
}
.screen-xl:before {
background: -moz-linear-gradient(center top , #303235 0%, #0a0a0a 100%) repeat scroll 0 0 padding-box rgba(0, 0, 0, 0);
background: -webkit-linear-gradient(center top , #303235 0%, #0a0a0a 100%) repeat scroll 0 0 padding-box rgba(0, 0, 0, 0);
background: -ms-linear-gradient(center top , #303235 0%, #0a0a0a 100%) repeat scroll 0 0 padding-box rgba(0, 0, 0, 0);
background: -o-linear-gradient(center top , #303235 0%, #0a0a0a 100%) repeat scroll 0 0 padding-box rgba(0, 0, 0, 0);
background: linear-gradient(center top , #303235 0%, #0a0a0a 100%) repeat scroll 0 0 padding-box rgba(0, 0, 0, 0);
border-color: #000000;
border-radius: 7px 7px 0 0;
border-style: solid;
border-width: 9px 7px;
content: "";
height: 272px;
left: -6px;
position: absolute;
top: -5px;
width: 500px;
z-index: 3;
}
.screen-xl:after {
background: -moz-linear-gradient(center top , #5c5c5c 0%, #656565 8%, #4f4f4f 42%, #727272 100%) repeat scroll 0 0 padding-box rgba(0, 0, 0, 0);
background: -webkit-linear-gradient(center top , #5c5c5c 0%, #656565 8%, #4f4f4f 42%, #727272 100%) repeat scroll 0 0 padding-box rgba(0, 0, 0, 0);
background: -ms-linear-gradient(center top , #5c5c5c 0%, #656565 8%, #4f4f4f 42%, #727272 100%) repeat scroll 0 0 padding-box rgba(0, 0, 0, 0);
background: -o-linear-gradient(center top , #5c5c5c 0%, #656565 8%, #4f4f4f 42%, #727272 100%) repeat scroll 0 0 padding-box rgba(0, 0, 0, 0);
background: linear-gradient(center top , #5c5c5c 0%, #656565 8%, #4f4f4f 42%, #727272 100%) repeat scroll 0 0 padding-box rgba(0, 0, 0, 0);
border: 1px solid #404040;
border-radius: 25px;
box-shadow: 0 0 2px #ffffff;
content: "";
height: 3px;
left: 49%;
position: absolute;
top: -8px;
width: 3px;
z-index: 130;
}
.screen-xl {
border: 1px solid #141414;
border-radius: 2px 2px 0 0;
height: 276px;
left: 10px;
position: absolute;
top: 12px;
width: 502px;
}
.screen-xl img {
border-radius: 2px;
height: 272px;
left: 0;
margin-left: 1px;
margin-top: 4px;
position: absolute;
width: 500px;
z-index: 100;
}
.base-xl:before {
background: -moz-linear-gradient(center top , #c5c4c6 0%, #aeadb1 6%, #99989d 25%, #98979d 31%, #918f96 38%, #686a6d 63%, #4c5254 75%, #43484a 81%, #2c2f30 94%, #16191a 100%) repeat scroll 0 0 padding-box rgba(0, 0, 0, 0);
background: -webkit-linear-gradient(center top , #c5c4c6 0%, #aeadb1 6%, #99989d 25%, #98979d 31%, #918f96 38%, #686a6d 63%, #4c5254 75%, #43484a 81%, #2c2f30 94%, #16191a 100%) repeat scroll 0 0 padding-box rgba(0, 0, 0, 0);
background: -ms-linear-gradient(center top , #c5c4c6 0%, #aeadb1 6%, #99989d 25%, #98979d 31%, #918f96 38%, #686a6d 63%, #4c5254 75%, #43484a 81%, #2c2f30 94%, #16191a 100%) repeat scroll 0 0 padding-box rgba(0, 0, 0, 0);
background: -o-linear-gradient(center top , #c5c4c6 0%, #aeadb1 6%, #99989d 25%, #98979d 31%, #918f96 38%, #686a6d 63%, #4c5254 75%, #43484a 81%, #2c2f30 94%, #16191a 100%) repeat scroll 0 0 padding-box rgba(0, 0, 0, 0);
background: linear-gradient(center top , #c5c4c6 0%, #aeadb1 6%, #99989d 25%, #98979d 31%, #918f96 38%, #686a6d 63%, #4c5254 75%, #43484a 81%, #2c2f30 94%, #16191a 100%) repeat scroll 0 0 padding-box rgba(0, 0, 0, 0);
border-radius: 0 0 400px 400px / 0 0 100px 100px;
bottom: -15px;
box-shadow: 7px 0 3px #6a6d71 inset, -7px 0 3px #6a6d71 inset;
content: "";
height: 15px;
left: -1px;
position: absolute;
width: 655px;
z-index: 130;
}
.base-xl {
background: -moz-linear-gradient(left center , #979ba0 1%, #dfdfdf 4%, #f2f2f2 6%, #e3e3e5 14%, #e3e3e5 86%, #f2f2f2 94%, #dfdfdf 96%, #6a6d71 100%) repeat scroll 0 0 padding-box rgba(0, 0, 0, 0);
background: -webkit-linear-gradient(left center , #979ba0 1%, #dfdfdf 4%, #f2f2f2 6%, #e3e3e5 14%, #e3e3e5 86%, #f2f2f2 94%, #dfdfdf 96%, #6a6d71 100%) repeat scroll 0 0 padding-box rgba(0, 0, 0, 0);
background: -ms-linear-gradient(left center , #979ba0 1%, #dfdfdf 4%, #f2f2f2 6%, #e3e3e5 14%, #e3e3e5 86%, #f2f2f2 94%, #dfdfdf 96%, #6a6d71 100%) repeat scroll 0 0 padding-box rgba(0, 0, 0, 0);
background: -o-linear-gradient(left center , #979ba0 1%, #dfdfdf 4%, #f2f2f2 6%, #e3e3e5 14%, #e3e3e5 86%, #f2f2f2 94%, #dfdfdf 96%, #6a6d71 100%) repeat scroll 0 0 padding-box rgba(0, 0, 0, 0);
background: linear-gradient(left center , #979ba0 1%, #dfdfdf 4%, #f2f2f2 6%, #e3e3e5 14%, #e3e3e5 86%, #f2f2f2 94%, #dfdfdf 96%, #6a6d71 100%) repeat scroll 0 0 padding-box rgba(0, 0, 0, 0);
border-color: #6b6e72;
border-radius: 3px 3px 0 0;
border-style: solid;
border-width: 1px 1px 0;
bottom: -101px;
box-shadow: 0 1px 2px #ffffff inset;
float: left;
height: 22px;
left: -125px;
margin-left: 60px;
position: absolute;
width: 654px;
z-index: 4;
}
.addons-xl:before {
background-color: #000000;
border-radius: 55px 55px 5px 5px;
bottom: -115px;
content: "";
height: 5px;
left: 4%;
position: absolute;
width: 5px;
z-index: 1000;
}
.addons-xl:after {
background-color: #000000;
border-radius: 55px 55px 5px 5px;
bottom: -115px;
content: "";
height: 5px;
position: absolute;
right: 4%;
width: 5px;
z-index: 1000;
}
.addons-xl {
background-color: rgba(0, 0, 0, 0);
border-radius: 10px;
height: 3px;
margin-left: 53%;
margin-top: 5px;
width: 3px;
z-index: 1000;
}
.button-xl:after {
background: -moz-linear-gradient(center top , #1a2226 0%, #535a61 64%, #68778c 100%) repeat scroll 0 0 padding-box rgba(0, 0, 0, 0);
background: -webkit-linear-gradient(center top , #1a2226 0%, #535a61 64%, #68778c 100%) repeat scroll 0 0 padding-box rgba(0, 0, 0, 0);
background: -ms-linear-gradient(center top , #1a2226 0%, #535a61 64%, #68778c 100%) repeat scroll 0 0 padding-box rgba(0, 0, 0, 0);
background: -o-linear-gradient(center top , #1a2226 0%, #535a61 64%, #68778c 100%) repeat scroll 0 0 padding-box rgba(0, 0, 0, 0);
background: linear-gradient(center top , #1a2226 0%, #535a61 64%, #68778c 100%) repeat scroll 0 0 padding-box rgba(0, 0, 0, 0);
border-radius: 10px;
bottom: -6px;
box-shadow: 0 0 1px #ffffff;
content: "";
height: 3px;
left: 274px;
position: absolute;
width: 20px;
z-index: 4;
}
.button-xl {
background: -moz-linear-gradient(left center , #979ba0 1%, #dfdfdf 4%, #f2f2f2 6%, #b1b3b6 14%, #b1b3b6 86%, #f2f2f2 94%, #dfdfdf 96%, #6a6d71 100%) repeat scroll 0 0 padding-box rgba(0, 0, 0, 0);
background: -webkit-linear-gradient(left center , #979ba0 1%, #dfdfdf 4%, #f2f2f2 6%, #b1b3b6 14%, #b1b3b6 86%, #f2f2f2 94%, #dfdfdf 96%, #6a6d71 100%) repeat scroll 0 0 padding-box rgba(0, 0, 0, 0);
background: -ms-linear-gradient(left center , #979ba0 1%, #dfdfdf 4%, #f2f2f2 6%, #b1b3b6 14%, #b1b3b6 86%, #f2f2f2 94%, #dfdfdf 96%, #6a6d71 100%) repeat scroll 0 0 padding-box rgba(0, 0, 0, 0);
background: -o-linear-gradient(left center , #979ba0 1%, #dfdfdf 4%, #f2f2f2 6%, #b1b3b6 14%, #b1b3b6 86%, #f2f2f2 94%, #dfdfdf 96%, #6a6d71 100%) repeat scroll 0 0 padding-box rgba(0, 0, 0, 0);
background: linear-gradient(left center , #979ba0 1%, #dfdfdf 4%, #f2f2f2 6%, #b1b3b6 14%, #b1b3b6 86%, #f2f2f2 94%, #dfdfdf 96%, #6a6d71 100%) repeat scroll 0 0 padding-box rgba(0, 0, 0, 0);
border-color: #5c6064;
border-radius: 0 0 50px 50px;
border-style: solid;
border-width: 0 1px 1px;
bottom: -87px;
box-shadow: 0 1px 5px #ffffff, 0 1px 1px #ffffff inset;
content: "";
height: 6px;
left: 44%;
position: absolute;
width: 60px;
z-index: 4;
}
Questions:
1)Why CSS doesn't work in Chrome
2)How I can make this all structure i.e laptop as responsive as I tried max-width at all places but it doesn't work?
JS FIDDLE
You need to remove/replace the center keyword in the linear-gradient() function. According to CSS3 specs there is no such thing.