I need to make this clock responsive when i change screen resolution meaning put the clockwise in the middle of the clock and not moving during rotation
.clock{ width: 500px;
height: 500px;
border-radius:100%;
margin: auto;
background:#333 ;
border:22px solid rgb(41, 25, 25) ;
position:relative;
box-shadow:0 5px 0 0 rgba(0, 0, 0, .3),inset 0 35px 0 0 rgba(0, 0, 0, .3), inset 0 0 0 214px #c33;
}
.hour{
position: absolute;
top: 87px;
left: 822.5px;
width: 35px;
height: 198px;
display: block;
margin: auto;
box-shadow: inset 0px 2px 0 0 #fff, inset 0px 198px 0 0 #333;
transform: rotate(150deg);
transform-origin: bottom;
}
.minutes{
position: absolute;
top: 115px;
left: 822.5px;
width: 35px;
height: 170px;
display: block;
margin: auto;
box-shadow: inset 0px 2px 0 0 #fff, inset 0px 170px 0 0 #333;
transform: rotate(150deg);
transform-origin: bottom;
}
<div class="clock"></div>
<div class="hour" id="hour"></div>
<div class="minutes" id="minute"></div>
</div>
Try this code
.clock {
width: 500px;
height: 500px;
border-radius: 100%;
margin: auto;
background: #333;
border: 22px solid rgb(41, 25, 25);
position: relative;
box-shadow: 0 5px 0 0 rgba(0, 0, 0, .3), inset 0 35px 0 0 rgba(0, 0, 0, .3), inset 0 0 0 214px #c33;
}
.hour {
position: absolute;
top: 87px;
left: 50%;
width: 35px;
height: 198px;
display: block;
margin: auto;
box-shadow: inset 0px 2px 0 0 #fff, inset 0px 198px 0 0 #333;
transform: rotate(150deg);
transform-origin: bottom;
}
.minutes {
position: absolute;
top: 41px;
left: 46%;
width: 35px;
height: 170px;
display: block;
margin: auto;
box-shadow: inset 0px 2px 0 0 #fff, inset 0px 170px 0 0 #333;
transform: rotate(00deg);
transform-origin: bottom;
}
<div class="clock">
<div class="hour" id="hour"></div>
<div class="minutes" id="minute"></div>
</div>
Related
I want to add shadow to my clip-path, but if I wrap it it will disappear.
Here is the result I want (must the shadow to the clip-path):
.question-card {
background-color: silver;
border-radius: 0.25em;
height: 100px;
width: 200px;
-webkit-box-shadow: -1px 1px 7px 0px rgba(0,0,0,0.75);
-moz-box-shadow: -1px 1px 7px 0px rgba(0,0,0,0.75);
box-shadow: -1px 1px 7px 0px rgba(0,0,0,0.75);
}
.inset {
height: 40px;
width: 20px;
background-color: inherit;
position: absolute;
top: 40px;
left: 208px;
clip-path: inset(0 0 0 0);
border-radius: 0 0.25em 0.25em 0;
}
.inset-wrap {
filter: drop-shadow(-1px 1px 7px 0px rgba(0,0,0,0.75));
}
<div class="question-card">
<span class="inset"></span>
</div>
Here is the result when I try to add the shadow why it disappears?:
.question-card {
background-color: silver;
border-radius: 0.25em;
height: 100px;
width: 200px;
-webkit-box-shadow: -1px 1px 7px 0px rgba(0,0,0,0.75);
-moz-box-shadow: -1px 1px 7px 0px rgba(0,0,0,0.75);
box-shadow: -1px 1px 7px 0px rgba(0,0,0,0.75);
}
.inset {
height: 40px;
width: 20px;
background-color: inherit;
position: absolute;
top: 40px;
left: 208px;
clip-path: inset(0 0 0 0);
border-radius: 0 0.25em 0.25em 0;
}
.inset-wrap {
filter: drop-shadow(-1px 1px 7px 0px rgba(0,0,0,0.75));
}
<div class="question-card">
<span class="inset-wrap">
<span class="inset"></span>
</span>
</div>
.question-card {
background-color: silver;
border-radius: 0.25em;
height: 100px;
width: 200px;
-webkit-box-shadow: -1px 1px 7px 0px rgba(0,0,0,0.75);
-moz-box-shadow: -1px 1px 7px 0px rgba(0,0,0,0.75);
box-shadow: -1px 1px 7px 0px rgba(0,0,0,0.75);
}
.inset {
height: 40px;
width: 20px;
background-color: silver;
position: absolute;
top: 40px;
left: 208px;
clip-path: inset(0 0 0 0);
border-radius: 0 0.25em 0.25em 0;
}
.inset-wrap {
filter: drop-shadow(-1px 1px 7px 0px rgba(0,0,0,0.75));
}
<div class="question-card">
<span class="inset-wrap">
<span class="inset"></span>
</span>
</div>
I've been trying to find a way to have a shadow on the inside of an image but I can only manage an outer shadow. .showSlide is a div element btw
.showSlide {
display: block;
width:100%;
height:350px;
}
.showSlide img {
width: 100%;
height:100%;
border-radius: 15%;
-webkit-box-shadow: 0 0 1px 3px #000 inset;
-moz-box-shadow: 0 0 1px 3px #000 inset;
box-shadow: 0 0 1px 3px #000 inset;
}
Add this:
.showSlide::before {
content: "";
position: absolute;
top: 0;
bottom: 0;
left: 0;
right: 0;
-webkit-border-radius: 15%;
-moz-border-radius: 15%;
border-radius: 15%;
box-shadow: inset 0 0 12px rgba(0,0,0,.6);
-moz-box-shadow: inset 0 0 12px rgba(0,0,0,.6);
-webkit-box-shadow: inset 0 0 12px rgba(0,0,0,.6);
}
and edit:
.showSlide {
display: block;
width:100%;
height:350px;
position: relative;
}
.showSlide img {
width: 100%;
height:100%;
border-radius: 15%;
}
i'm not even sure why this is happening, Its a Css error but im not sure where
I'm doing this in rails so im relatively new to this but it should be standard css!
As you can see the element "ticket" is hidden behind the cards (not sure why), I'm wanting the ticket above the images so it can be editable!
Here is the code
Css
// Place all the styles related to the view controller here.
// They will automatically be included in application.css.
// You can use Sass (SCSS) here: http://sass-lang.com/
.box{
position: absolute;
top: calc(50% - 125px);
top: -webkit-calc(50% - 125px);
left: calc(50% - 300px);
left: -webkit-calc(50% - 300px);
}
.ticket{
width: 600px;
height: 250px;
background: #FFB300;
border-radius: 3px;
box-shadow: 0 0 100px #aaa;
border-top: 1px solid #E89F3D;
border-bottom: 1px solid #E89F3D;
}
.left{
margin: 0;
padding: 0;
list-style: none;
position: absolute;
top: 0px;
left: -5px;
}
.left li{
width: 0px;
height: 0px;
}
.left li:nth-child(-n+2){
margin-top: 8px;
border-top: 5px solid transparent;
border-bottom: 5px solid transparent;
border-right: 5px solid #FFB300;
}
.left li:nth-child(3),
.left li:nth-child(6){
margin-top: 8px;
border-top: 5px solid transparent;
border-bottom: 5px solid transparent;
border-right: 5px solid #EEEEEE;
}
.left li:nth-child(4){
margin-top: 8px;
margin-left: 2px;
border-top: 5px solid transparent;
border-bottom: 5px solid transparent;
border-right: 5px solid #EEEEEE;
}
.left li:nth-child(5){
margin-top: 8px;
margin-left: -1px;
border-top: 6px solid transparent;
border-bottom: 6px solid transparent;
border-right: 6px solid #EEEEEE;
}
.left li:nth-child(7),
.left li:nth-child(9),
.left li:nth-child(11),
.left li:nth-child(12){
margin-top: 7px;
border-top: 5px solid transparent;
border-bottom: 5px solid transparent;
border-right: 5px solid #E5E5E5;
}
.left li:nth-child(8){
margin-top: 7px;
margin-left: 2px;
border-top: 5px solid transparent;
border-bottom: 5px solid transparent;
border-right: 5px solid #E5E5E5;
}
.left li:nth-child(10){
margin-top: 7px;
margin-left: 1px;
border-top: 5px solid transparent;
border-bottom: 5px solid transparent;
border-right: 5px solid #E5E5E5;
}
.left li:nth-child(13){
margin-top: 7px;
margin-left: 2px;
border-top: 5px solid transparent;
border-bottom: 5px solid transparent;
border-right: 5px solid #FFB300;
}
.left li:nth-child(14){
margin-top: 7px;
border-top: 5px solid transparent;
border-bottom: 5px solid transparent;
border-right: 5px solid #FFB300;
}
.right{
margin: 0;
padding: 0;
list-style: none;
position: absolute;
top: 0px;
right: -5px;
}
.right li:nth-child(-n+2){
margin-top: 8px;
border-top: 5px solid transparent;
border-bottom: 5px solid transparent;
border-left: 5px solid #FFB300;
}
.right li:nth-child(3),
.right li:nth-child(4),
.right li:nth-child(6){
margin-top: 8px;
border-top: 5px solid transparent;
border-bottom: 5px solid transparent;
border-left: 5px solid #EEEEEE;
}
.right li:nth-child(5){
margin-top: 8px;
margin-left: -2px;
border-top: 5px solid transparent;
border-bottom: 5px solid transparent;
border-left: 5px solid #EEEEEE;
}
.right li:nth-child(8),
.right li:nth-child(9),
.right li:nth-child(11){
margin-top: 7px;
border-top: 5px solid transparent;
border-bottom: 5px solid transparent;
border-left: 5px solid #E5E5E5;
}
.right li:nth-child(7){
margin-top: 7px;
margin-left: -3px;
border-top: 5px solid transparent;
border-bottom: 5px solid transparent;
border-left: 5px solid #E5E5E5;
}
.right li:nth-child(10){
margin-top: 7px;
margin-left: -2px;
border-top: 5px solid transparent;
border-bottom: 5px solid transparent;
border-left: 5px solid #E5E5E5;
}
.right li:nth-child(12){
margin-top: 7px;
border-top: 6px solid transparent;
border-bottom: 6px solid transparent;
border-left: 6px solid #E5E5E5;
}
.right li:nth-child(13),
.right li:nth-child(14){
margin-top: 7px;
border-top: 5px solid transparent;
border-bottom: 5px solid transparent;
border-left: 5px solid #FFB300;
}
.ticket:after{
content: '';
position: absolute;
right: 200px;
top: 0px;
width: 2px;
height: 250px;
box-shadow: inset 0 0 0 #FFB300,
inset 0 -10px 0 #B56E0A,
inset 0 -20px 0 #FFB300,
inset 0 -30px 0 #B56E0A,
inset 0 -40px 0 #FFB300,
inset 0 -50px 0 #999999,
inset 0 -60px 0 #E5E5E5,
inset 0 -70px 0 #999999,
inset 0 -80px 0 #E5E5E5,
inset 0 -90px 0 #999999,
inset 0 -100px 0 #E5E5E5,
inset 0 -110px 0 #999999,
inset 0 -120px 0 #E5E5E5,
inset 0 -130px 0 #999999,
inset 0 -140px 0 #E5E5E5,
inset 0 -150px 0 #B0B0B0,
inset 0 -160px 0 #EEEEEE,
inset 0 -170px 0 #B0B0B0,
inset 0 -180px 0 #EEEEEE,
inset 0 -190px 0 #B0B0B0,
inset 0 -200px 0 #EEEEEE,
inset 0 -210px 0 #B0B0B0,
inset 0 -220px 0 #FFB300,
inset 0 -230px 0 #B56E0A,
inset 0 -240px 0 #FFB300,
inset 0 -250px 0 #B56E0A;
}
.ticket:before{
content: '';
position: absolute;
z-index: 5;
right: 199px;
top: 0px;
width: 1px;
height: 250px;
box-shadow: inset 0 0 0 #FFB300,
inset 0 -10px 0 #F4D483,
inset 0 -20px 0 #FFB300,
inset 0 -30px 0 #F4D483,
inset 0 -40px 0 #FFB300,
inset 0 -50px 0 #FFFFFF,
inset 0 -60px 0 #E5E5E5,
inset 0 -70px 0 #FFFFFF,
inset 0 -80px 0 #E5E5E5,
inset 0 -90px 0 #FFFFFF,
inset 0 -100px 0 #E5E5E5,
inset 0 -110px 0 #FFFFFF,
inset 0 -120px 0 #E5E5E5,
inset 0 -130px 0 #FFFFFF,
inset 0 -140px 0 #E5E5E5,
inset 0 -150px 0 #FFFFFF,
inset 0 -160px 0 #EEEEEE,
inset 0 -170px 0 #FFFFFF,
inset 0 -180px 0 #EEEEEE,
inset 0 -190px 0 #FFFFFF,
inset 0 -200px 0 #EEEEEE,
inset 0 -210px 0 #FFFFFF,
inset 0 -220px 0 #FFB300,
inset 0 -230px 0 #F4D483,
inset 0 -240px 0 #FFB300,
inset 0 -250px 0 #F4D483;
}
.content{
position: absolute;
top: 40px;
width: 100%;
height: 170px;
background: #eee;
}
.airline{
position: absolute;
top: 10px;
left: 10px;
font-family: Arial;
font-size: 20px;
font-weight: bold;
color: rgba(0,0,102,1);
}
.boarding{
position: absolute;
top: 10px;
right: 220px;
font-family: Arial;
font-size: 18px;
color: rgba(255,255,255,0.6);
}
.jfk{
position: absolute;
top: 10px;
left: 20px;
font-family: Arial;
font-size: 38px;
color: #222;
}
.sfo{
position: absolute;
top: 10px;
left: 180px;
font-family: Arial;
font-size: 38px;
color: #222;
}
.plane{
position: absolute;
left: 105px;
top: 0px;
}
.sub-content{
background: #e5e5e5;
width: 100%;
height: 100px;
position: absolute;
top: 70px;
}
.watermark{
position: absolute;
left: 5px;
top: -10px;
font-family: Arial;
font-size: 110px;
font-weight: bold;
color: rgba(255,255,255,0.2);
}
.name{
position: absolute;
top: 10px;
left: 10px;
font-family: Arial Narrow, Arial;
font-weight: bold;
font-size: 14px;
color: #999;
}
.name span{
color: #555;
font-size: 17px;
}
.flight{
position: absolute;
top: 10px;
left: 180px;
font-family: Arial Narrow, Arial;
font-weight: bold;
font-size: 14px;
color: #999;
}
.flight span{
color: #555;
font-size: 17px;
}
.gate{
position: absolute;
top: 10px;
left: 280px;
font-family: Arial Narrow, Arial;
font-weight: bold;
font-size: 14px;
color: #999;
}
.gate span{
color: #555;
font-size: 17px;
}
.seat{
position: absolute;
top: 10px;
left: 350px;
font-family: Arial Narrow, Arial;
font-weight: bold;
font-size: 14px;
color: #999;
}
.seat span{
color: #555;
font-size: 17px;
}
.boardingtime{
position: absolute;
top: 60px;
left: 10px;
font-family: Arial Narrow, Arial;
font-weight: bold;
font-size: 14px;
color: #999;
}
.boardingtime span{
color: #555;
font-size: 17px;
}
.barcode{
position: absolute;
left: 8px;
bottom: 6px;
height: 30px;
width: 90px;
background: #222;
box-shadow: inset 0 1px 0 #FFB300, inset -2px 0 0 #FFB300,
inset -4px 0 0 #222,
inset -5px 0 0 #FFB300,
inset -6px 0 0 #222,
inset -9px 0 0 #FFB300,
inset -12px 0 0 #222,
inset -13px 0 0 #FFB300,
inset -14px 0 0 #222,
inset -15px 0 0 #FFB300,
inset -16px 0 0 #222,
inset -17px 0 0 #FFB300,
inset -19px 0 0 #222,
inset -20px 0 0 #FFB300,
inset -23px 0 0 #222,
inset -25px 0 0 #FFB300,
inset -26px 0 0 #222,
inset -26px 0 0 #FFB300,
inset -27px 0 0 #222,
inset -30px 0 0 #FFB300,
inset -31px 0 0 #222,
inset -33px 0 0 #FFB300,
inset -35px 0 0 #222,
inset -37px 0 0 #FFB300,
inset -40px 0 0 #222,
inset -43px 0 0 #FFB300,
inset -44px 0 0 #222,
inset -45px 0 0 #FFB300,
inset -46px 0 0 #222,
inset -48px 0 0 #FFB300,
inset -49px 0 0 #222,
inset -50px 0 0 #FFB300,
inset -52px 0 0 #222,
inset -54px 0 0 #FFB300,
inset -55px 0 0 #222,
inset -57px 0 0 #FFB300,
inset -59px 0 0 #222,
inset -61px 0 0 #FFB300,
inset -64px 0 0 #222,
inset -66px 0 0 #FFB300,
inset -67px 0 0 #222,
inset -68px 0 0 #FFB300,
inset -69px 0 0 #222,
inset -71px 0 0 #FFB300,
inset -72px 0 0 #222,
inset -73px 0 0 #FFB300,
inset -75px 0 0 #222,
inset -77px 0 0 #FFB300,
inset -80px 0 0 #222,
inset -82px 0 0 #FFB300,
inset -83px 0 0 #222,
inset -84px 0 0 #FFB300,
inset -86px 0 0 #222,
inset -88px 0 0 #FFB300,
inset -89px 0 0 #222,
inset -90px 0 0 #FFB300;
}
.slip{
left: 455px;
}
.nameslip{
top: 60px;
left: 410px;
}
.flightslip{
left: 410px;
}
.seatslip{
left: 540px;
}
.jfkslip{
font-size: 30px;
top: 20px;
left: 410px;
}
.sfoslip{
font-size: 30px;
top: 20px;
left: 530px;
}
.planeslip{
top: 10px;
left: 475px;
}
.airlineslip{
left: 455px;
}
Html
<% title("Home Page") %>
<h1><i class="fa fa-home"></i> Home Page <small>views/pages/home.html.erb</small></h1>
<div class="section" style="background-image: url('https://c2.staticflickr.com/2/1334/1484360775_8391c2ce1a_b.jpg')">
<div class="container" style="color: white">
<div class="box">
<ul class="left">
<li></li>
<li></li>
<li></li>
<li></li>
<li></li>
<li></li>
<li></li>
<li></li>
<li></li>
<li></li>
<li></li>
<li></li>
<li></li>
<li></li>
</ul>
<ul class="right">
<li></li>
<li></li>
<li></li>
<li></li>
<li></li>
<li></li>
<li></li>
<li></li>
<li></li>
<li></li>
<li></li>
<li></li>
<li></li>
<li></li>
</ul>
<div class="ticket">
<span class="airline">Lufthansa</span>
<span class="airline airlineslip">Lufthansa</span>
<span class="boarding">Boarding pass</span>
<div class="content">
<span class="jfk">JFK</span>
<span class="plane"><?xml version="1.0" ?><svg clip-rule="evenodd" fill-rule="evenodd" height="60" width="60" image-rendering="optimizeQuality" shape-rendering="geometricPrecision" text-rendering="geometricPrecision" viewBox="0 0 500 500" xmlns="http://www.w3.org/2000/svg"><g stroke="#222"><line fill="none" stroke-linecap="round" stroke-width="30" x1="300" x2="55" y1="390" y2="390"/><path d="M98 325c-9 10 10 16 25 6l311-156c24-17 35-25 42-50 2-15-46-11-78-7-15 1-34 10-42 16l-56 35 1-1-169-31c-14-3-24-5-37-1-10 5-18 10-27 18l122 72c4 3 5 7 1 9l-44 27-75-15c-10-2-18-4-28 0-8 4-14 9-20 15l74 63z" fill="#222" stroke-linejoin="round" stroke-width="10"/></g></svg></span>
<span class="sfo">SFO</span>
<span class="jfk jfkslip">JFK</span>
<span class="plane planeslip"><?xml version="1.0" ?><svg clip-rule="evenodd" fill-rule="evenodd" height="50" width="50" image-rendering="optimizeQuality" shape-rendering="geometricPrecision" text-rendering="geometricPrecision" viewBox="0 0 500 500" xmlns="http://www.w3.org/2000/svg"><g stroke="#222"><line fill="none" stroke-linecap="round" stroke-width="30" x1="300" x2="55" y1="390" y2="390"/><path d="M98 325c-9 10 10 16 25 6l311-156c24-17 35-25 42-50 2-15-46-11-78-7-15 1-34 10-42 16l-56 35 1-1-169-31c-14-3-24-5-37-1-10 5-18 10-27 18l122 72c4 3 5 7 1 9l-44 27-75-15c-10-2-18-4-28 0-8 4-14 9-20 15l74 63z" fill="#222" stroke-linejoin="round" stroke-width="10"/></g></svg></span>
<span class="sfo sfoslip">SFO</span>
<div class="sub-content">
<span class="watermark">Lufthansa</span>
<span class="name">PASSENGER NAME<br><span>Rex, Anonasaurus</span></span>
<span class="flight">FLIGHT N°<br><span>X3-65C3</span></span>
<span class="gate">GATE<br><span>11B</span></span>
<span class="seat">SEAT<br><span>45A</span></span>
<span class="boardingtime">BOARDING TIME<br><span>8:25PM ON AUGUST 2013</span></span>
<span class="flight flightslip">FLIGHT N°<br><span>X3-65C3</span></span>
<span class="seat seatslip">SEAT<br><span>45A</span></span>
<span class="name nameslip">PASSENGER NAME<br><span>Rex, Anonasaurus</span></span>
</div>
</div>
<div class="barcode"></div>
<div class="barcode slip"></div>
</div>
</div>
</div>
</div>
<div class="row">
<div class="col s12 m4">
<div class="card">
<div class="card-image">
<img src="http://admitme.co.uk/img/Artisit%20Images/CalvinHarris.jpg">
<span class="card-title">Card Title</span>
</div>
<div class="card-content">
<p>I am a very simple card. I am good at containing small bits of information.
I am convenient because I require little markup to use effectively.</p>
</div>
<div class="card-action">
This is a link
</div>
</div>
</div>
<div class="col s12 m4">
<div class="card">
<div class="card-image">
<img src="http://admitme.co.uk/img/Artisit%20Images/CalvinHarris.jpg">
<span class="card-title">Card Title</span>
</div>
<div class="card-content">
<p>I am a very simple card. I am good at containing small bits of information.
I am convenient because I require little markup to use effectively.</p>
</div>
<div class="card-action">
This is a link
</div>
</div>
</div>
<div class="col s12 m4">
<div class="card">
<div class="card-image">
<img src="http://admitme.co.uk/img/Artisit%20Images/CalvinHarris.jpg">
<span class="card-title">Card Title</span>
</div>
<div class="card-content">
<p>I am a very simple card. I am good at containing small bits of information.
I am convenient because I require little markup to use effectively.</p>
</div>
<div class="card-action">
This is a link
</div>
</div>
</div>
</div>
Fiddle
Your cards are in a .row div following the ticket. Elements further down in the DOM have a higher z position than the elements above them in the DOM and appear "in front" of them. To alter the normal hierarchy use the z-index property.
.row {
z-index: 1;
}
You could also reverse the hierarchy of your HTML so that the ticket is after the .row. This would work because your natural hierarchy now places the ticket above .row.
To force the ticket element to go to bottom of the previous element (new line) , try adding to .ticket css:
display: list-item;
This question already has answers here:
CSS Fixed position with Auto Margin
(3 answers)
Closed 7 years ago.
I'm currently trying to make an image centered above login form..
here's the CSS code
.circular {
position: fixed;
top: 0;
right: 0;
left: auto;
bottom: auto;
display: block;
margin: 0 auto;
width: 150px;
height: 150px;
border-radius: 150px;
-webkit-border-radius: 150px;
-moz-border-radius: 150px;
background: url("images/chris.jpg") no-repeat;
box-shadow: 0 0 8px rgba(0, 0, 0, .9);
-webkit-box-shadow: 0 0 8px rgba(0, 0, 0, .9);
-moz-box-shadow: 0 0 8px rgba(0, 0, 0, .9);
}
Still cannot achieve this.
Because your element has a fixed width, you can simply use css calc for it.
.circular {
position: fixed;
top: 0;
left: calc(50% - 75px);
display: block;
width: 150px;
height: 150px;
border-radius: 150px;
-webkit-border-radius: 150px;
-moz-border-radius: 150px;
background: url("images/chris.jpg") no-repeat;
box-shadow: 0 0 8px rgba(0, 0, 0, .9);
-webkit-box-shadow: 0 0 8px rgba(0, 0, 0, .9);
-moz-box-shadow: 0 0 8px rgba(0, 0, 0, .9);
}
If I understand it correctly, and like the comment from #ohAuth said, a little bit more context would be nice. But you want the center of the image, to be at the center of the cirkel?
You could do that by:
replacing this:
.circular {
position: fixed;
top: 0;
right: 0;
left: auto;
bottom: auto;
display: block;
margin: 0 auto;
width: 150px;
height: 150px;
border-radius: 150px;
-webkit-border-radius: 150px;
-moz-border-radius: 150px;
background: url("images/chris.jpg") no-repeat;
box-shadow: 0 0 8px rgba(0, 0, 0, .9);
-webkit-box-shadow: 0 0 8px rgba(0, 0, 0, .9);
-moz-box-shadow: 0 0 8px rgba(0, 0, 0, .9);
}
With this:
.circular {
position: fixed;
top: 0;
right: 0;
left: auto;
bottom: auto;
display: block;
margin: 0 auto;
width: 150px;
height: 150px;
border-radius: 150px;
-webkit-border-radius: 150px;
-moz-border-radius: 150px;
background: url("images/chris.jpg") no-repeat center center;
box-shadow: 0 0 8px rgba(0, 0, 0, .9);
-webkit-box-shadow: 0 0 8px rgba(0, 0, 0, .9);
-moz-box-shadow: 0 0 8px rgba(0, 0, 0, .9);
}
More specific:
This:
background: url("images/chris.jpg") no-repeat;
With this:
background: url("images/chris.jpg") no-repeat center center;
That should put the image in the center.
Let me know if it works :)
I made a horizontal progress bar that does not have a problem with it
But the progress bar's vertical lines are not correct.
I put a picture of the problem.
jsfiddle.net/post98/juGXZ/1/
HTML
<body>
<div class="progress-bar horizontale">
<div class="inner"><span>|||||||</span></div>
</div>
<div class="progress-bar verticale">
<div class="inner"><span>___ ___ ___ ___ ___</span></div>
</div>
</body>
CSS
body {
background: url('https://www.dropbox.com/s/8g7pf7ig7fw5e0v/main_bg.png') repeat;
}
.progress-bar.verticale {
width: 24px;
height: 300px;
/*border: 1px solid #060707;*/
margin: 10px auto;
background-color: rgba(0, 0, 0, 0.25);
box-shadow: 0 0 3px #000000 inset, 0 0 2px rgba(255,255,255,0.1);
border-radius: 10px;
padding: 4px;
transform: rotate(180deg);
display: inline-block;
}
.progress-bar.horizontale {
width: 300px;
height: 24px;
/*border: 1px solid #060707;*/
margin: auto;
background-color: rgba(0, 0, 0, 0.25);
box-shadow: 0 0 3px #000000 inset, 0 0 2px rgba(255,255,255,0.1);
border-radius: 10px;
padding: 4px;
display: inline-block;
}
.progress-bar.horizontale .inner {
background: linear-gradient(#FFCC33, #CC9900);
border-radius: 12px;
position: absolute;
box-shadow: 0 1px 0 rgba(255, 255, 255, 0.3) inset, 0 -1px 3px rgba(0, 0, 0, 0.4) inset, 0 1px 1px #000000;
height: 24px;
width: 200px;
}
.progress-bar.horizontale .inner span {
background: repeat scroll 0 0 #999999;
position: absolute;
font: bold 120px/40px sans-serif ;
letter-spacing: -6px;
height: 24px;
opacity: 0.06;
overflow: hidden;
transform: skewX(-30deg);
}
.progress-bar.verticale .inner {
background: linear-gradient(#FFCC33, #CC9900);
border-radius: 12px;
position: absolute;
box-shadow: 0 1px 0 rgba(255, 255, 255, 0.3) inset, 0 -1px 3px rgba(0, 0, 0, 0.4) inset, 0 1px 1px #000000;
height: 200px;
width: 24px;
}
.progress-bar.verticale .inner span {
background: repeat scroll 0 0 #999999;
position: absolute;
font: bold 20px/30px sans-serif ;
letter-spacing: -6px;
height: 200px;
width: 20px;
opacity: 0.06;
overflow: hidden;
transform: skewY(30deg);
}
Here the Picture
You can make the lines thick by replacing the underscores _ by a thick character like this one: ▀
A demo.
Edit:
ASCII code of the character: 223 (Top half block).
You can thicken the lines like this:
.progress-bar.verticale .inner span {
background: repeat scroll 0 0 #999999;
position: absolute;
font: bold 120px/30px sans-serif ; //thicken lines to same width as horizontal progress bar.
letter-spacing: -6px;
height: 200px;
width: 25px; //change width to fit width of div.
opacity: 0.06;
overflow: hidden;
transform: skewY(30deg);
margin:0px 0px 0px 0px;
bottom: 35px; //Position revision to justify font resizing.
}