So I was recently trying to make an header in which I was using CSS flex property for the alignment of the elements.
Problem came when I tried to do some animations...
Here is what happened when I used the direct child of flex property, i.e. in flexbox I used content--left,center,right to align the elements.
video link(in which translation happens at the login element) - https://drive.google.com/file/d/1TrBrW4KoI43SH0IJj5AQYiq2qNWFqcwv/view
my code(s) for it...
HTML
<header className='second-header'>
<a href='/tours' className='second-header__content--left'>
All Tours
</a>
<img
src='images/logo-white.png'
alt='Logo'
className='second-header__content--center'
/>
<a href='/' className='second-header__content--right'>
Log In
</a></header>
CSS
.second-header {
padding: 1.5rem;
display: flex;
justify-content: space-between;
align-items: center;
background-color: $color-grey-dark;
font-size: 1.4rem;
font-weight: 300;
text-transform: uppercase;
a {
text-decoration: none;
color: $color-grey-light-2;
margin: 0 3rem;
}
img {
height: 3rem;
width: 6rem;
}
&__content--left,
&__content--right {
transition: all 0.2s;
-webkit-transition: all 0.2s;
-moz-transition: all 0.2s;
-ms-transition: all 0.2s;
-o-transition: all 0.2s;
&:hover,
&:active {
text-shadow: 0.5rem 1rem 2rem rgba(0, 0, 0, 1);
transform: translateY(-.25rem);
-webkit-transform: translateY(-.25rem);
-moz-transform: translateY(-.25rem);
-ms-transform: translateY(-.25rem);
-o-transform: translateY(-.25rem);
}
}
}
}
Now this is the thing that happens when I add another element in content right the translate does not work
video link - https://drive.google.com/file/d/1wvTGNCe98qbAb1-aZQZofTar0ow84Ci_/view
my code(s) for the same
HTML
<header className='second-header'>
<a href='/tours' className='second-header__content--left'>
All Tours
</a>
<img
src='images/logo-white.png'
alt='Logo'
className='second-header__content--center'
/>
<section className='second-header__content--right'>
<a href='/' className='second-header__content--right-login'>
Log In
</a>
<button className='second-header__content--right-signup'>
Sign Up
</button>
</section>
</header>
CSS
.second-header {
padding: 1.5rem;
display: flex;
justify-content: space-between;
align-items: center;
background-color: $color-grey-dark;
font-size: 1.4rem;
font-weight: 300;
text-transform: uppercase;
a {
text-decoration: none;
color: $color-grey-light-2;
margin: 0 3rem;
}
img {
height: 3rem;
width: 6rem;
}
&__content--left,
&__content--right-login {
transition: all 0.2s;
-webkit-transition: all 0.2s;
-moz-transition: all 0.2s;
-ms-transition: all 0.2s;
-o-transition: all 0.2s;
&:hover,
&:active {
text-shadow: 0.5rem 1rem 2rem rgba(0, 0, 0, 1);
transform: translateY(-.25rem);
-webkit-transform: translateY(-.25rem);
-moz-transform: translateY(-.25rem);
-ms-transform: translateY(-.25rem);
-o-transform: translateY(-.25rem);
}
}
&__content--right {
button {
text-decoration: none;
background-color: $color-grey-dark;
padding: 1rem 2rem;
border: 1px solid $color-grey-light-2;
border-radius: 100px;
-webkit-border-radius: 100px;
-moz-border-radius: 100px;
-ms-border-radius: 100px;
-o-border-radius: 100px;
color: $color-grey-light-2;
text-transform: uppercase;
font-family: Lato;
font-size: 1.4rem;
font-weight: 300;
&:hover,
&:active {
cursor: pointer;
color: $color-grey-dark;
background-color: $color-white;
}
}
}
}
As you all can see in the second part there is no transform(only text-shadow gets applied) happening and I would really want to know whether its my code architecture that's cause of the problem or something else. If you found my codes too long please check my architecture and content--right, content--right-login elements. Thanks to the kind soul in advance for giving me a fix for this.
Related
I want to reproduce buttons like those
so I found this code
#import "https://fonts.googleapis.com/css?
family=Didact+Gothic&subset=greek";
#import "https://cdn.linearicons.com/free/1.0.0/icon-font.min.css";
body {
font-family: 'Didact Gothic', sans-serif;
letter-spacing: 1px;
font-weight: bold;
}
.side-menu {
display: flex;
flex-wrap: wrap;
max-width: 300px;
position: fixed;
right: 0;
top: 50%;
-webkit-transform: translateY(-50%);
transform: translateY(-50%);
}
.side-menu > * + * {
margin-top: 0.5em;
}
.btn {
display: flex;
color: #fff;
flex: 100%;
transition: -webkit-transform 0.2s ease-out;
transition: transform 0.2s ease-out;
transition: transform 0.2s ease-out, -webkit-transform 0.2s ease-out;
-webkit-transform: translateX(236px);
transform: translateX(236px);
text-decoration: none;
}
.btn:hover {
-webkit-transform: translateX(0px);
transform: translateX(0px);
}
.btn__icon {
flex: 0 0 32px;
padding: 1rem;
font-size: 2em;
background-color: #ff6347;
}
.btn__text {
flex: 0 0 100%;
display: flex;
align-items: center;
padding: 1rem;
background-color: #ff927e;
}
that creates the same buttons.Only problem is that when I try to recreate them to my CSS header file,I get the correct functionality but not the position and the layout (color etc).I copy the first part to the and I call it on header by the second command.
<a href="#" class="btn" > <button> register </button></a>
probably it’s something dummy I ‘m messing but I ‘m only now starting with CSS..
I cant understand the problem exactly and I haven't implement all your styles but this is the main idea
<div class="button-wrapper">
<div>Button</div>
<div>Button</div>
<div>Button</div>
</div>
.button-wrapper {
position: fixed;
right: 0;
top: 50%;
transform: translateY(-50%)
}
.button-wrapper > div {
background : orange;
padding: .4rem;
margin-bottom: 5px;
transform: translateX(50%);
transition: transform 0.2s ease-out;
}
.button-wrapper > div:hover {
transform: translate(0%)
}
I'm kind of new to CSS and HTML, but I'm attempting to code a website for my time spent in China. Currently, I'm facing the issue of aligning a button with my other contact reference icons and having it scroll properly with the page. I found some CSS format for a button I really liked online, but I'm having some trouble formatting it to be the same height, and centering it on the same horizontal midpoint as my other icons. I tried adjusting the margins, but to no avail. I've found that when adjusting the position, it just makes the scaling a bit difficult. I was wondering if I could get some help with this. Thanks! I will include a js fiddle with the code.
HTML & CSS:
.Social {
margin-top: 1%;
margin-left: 29.3%;
}
.Pop {
margin-left: 0.8%;
margin-right: 0.8%;
width: 6%;
transition: all .3s ease;
-moz-transition: all .3 ease;
-ms-transition: all .3s ease;
-webkit-transition: all .3s ease;
-o-transition: all .3s ease;
}
.Pop:hover {
-moz-transform: scale(1.1);
-webkit-transform: scale(1.1);
-o-transform: scale(1.1);
-ms-transform: scale(1.1);
transform: scale(1.1);
-ms-filter: "progid:DXImageTransform.Microsoft.Matrix(M11=1.5, M12=0, M21=0, M22=1.5, SizingMethod='auto expand')";
filter: progid:DXImageTransform.Microsoft.Matrix(M11=1.5, M12=0, M21=0, M22=1.5, SizingMethod='auto expand');
}
.button {
background-color: #4CAF50;
/* Green */
border: none;
color: white;
margin-left: 2%;
padding: 1% 4%;
text-align: center;
text-decoration: none;
display: inline-block;
font-size: 80%;
font-family: "eraslight";
-webkit-transition-duration: 0.4s;
/* Safari */
transition-duration: 0.4s;
cursor: pointer;
}
.button5 {
background-color: white;
color: black;
border: 2px solid #555555;
}
.button5:hover {
background-color: #555555;
color: white;
}
<div class="Social">
<img alt="snap circle" class="Pop" src="https://image.ibb.co/cHB5SU/SnapPop.png">
<img alt="Insta circle" class="Pop" src="https://image.ibb.co/eOtkSU/InstaPop.png">
<img alt="Wechat circle" class="Pop" src="https://image.ibb.co/dppEMp/WePop.png">
<img alt="Linkedin circle" class="Pop" src="https://image.ibb.co/effAu9/Linkedin_Pop.png">
<img alt="Gmail circle" class="Pop" src="https://image.ibb.co/movbZ9/GmailPop.png">
<button class="button button5"><h2>Résumé</h2></button>
</div>
You can set a height on the containing div and allow children to inherit it. Add display: flex; and align-items: center; to the container like this:
.Social {
display: flex;
align-items: center;
height: 40px;
margin-top: 1%;
margin-left: 29.3%;
}
.Social img, .Social button {
display: inline-block;
width: auto;
height: inherit;
}
.Pop {
margin-left: 0.8%;
margin-right: 0.8%;
width: 6%;
transition: all .3s ease;
-moz-transition: all .3 ease;
-ms-transition: all .3s ease;
-webkit-transition: all .3s ease;
-o-transition: all .3s ease;
}
.Pop:hover {
-moz-transform: scale(1.1);
-webkit-transform: scale(1.1);
-o-transform: scale(1.1);
-ms-transform: scale(1.1);
transform: scale(1.1);
-ms-filter: "progid:DXImageTransform.Microsoft.Matrix(M11=1.5, M12=0, M21=0, M22=1.5, SizingMethod='auto expand')";
filter: progid:DXImageTransform.Microsoft.Matrix(M11=1.5, M12=0, M21=0, M22=1.5, SizingMethod='auto expand');
}
.button {
background-color: #4CAF50;
/* Green */
border: none;
color: white;
margin-left: 2%;
padding: 0 4%;
text-align: center;
text-decoration: none;
display: inline-block;
font-size: 80%;
font-family: "eraslight";
-webkit-transition-duration: 0.4s;
/* Safari */
transition-duration: 0.4s;
cursor: pointer;
}
.button5 {
background-color: white;
color: black;
border: 2px solid #555555;
}
.button5:hover {
background-color: #555555;
color: white;
}
<div class="Social">
<img alt="snap circle" class="Pop" src="https://image.ibb.co/cHB5SU/SnapPop.png">
<img alt="Insta circle" class="Pop" src="https://image.ibb.co/eOtkSU/InstaPop.png">
<img alt="Wechat circle" class="Pop" src="https://image.ibb.co/dppEMp/WePop.png">
<img alt="Linkedin circle" class="Pop" src="https://image.ibb.co/effAu9/Linkedin_Pop.png">
<img alt="Gmail circle" class="Pop" src="https://image.ibb.co/movbZ9/GmailPop.png">
<button class="button button5">Résumé</button>
</div>
Your HTML remains the same except I removed the <h2> tags from your <button> text; it is unnecessary and affects vertical alignment in some browsers.
All your elements are being displayed inline; to adjust how inline elements are lined up vertically you should set the vertical-align property.
img {
...
vertical-align: middle;
}
.button {
...
vertical-align: middle;
}
To adjust your .button to be a better visual fit for its neighbours, you may find removing the h2 tags, setting your padding to a fixed size and setting your font to a fixed size to be a help.
.button {
font-size: 14px;
padding: 5px;
...
}
<button class="button button5">Résumé</button>
I am trying to make a responsive landing page that changes it's format for mobile devices. I have tried using both flex box and bootstrap's grid system to do this but I guess I'm doing something wrong. I want the three parts of the heading to occupy a separate line on mobile devices while all being on the same line for larger devices and the same for the three buttons. At the moment this is working when I simply minimize the window on my laptop but it is not working when I view the page on my mobile devices.
I also want the instagram button to stay centered at the bottom on all devices.
My html looks like this:
<!DOCTYPE html>
<html>
<head>
<title>RBM Makeup</title>
<link rel="stylesheet" type="text/css" href="style.css">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css">
</head>
<body>
<section class="intro">
<div class="inner">
<div class="content">
<h1> <span id="Rebecca"> Rebecca </span> <span id="Bermingham"> Bermingham </span> <span id="Maguire"> Maguire</span></h1>
<div class="container">
Portfolio
Contact
About Me
</div>
</div>
</div>
<div class="footer">
<div class="instagram">
</div>
</div>
</section>
</body>
</html>
And my CSS looks like this:
/These are the general bits/
:root{
--maroon: #85144b;
--fuchsia: #f012be;
--purple: #b10dc9;
--lime: #01ff70;
--black: #000000;
--white: #ffffff;
--blue: #89cff0;
}
#font-face{
font-family: 'milkshake';
src:url(fonts/Milkshake.ttf);
font-style: normal;
font-weight: 100;
}
#font-face{
font-family: 'amble';
src:url(fonts/Amble-Regular.ttf);
font-style: normal;
font-weight: 100;
}
html, body{
margin: 0;
padding: 0;
height: 100%;
width: 100%;
}
/**/
.intro{
height:100vh;
width:100%;
margin-right: 20px;
margin: auto;
background: url("images/eye.jpg") no-repeat 50% 50%;
display: table;
top: 0;
background-size: cover;
opacity: 0.92;
}
.intro .inner{
display: table-cell;
vertical-align: middle;
width: 100%;
max-width: none;
}
.content h1{
color: var(--blue);
font-size: 350%;
margin: 0px 0px;
text-align: center;
text-transform: bold;
font-family: milkshake;
font-weight: 100;
}
#Rebecca{
color: var(--purple);
}
#Bermingham{
color: var(--lime);
}
.container{
display: flex;
flex-wrap: wrap;
overflow: hidden;
justify-content: center;
margin-top: 50px;
}
.container a{
border-radius: 9px;
color: var(--black);
font-size: 135%;
padding: 10px 20px;
text-decoration: none;
border: solid var(--black) 5px;
text-transform: uppercase;
margin: 20px 40px;
font-family: amble;
font-weight: 150;
font-style: bold;
}
/*Hover effects for 3 buttons*/
/*Left Button*/
.hvr-sweep-to-right {
display: inline-block;
vertical-align: middle;
-webkit-transform: perspective(1px) translateZ(0);
transform: perspective(1px) translateZ(0);
box-shadow: 0 0 1px transparent;
position: relative;
-webkit-transition-property: color;
transition-property: color;
-webkit-transition-duration: 0.3s;
transition-duration: 0.3s;
}
.hvr-sweep-to-right:before {
content: "";
position: absolute;
z-index: -1;
top: 0;
left: 0;
right: 0;
bottom: 0;
background: var(--purple);
-webkit-transform: scaleX(0);
transform: scaleX(0);
-webkit-transform-origin: 0 50%;
transform-origin: 0 50%;
-webkit-transition-property: transform;
transition-property: transform;
-webkit-transition-duration: 0.3s;
transition-duration: 0.3s;
-webkit-transition-timing-function: ease-out;
transition-timing-function: ease-out;
}
.hvr-sweep-to-right:hover, .hvr-sweep-to-right:focus, .hvr-sweep-to-right:active {
color: var(--white);
}
.hvr-sweep-to-right:hover:before, .hvr-sweep-to-right:focus:before, .hvr-sweep-to-right:active:before {
-webkit-transform: scaleX(1);
transform: scaleX(1);
}
/*Middle Button*/
.hvr-sweep-to-bottom {
display: inline-block;
vertical-align: middle;
-webkit-transform: perspective(1px) translateZ(0);
transform: perspective(1px) translateZ(0);
box-shadow: 0 0 1px transparent;
position: relative;
-webkit-transition-property: color;
transition-property: color;
-webkit-transition-duration: 0.3s;
transition-duration: 0.3s;
}
.hvr-sweep-to-bottom:before {
content: "";
position: absolute;
z-index: -1;
top: 0;
left: 0;
right: 0;
bottom: 0;
background: var(--lime);
-webkit-transform: scaleY(0);
transform: scaleY(0);
-webkit-transform-origin: 50% 0;
transform-origin: 50% 0;
-webkit-transition-property: transform;
transition-property: transform;
-webkit-transition-duration: 0.3s;
transition-duration: 0.3s;
-webkit-transition-timing-function: ease-out;
transition-timing-function: ease-out;
}
.hvr-sweep-to-bottom:hover, .hvr-sweep-to-bottom:focus, .hvr-sweep-to-bottom:active {
color: var(--purple);
}
.hvr-sweep-to-bottom:hover:before, .hvr-sweep-to-bottom:focus:before, .hvr-sweep-to-bottom:active:before {
-webkit-transform: scaleY(1);
transform: scaleY(1);
}
/* Right Button */
.hvr-sweep-to-left {
display: inline-block;
vertical-align: middle;
-webkit-transform: perspective(1px) translateZ(0);
transform: perspective(1px) translateZ(0);
box-shadow: 0 0 1px transparent;
position: relative;
-webkit-transition-property: color;
transition-property: color;
-webkit-transition-duration: 0.3s;
transition-duration: 0.3s;
}
.hvr-sweep-to-left:before {
content: "";
position: absolute;
z-index: -1;
top: 0;
left: 0;
right: 0;
bottom: 0;
background: var(--blue);
-webkit-transform: scaleX(0);
transform: scaleX(0);
-webkit-transform-origin: 100% 50%;
transform-origin: 100% 50%;
-webkit-transition-property: transform;
transition-property: transform;
-webkit-transition-duration: 0.3s;
transition-duration: 0.3s;
-webkit-transition-timing-function: ease-out;
transition-timing-function: ease-out;
}
.hvr-sweep-to-left:hover, .hvr-sweep-to-left:focus, .hvr-sweep-to-left:active {
color: var(--black);
}
.hvr-sweep-to-left:hover:before, .hvr-sweep-to-left:focus:before, .hvr-sweep-to-left:active:before {
-webkit-transform: scaleX(1);
transform: scaleX(1);
}
/*Instagram Icon*/
.fa {
padding: 20px;
font-size: 55px;
width: 55px;
text-align: center;
text-decoration: none;
border-radius: 50%;
align-content: center;
}
.fa:hover{
opacity:0.7;
}
.fa-instagram {
background: var(--black);
color: var(--white);
}
.footer {
position: fixed;
bottom: 0;
width: 95px;
height: 100px;
left: 50%;
margin-left: calc(-95px / 2); // here
}
The current landing page can be viewed at www.rebeccabm.github.io . Any help would be greatly appreciated :)
Thanks
Each span should be set to display:block; in the particular media query used per break point. The example below should be placed in your CSS. Do note, it's best practice to start building with "Mobile First" in mind, or you'll have to reset the span for larger views.
/* Small Devices, Tablets */
#media only screen and (min-width : 768px) {
.intro span {display:block;}
}
Please use bootstrap framework either use media query css
i.e. :
For iPad
#media and(max-width:767px){
}
For iPhone or any small media devices :
#media and(max-width:480px){
}
My transition outs are not working, I am using the latest Chrome Browser and when I hover over the button, the transition in is working, however the transition out just cuts right off.
My CSS
.btn{
border-radius: 5px;
padding: 15px 25px;
font-size: 22px;
text-decoration: none;
margin: 20px;
color: #fff;
position: relative;
display: inline-block;
}
.btn:active{
transform: translate(0px, 5px);
-webkit-transform: translate(0px, 5px);
box-shadow: 0px 0px 0px 0px;
}
.blue{
background-color: #55acee;
box-shadow: 0px 5px 0px 0px #3C93D5;
}
.blue:hover{
background-color: #6FC6FF;
transition-duration: .02s;
display: inline-block;
}
}
HTML is on this JSFiddle.
You need to put the transition on the base state not the :hover then it will transition between all states.
.blue {
background-color: #55acee;
box-shadow: 0px 5px 0px 0px #3C93D5;
transition: background-color 0.2s ease-out;
}
.btn {
border-radius: 5px;
padding: 15px 25px;
font-size: 22px;
text-decoration: none;
margin: 20px;
color: #fff;
position: relative;
display: inline-block;
}
.btn:active {
transform: translate(0px, 5px);
-webkit-transform: translate(0px, 5px);
box-shadow: 0px 0px 0px 0px;
}
.blue {
background-color: #55acee;
box-shadow: 0px 5px 0px 0px #3C93D5;
transition: background-color 0.2s ease-out;
}
.blue:hover {
background-color: #6FC6FF;
display: inline-block;
}
<div id="buttons"> Blu
</div>
You are adding a transition to the :hover state, not to the actual element.
It's usually better to define a transition on the element itself, and then change properties to it's states, this way it understands that whatever the state change, it should transition from one to the other.
.btn{
transition: background-color 0.2s ease-out;
}
.btn:active{
...
}
.btn:hover{
...
}
Your just need to insert this on your btn main class
.btn{
-webkit-transition: all 0.2s ease-in-out;
-moz-transition: all 0.2s ease-in-out;
-o-transition: all 0.2s ease-in-out;
transition: all 0.2s ease-in-out;
}
So I've got a little "intro" box that I styled effects for using fontawesome icons. The effect is nice and I would like to keep it, however later down the page I have a "stats" box and I want to use the same style & effect but using normal numbers so that the number can dynamically change via a php script. Of course, whenever I use normal numbers the effect doesn't work because I styled the CSS to work with the fontawesome icons. Is there a way to make the text parse as an icon, or do I need to rewrite my css?
HTML
<!-- Statistics -->
<div class="row">
<div class="span12 centre">
<h2 class="b-title">Some Statistics</h2><br /><br />
<!--Section 1-->
<div class="stats-box stats-box1">
<div class="text-center block-box">
<div class="stats-effect-inner"> <a class="stats-effect icon-unlock icon-3x" href="#"></a> </div>
<h3 style="text-decoration: none;">Domains</h3>
<p>The number of free domains given.</p>
<br />
</div>
</div>
</div>
Relative CSS is here. Full styling CSS is in the fiddle.
/*------------ Hover Effect Stats ------- */
.stats-effect { display: inline-block; font-size: 0px; cursor: pointer; margin: 15px 30px; width: 90px; height: 90px; -moz-border-radius: 50%; -webkit-border-radius: 50%; border-radius: 50%; text-align: center; position: relative; z-index: 1; color: #fff; }
.stats-effect:after { pointer-events: none; position: absolute; width: 100%; height: 100%; -moz-border-radius: 50%; -webkit-border-radius: 50%; border-radius: 50%; content: ''; -webkit-box-sizing: content-box; -moz-box-sizing: content-box; box-sizing: content-box; }
.stats-effect:before { speak: none; font-size: 48px; line-height: 90px; font-style: normal; font-weight: normal; font-variant: normal; text-transform: none; display: block; -webkit-font-smoothing: antialiased; }
/* Effect 1 */
.stats-effect-inner .stats-effect { background: rgba(255, 255, 255, 0.1); -webkit-transition: background 0.2s, color 0.2s; -moz-transition: background 0.2s, color 0.2s; transition: background 0.2s, color 0.2s; }
.stats-effect-inner .stats-effect:after { top: -7px; left: -7px; padding: 7px; -webkit-transition: -webkit-transform 0.2s, opacity 0.2s; -webkit-transform: scale(.8); -moz-transition: -moz-transform 0.2s, opacity 0.2s; -moz-transform: scale(.8); -ms-transform: scale(.8); transition: transform 0.2s, opacity 0.2s; transform: scale(.8); opacity: 0; -moz-box-shadow: 0 0 0 4px #ffffff;/*FF 3.5+*/ -webkit-box-shadow: 0 0 0 4px #ffffff;/*Saf3-4, Chrome, iOS 4.0.2-4.2, Android 2.3+*/ -ms-filter: "progid:DXImageTransform.Microsoft.Shadow(Strength=4, Direction=90, Color=#ffffff)";/*IE 8*/ box-shadow: 0 0 0 4px #ffffff; filter: progid:DXImageTransform.Microsoft.Shadow(Strength=4, Direction=90, Color=#ffffff);/*IE 5.5-7*/
}
/* Effect */
.stats-box1:hover .stats-effect-inner .stats-effect, .stats-box2:hover .stats-effect-inner .stats-effect, .stats-box3:hover .stats-effect-inner .stats-effect { background: rgba(255, 255, 255, 1); color: #27CCC0; }
.stats-box1:hover .stats-effect-inner .stats-effect:after, .stats-box2:hover .stats-effect-inner .stats-effect:after, .stats-box3:hover .stats-effect-inner .stats-effect:after { -webkit-transform: scale(1); -moz-transform: scale(1); -ms-transform: scale(1); transform: scale(1); opacity: 1; }
/*------------ Icon Hover Effect ------- */
.stats-effect1 > img { padding: 20px; }
.stats-effect-inner1 { position: absolute; right: -33px; top: -33px; }
.stats-effect1 { background: none repeat scroll 0 0 #FFFFFF; border: 1px solid #CCCCCC; -moz-border-radius: 50%; -webkit-border-radius: 50%; border-radius: 50%; color: #FF6850; cursor: pointer; display: inline-block; font-size: 0; height: 70px; margin: 12px 21px 15px 11px; position: relative; text-align: center; width: 70px; z-index: 1; }
.stats-effect1:after { -webkit-box-sizing: content-box; -moz-box-sizing: content-box; box-sizing: content-box; -moz-border-radius: 50%; -webkit-border-radius: 50%; border-radius: 50%; content: ""; height: 100%; pointer-events: none; position: absolute; width: 100%; }
.stats-effect1:before { background: none repeat scroll 0 0 #FAFAFA; border-radius: 50% 50% 50% 50%; display: block; font-size: 48px; font-style: normal; font-variant: normal; font-weight: normal; line-height: 90px; text-transform: none; }
.stats-effect-inner1 .stats-effect { background: none repeat scroll 0 0 rgba(13, 30, 219, 0.1); transition: background 0.2s ease 0s, color 0.2s ease 0s; }
TL;DR - I want the icon within the circle in the box to be a normal text number but have the same effect when moused over.
Thanks so much for your help!
EDIT: UPDATED FIDDLE: Fiddle
EDIT: Minimized CSS: Fiddle