I'm trying to position my DIVs as below
Logo / Menu / Social
Intro-left / intro-right
backpicture
Middle-1
bottom-left / bottom right
The issue is that for the moment DIVs are displayed like this (see JSFiddle http://jsfiddle.net/A4Sn8/1/ ):
Logo / Menu
Social
backpicture
Intro-left / intro-right
Middle-1
bottom-left
bottom right
In summary, my "social" DIV is below the menu instead of on its right. Bottom-right DIV is under bottom-left instead of on its right and backpicture is before Intro-left and intro-right instead of after.
How could I fix this?
Many thanks
HTML
<div id="logo">Logo</div> <!-- End DIV Logo -->
<div id="mainmenu">
<ul>
<li>
<h5>Menu I</h5>
<ul>
<li><a title="" href="">Biography</a> </li>
<li><a title="" href="">Publications</a> </li>
</ul>
<li>
<h5>Menu 2</h5>
<ul>
<li><a title="" href="">Demo</a> </li>
<li><a title="" href="">Features</a> </li>
<li><a title="" href="">Comparison</a> </li>
</ul>
</li>
<li>
<h5>Menu 3</h5>
<ul>
<li><a title="" href="">Item 1</a> </li>
<li><a title="" href="">Item 2</a> </li>
<li><a title="" href="">Item 3</a> </li>
</ul>
</li>
<li>
<h5>Menu 4</h5>
<ul>
<li><a title="" href="">ddfd</a> </li>
<li><a title="" href="">dsfd</a> </li>
</ul>
</li>
</ul>
</div> <!-- End DIV Main Menu -->
<div id="social">Social</div>
<div id="intro-left"></div>
<div id="intro-right">
<div id="content-headline"><h1>Novitates autem si spem</h1></div> <!-- End DIV Content headline-->
<p>Novitates sit.</p>
</div>
<div id="backpicture">backpicture</div>
<div id="middle-1">Middle-1</div>
<div id="bottom-left">bottom-left</div>
<div id="bottom-right">bottom-right</div>
CSS:
#charset"UTF-8";
/* CSS Document */
Html, body {
margin: 0;
padding: 0;
height: 100%;
background: #fff;
font-family: 'Open Sans', sans-serif;
}
#logo {
position: absolute;
top: 35px;
left: 20px;
color: #000;
font-size: 20px;
}
/* mainmenu */
#mainmenu {
margin-top: 35px;
width: 100%;
padding-bottom: 10px;
overflow: hidden;
}
#mainmenu ul {
float: right;
margin: 0;
color: #000;
list-style: none;
}
#mainmenu ul li {
display: inline-block;
float: left;
width: 140px;
line-height: 20px;
}
#mainmenu>ul>li {
margin-left: 20px;
}
#mainmenu ul li a {
display: block;
text-decoration: none;
font-weight:600;
font-size: 12px;
}
#mainmenu ul li a, #mainmenu ul ul:hover li a {
color: #333;
-webkit-transition-timing-function: ease-out, ease-in, linear, ease-in-out;
-moz-transition-timing-function: ease-out, ease-in, linear, ease-in-out;
-ms-transition-timing-function: ease-out, ease-in, linear, ease-in-out;
-o-transition-timing-function: ease-out, ease-in, linear, ease-in-out;
transition-timing-function: ease-out, ease-in, linear, ease-in-out;
-webkit-transition-duration: .4s, .4s, .4s, .4s;
-moz-transition-duration: .4s, .4s, .4s, .4s;
-ms-transition-duration: .4s, .4s, .4s, .4s;
-o-transition-duration: .4s, .4s, .4s, .4s;
transition-duration: .4s, .4s, .4s, .4s;
-webkit-transition-property: all, -webkit-transform;
-moz-transition-property: all, -moz-transform;
-ms-transition-property: all, -ms-transform;
-o-transition-property: all, -o-transform;
transition-property: all, transform;
}
#mainmenu ul ul li a:hover, #mainmenu ul ul li.current-menu-item a {
color: #005EBC;
-webkit-transition-timing-function: ease-out, ease-in, linear, ease-in-out;
-moz-transition-timing-function: ease-out, ease-in, linear, ease-in-out;
-ms-transition-timing-function: ease-out, ease-in, linear, ease-in-out;
-o-transition-timing-function: ease-out, ease-in, linear, ease-in-out;
transition-timing-function: ease-out, ease-in, linear, ease-in-out;
-webkit-transition-duration: .4s, .4s, .4s, .4s;
-moz-transition-duration: .4s, .4s, .4s, .4s;
-ms-transition-duration: .4s, .4s, .4s, .4s;
-o-transition-duration: .4s, .4s, .4s, .4s;
transition-duration: .4s, .4s, .4s, .4s;
-webkit-transition-property: all, -webkit-transform;
-moz-transition-property: all, -moz-transform;
-ms-transition-property: all, -ms-transform;
-o-transition-property: all, -o-transform;
transition-property: all, transform;
}
social {
right: 10px;
Color: blue;
}
p {
color: #333;
font-weight:300;
font-size: 13px;
}
h1 {
color: #00539E;
font-size: 30px;
}
#intro-left {
float: left;
width: 35%;
}
#intro-right {
float: right;
padding-right: 50px;
width: 60%;
}
#backpicture {
height:160px;
width: 100%;
background: blue;
}
#middle-1 {
width: 980px;
background: #c81919;
display: block;
margin-left: auto;
margin-right: auto;
}
#bottom-left {
float: left;
width: 35%;
background: #5421c2;
}
#bottom-right {
float: right;
padding-right: 50px;
width: 60%;
background: #2ec4a6;
}
You are mixing CSS rules with absolute pixel sizes and percent. That is not always a good idea.
You might have this problem, because your padding-right of 50px is larger than the remaining 5% of free space.
I'm not sure what you are trying to achieve, but I guess the bottom elements should be on the same height. Try this:
#bottom-right {
float: right;
padding-right: 5%; /* you defined 50px instead! */
width: 60%;
background: #2ec4a6;
}
Sample: http://jsfiddle.net/A4Sn8/2/
For mainmenu and social to be in one line:
#social {
float:right;
margin-top: 35px;
right: 10px;
color: blue;
}
#mainmenu {
float:left;
margin-top: 35px;
width: 80%;
padding-bottom: 10px;
overflow: hidden;
}
The main issue was width:100% given to #mainmenu. This didnt allowed social block to come to its right. Moreover specifying float:left in #mainmenu and float:right in social did the trick.
One more thing, your social in css didnt had #.
Related
i'm having difficulties animating a menu item,
fiddle
What i need is that, when a user clicks the menu item the bar that appears on hover to switch side with an animation.
So far i have 2 bars with the following code, the :after starting were the :before ends, but i can't make the :before bar to finish were the :after start's on click (:active and :focus)
Does anyone has some idea how to do this? i try'ed jquery but with no success.
HTML:
<a class="item" href="http://www.google.com" title=" competências" target="_blank">
<span class="nav-item">Competências</span>
</a>
<a class="item" href="" title=" Industrias" target="">
<span class="nav-item">Industrias</span>
</a>
<a href="" title=" Soluções" target="">
<span class="nav-item">Soluções</span>
</a>
<a class="item" href="" title=" About" target="">
<span class="nav-item">About</span>
</a>
<a class="item" href="" title=" Parceiros" target="">
<span class="nav-item">Parceiros</span>
</a>
<a class="item" href="" title=" Pessoas" target="">
<span class="nav-item">Pessoas</span>
</a>
<a class="item" href="" title=" Contactos" target="">
<span class="nav-item">Contactos</span>
</a>
<span class="skew-bar"></span>
<a class="item" href="" title=" Blog" target="">
<span class="nav-item">Blog</span>
</a>
<a class="item" href="" title=" Notícias" target="">
<span class="nav-item">Notícias</span>
</a>
<a class="item" href="" title=" Recursos" target="">
<span class="nav-item">Recursos</span>
</a>
<span class="skew-bar"></span>
<a class="item" href="" title=" English" target="">
<span class="nav-item">EN</span>
</a>
</nav>
CSS:
nav a {
font-family: 'Roboto',sans-serif;
font-size: 1em;
font-weight: 300;
text-decoration: none;
}
/*BEFORE ON HOVER*/
nav a span:before {
border-bottom: 3px solid black;
display: block;
position: relative;
z-index: 2;
left: 0%;
transform: translateY(22px);
width: 1px;
background: #000;
overflow: hidden;
content: '';
filter: progid:DXImageTransform.Microsoft.Alpha(Opacity=0);
opacity: 0;
-moz-transition: width 0.3s cubic-bezier(0.77, 0, 0.175, 1), opacity 0.1s linear 0.3s;
-o-transition: width 0.3s cubic-bezier(0.77, 0, 0.175, 1), opacity 0.1s linear 0.3s;
-webkit-transition: width 0.3s cubic-bezier(0.77, 0, 0.175, 1), opacity 0.1s linear;
-webkit-transition-delay: 0s, 0.3s;
transition: width 0.3s cubic-bezier(0.77, 0, 0.175, 1), opacity 0.1s linear 0.3s;
}
nav a span:hover::before {
width: 50%;
filter: progid:DXImageTransform.Microsoft.Alpha(enabled=false);
opacity: 1;
-moz-transition-delay: 0s;
-o-transition-delay: 0s;
-webkit-transition-delay: 0s;
transition-delay: 0s;
position:relative;
overflow: hidden;
}
/*BEFORE ON CLICK FOCUS*/
nav a span:after {
border-bottom: 3px solid black;
display: block;
position: relative;
z-index: 2;
left: 50%;
transform: translateY(-3px);
width: 1px;
background: #000;
overflow: hidden;
content: '';
filter: progid:DXImageTransform.Microsoft.Alpha(Opacity=0);
opacity: 0;
-moz-transition: width 0.3s cubic-bezier(0.77, 0, 0.175, 1), opacity 0.1s linear 0.3s;
-o-transition: width 0.3s cubic-bezier(0.77, 0, 0.175, 1), opacity 0.1s linear 0.3s;
-webkit-transition: width 0.3s cubic-bezier(0.77, 0, 0.175, 1), opacity 0.1s linear;
-webkit-transition-delay: 0s, 0.3s;
transition: width 0.3s cubic-bezier(0.77, 0, 0.175, 1), opacity 0.1s linear 0.3s;
}
nav a span:active::after,nav a span:focus::after {
width: 50%;
filter: progid:DXImageTransform.Microsoft.Alpha(enabled=false);
opacity: 1;
-moz-transition-delay: 0s;
-o-transition-delay: 0s;
-webkit-transition-delay: 0s;
transition-delay: 0s;
position:relative;
overflow: hidden;
}
The focus is in the .item not in the span, so your selector should be like
nav a:focus span::after
Here you have the code working https://jsfiddle.net/Lc9gp8fb/9/
-- EDIT --
With this update you can close :before to the right.
I set to nav a span:before
margin-right: 50%;
float: right;
To keep it in the middle, and when hover it I set
float: left;
So, when it is hovered it will have float: left; and the animation will be from left to right, and when it is not hovered the animation will be also from left to right because it will have float: right;
https://jsfiddle.net/Lc9gp8fb/15/
The problem is that the :active state does not persist after click in pure css, you will need javascript to end the animation.
Yo shold try to position absolutly the pseudoelements:
nav a {
font-family: 'Roboto',sans-serif;
font-size: 1em;
font-weight: 300;
text-decoration: none;
position: relative
}
nav a span:before {
content:'';
display:block;
position:abolute;
top:100%;
height:3px;
background-color:#000000;
transition: all .3s cubic-bezier(0.77, 0, 0.175, 1);
-webkit-transition: all .3s cubic-bezier(0.77, 0, 0.175, 1);
-moz-transition: all .3s cubic-bezier(0.77, 0, 0.175, 1);
-o-transition: all .3s cubic-bezier(0.77, 0, 0.175, 1);
}
nav a span:before {
left: 0%;
right: 100%;
}
nav a:hover span:before {
right: 50%;
}
nav a span:after {
left: 100%;
right: 0%;
}
nav a:active span:after {
left: 50%;
}
This will make a 100% width line on clicking and 50% on hover. Is this waht you are looking for?
I have 2 examples below which display 4 links and hovering upon them display border bottom with ease effect.
In the Example 1 the border-bottom display from top-bottom. I have tried revering with the padding property which is there in Example 2, Its not consistent across the browsers and it does not works properly.
Example 1: transition default functionality (transition from top-bottom)
<!DOCTYPE html><html class=''>
<head>
<style class="cp-pen-styles">
body {
padding: 50px;
}
a, a:hover {
text-decoration: none;
}
li {
position: relative;
padding-bottom: 3px;
margin-right: 10px;
display: inline;
}
li a {
border-bottom: 0em solid transperant;
color: #777;
}
li:focus > a,
li:hover > a,
li:active > a {
border-bottom: 0.313em solid #206E9F;
transition: border-bottom .2s ease-in-out;
-webkit-transition: border-bottom .2s ease-in-out;
-moz-transition: border-bottom .2s ease-in-out;
-ms-transition: border-bottom .2s ease-in-out;
}
|
</style>
</head>
<body>
<ul>
<li>HOME</li>
<li>PAGE</li>
<li>ABOUT US</li>
<li>CONTACT US</li>
</ul>
</body>
</html>
Example 2: transition from bottom-top (using padding - Compatibility issue with IE browser)
<!DOCTYPE html><html class=''>
<head>
<style class="cp-pen-styles">
body {
padding: 50px;
}
a, a:hover {
text-decoration: none;
}
li {
position: relative;
padding-bottom: 3px;
margin-right: 10px;
display: inline;
}
li a {
color: #777;
padding-bottom:0.4em;
border-bottom: 0em solid transperant;
}
li:focus > a,
li:hover > a,
li:active > a {
padding-bottom:0em;
border-bottom: 0.313em solid #206E9F;
transition: all .2s ease-in;
-webkit-transition: all .2s ease-in;
-moz-transition: all .2s ease-in;
-ms-transition: all .2s ease-in;
}
</style></head><body>
<ul>
<li>HOME</li>
<li>PAGE</li>
<li>ABOUT US</li>
<li>CONTACT US</li>
</ul>
</body></html>
How to make CSS3 transition working for border-bottom property which starts from bottom to top.
You can simulate your desired outcome by using :after or :before pseudo elements. This way you'll have much greater control over the desired effect (like adding various transforms).
body {
padding: 50px;
}
a {
text-decoration: none;
}
li {
display: inline;
margin-right: 10px;
}
li a {
border-bottom: 0 solid transparent;
color: #777;
display: inline-block;
padding-bottom: 3px;
position: relative;
}
li a > .fancy-line {
background-color: transparent;
content: "";
display: block;
height: 0;
position: absolute;
bottom: 0;
left: 0;
right: 0;
-o-transition: background-color 0.2s ease-in-out, height 0.2s ease-in-out;
-ms-transition: background-color 0.2s ease-in-out, height 0.2s ease-in-out;
-moz-transition: background-color 0.2s ease-in-out, height 0.2s ease-in-out;
-webkit-transition: background-color 0.2s ease-in-out, height 0.2s ease-in-out;
transition: background-color 0.2s ease-in-out, height 0.2s ease-in-out;
}
li a:hover > .fancy-line {
background-color: #206E9F;
height: 3px;
}
<ul>
<li>HOME <span class="fancy-line"></span></li>
<li>PAGE <span class="fancy-line"></span></li>
<li>ABOUT US <span class="fancy-line"></span></li>
<li>CONTACT US <span class="fancy-line"></span></li>
</ul>
You can do this with a pseudo-element and a transform rather than a border.
body {
padding: 50px;
}
a,
a:hover {
text-decoration: none;
}
li {
position: relative;
padding-bottom: 3px;
margin-right: 10px;
display: inline;
}
li a {
border-bottom: 0em solid transperant;
color: #777;
position: relative;
}
li > a::after,
li > a::after,
li > a::after {
content: '';
position: absolute;
width: 100%;
height: .313em;
background: #206E9F;
top: 100%;
left: 0;
transform-origin: center bottom;
transform: scaleY(0);
transition: transform .2s ease-in-out;
}
li:focus > a::after,
li:hover > a::after,
li:active > a::after {
transform: scaleY(1);
}
<ul>
<li>HOME
</li>
<li>PAGE
</li>
<li>ABOUT US
</li>
<li>CONTACT US
</li>
</ul>
I have a CSS accordion menu which works 100% correctly. However I want to float the div left and when I add Float:Left to the CSS, the accordion stops working. Any ideas where I'm going wrong? I tried adding Clear:both to #menu_box but no success.
CSS:
#menu_box {
float: left;
}
.menu {
margin: 0;
padding: 0;
width: 200px;
}
.menu li {
list-style: none;
}
.menu li a {
display: table;
margin-top: 1px;
padding: 14px 10px;
width: 100%;
background: #337D88;
text-decoration: none;
text-align: left;
vertical-align: middle;
color: #fff;
overflow: hidden;
-webkit-transition-property: background;
-webkit-transition-duration: 0.4s;
-webkit-transition-timing-function: ease-out;
transition-property: background;
transition-duration: 0.4s;
transition-timing-function: ease-out;
}
.menu > li:first-child a {
margin-top: 0;
}
.menu li a:hover {
background: #4AADBB;
-webkit-transition-property: background;
-webkit-transition-duration: 0.2s;
-webkit-transition-timing-function: ease-out;
transition-property: background;
transition-duration: 0.2s;
transition-timing-function: ease-out;
}
.menu li ul {
margin: 0;
padding: 0;
}
.menu li li a {
display: block;
margin-top: 0;
padding: 0 10px;
height: 0;
background: #C6DDD9;
color: #1F3D39;
-webkit-transition-property: all;
-webkit-transition-duration: 0.5s;
-webkit-transition-timing-function: ease-out;
transition-property: all;
transition-duration: 0.5s;
transition-timing-function: ease-out;
}
.menu > li:hover li a {
display: table;
margin-top: 1px;
padding: 10px;
width: 100%;
height: 1em;
-webkit-transition-property: all;
-webkit-transition-duration: 0.3s;
-webkit-transition-timing-function: ease-out;
transition-property: all;
transition-duration: 0.3s;
transition-timing-function: ease-out;
}
.menu > li:hover li a:hover {
background: #A4CAC8;
-webkit-transition-property: background;
-webkit-transition-duration: 0.2s;
-webkit-transition-timing-function: ease-out;
transition-property: background;
transition-duration: 0.2s;
transition-timing-function: ease-out;
}
HTML:
<nav id="menu_box" style="clear:both;">
<ul class="menu">
<li> General
<ul>
<li>Home</li>
<li>Update Details</li>
<li>Change Password</li>
</ul>
</li>
<li> Logs
<ul>
<li>EasyJet Booking Log</li>
<li>Invoice Log</li>
<li>Price Match Log</li>
<li>TID Log</li>
<li>Transavia Booking Log</li>
<li>Villa Booking Log</li>
</ul>
</li>
</ul>
</nav>
Fiddle.
set "width: auto;" to parent "" .menu i.e., .menu {
margin: 0;
padding: 0;
width: auto;} 2. Add separate class for parent li i.e, General and Logs .parent{float: left;
display: inline-block;}
I'm create a vertical dropdown navigation menu with folding submenus.
HTML:
<h2>Navigation dropdown with unfold effect</h2>
<ul class="navigation">
<a class="main" href="#url">Menu 1</a>
<li class="n1">item #1</li>
<li class="n2">item #2</li>
<li class="n3">item #3</li>
<li class="n4">item #4</li>
<li class="n5">item #5</li>
</ul>
<ul class="navigation">
<a class="main" href="#url">Menu 2</a>
<li class="n1">item #1</li>
<li class="n2">item #2</li>
<li class="n3">item #3</li>
<li class="n4">item #4</li>
</ul>
CSS:
.navigation {
list-style: none;
padding: 0;
width: 250px;
height: 40px;
margin: 5px auto;
background: #95C11F;
position: relative;
z-index: 100;
}
.navigation, .navigation a.main {
border-radius: 4px;
-webkit-border-radius: 4px;
-moz-border-radius: 4px;
}
.navigation:hover, .navigation:hover a.main {
border-radius: 4px 4px 0 0;
-webkit-border-radius: 4px 4px 0 0;
-moz-border-radius: 4px 4px 0 0;
}
.navigation a.main {
display: block;
height: 40px;
font: bold 15px/40px arial, sans-serif;
text-align: center;
text-decoration: none;
color: #FFF;
-webkit-transition: 0.2s ease-in-out;
-o-transition: 0.2s ease-in-out;
transition: 0.2s ease-in-out;
position: relative;
z-index: 100;
}
.navigation:hover a.main {
color: rgba(255,255,255,0.6);
background: rgba(0,0,0,0.04);
}
.navigation li {
width: 250px;
height: 40px;
background: #F7F7F7;
font: normal 12px/40px arial, sans-serif !important;
color: #999;
text-align: center;
margin: 0;
-webkit-transform-origin: 50% 0%;
-o-transform-origin: 50% 0%;
transform-origin: 50% 0%;
-webkit-transform: perspective(350px) rotateX(-90deg);
-o-transform: perspective(350px) rotateX(-90deg);
transform: perspective(350px) rotateX(-90deg);
box-shadow: 0px 2px 10px rgba(0,0,0,0.05);
-webkit-box-shadow: 0px 2px 10px rgba(0,0,0,0.05);
-moz-box-shadow: 0px 2px 10px rgba(0,0,0,0.05);
}
.navigation li:nth-child(even) { background: #F5F5F5; }
.navigation li:nth-child(odd) { background: #EFEFEF; }
.navigation li.n1 {
-webkit-transition: 0.2s linear 0.8s;
-o-transition: 0.2s linear 0.8s;
transition: 0.2s linear 0.8s;
}
.navigation li.n2 {
-webkit-transition: 0.2s linear 0.6s;
-o-transition: 0.2s linear 0.6s;
transition: 0.2s linear 0.6s;
}
.navigation li.n3 {
-webkit-transition: 0.2s linear 0.4s;
-o-transition: 0.2s linear 0.4s;
transition: 0.2s linear 0.4s;
}
.navigation li.n4 {
-webkit-transition:0.2s linear 0.2s;
-o-transition:0.2s linear 0.2s;
transition:0.2s linear 0.2s;
}
.navigation li.n5 {
border-radius: 0px 0px 4px 4px;
-webkit-transition: 0.2s linear 0s;
-o-transition: 0.2s linear 0s;
transition: 0.2s linear 0s;
}
.navigation:hover li {
-webkit-transform: perspective(350px) rotateX(0deg);
-o-transform: perspective(350px) rotateX(0deg);
transform: perspective(350px) rotateX(0deg);
-webkit-transition:0.2s linear 0s;
-o-transition:0.2s linear 0s;
transition:0.2s linear 0s;
}
.navigation:hover .n2 {
-webkit-transition-delay: 0.2s;
-o-transition-delay: 0.2s;
transition-delay: 0.2s;
}
.navigation:hover .n3 {
-webkit-transition-delay: 0.4s;
-o-transition-delay: 0.4s;
transition-delay: 0.4s;
}
.navigation:hover .n4 {
transition-delay: 0.6s;
-o-transition-delay: 0.6s;
transition-delay: 0.6s;
}
.navigation:hover .n5 {
-webkit-transition-delay: 0.8s;
-o-transition-delay: 0.8s;
transition-delay: 0.8s;
}
http://jsfiddle.net/2Q6WR/1/
Is there any way to float the second submenu to the end of the previous expanded menu?
You can change your menu structure. Example here http://jsfiddle.net/2e5YQ/
.menu {
list-style:none;}
.menu li {
position:relative;}
.menu li:hover .drop-down {
left: 0px;
position:relative;
}
.drop-down {
left: -9999px;
position:absolute;
}
<ul class="menu">
<li>Menu 1
<ul class="drop-down">
<li>One</li>
<li>Two</li>
<li>Three</li>
</ul>
</li>
<li>Menu 2
<ul class="drop-down">
<li>One</li>
<li>Two</li>
<li>Three</li>
</ul>
</li>
But this type of menu is not very usefull because when you move mouse down under drop-down trying click to second element of main men drop-down is closing and and second element of menu go up that is very uncomfortably.
In Chrome and Safari, the text in this code (http://codepen.io/igdaloff/pen/cgCFt) wiggles subtly when hovered. I'd like the text to remain stable throughout the transition.
I've tried several alternative methods to accomplish this same effect (explained in this post), but the wiggle remains.
I need the text to remain vertically centered and the content to be completely fluid (percentages only). As long as those requirements are true, I'm open to any solutions. I'm using the most recent browser versions.
Thanks in advance.
HTML
<div class="work-home">
<ul>
<li>
<a href="">
<img src="..." />
<h4>Goats</h4>
</a>
</li>
</ul>
</div>
CSS
.work-home {
text-align: center;
}
.work-home li {
display: inline-block;
position: relative;
margin: 0 0 2em;
width: 100%;
}
.work-home li:hover a:before {
opacity: 1;
top: 5%;
left: 5%;
right: 5%;
bottom:5%;
}
.work-home li:hover h4 {
opacity:1;
}
.work-home img {
width: 100%;
-webkit-transition: all 0.1s ease;
-moz-transition: all 0.1s ease;
-o-transition: all 0.1s ease;
transition: all 0.1s ease;
}
.work-home a:before {
content:"";
display:block;
opacity: 0;
position: absolute;
margin: 0;
top:0;
right:0;
left:0;
bottom:0;
background-color: rgba(0, 160, 227, 0.88);
-webkit-transition: all linear .3s;
-moz-transition: all linear .3s;
-ms-transition: all linear .3s;
transition: all linear .3s;
}
.work-home h4 {
display: block;
padding: 0;
margin:0;
font-family: helvetica, sans-serif;
font-size: 4em;
color: #ffffff;
position:absolute;
top:50%;
margin-top:-.8em;
text-align:center;
width:100%;
z-index:1;
opacity:0;
-webkit-transition: all linear .3s;
-moz-transition: all linear .3s;
-ms-transition: all linear .3s;
transition: all linear .3s;
}