Am having a struggle finding a working solution to solve the invisible padding on image tabs that are rounded.
I have tried using border radius on the a tags, including the div but nothing works.
JSFiddle
Also, if anyone can help me figure out how to vertical align the images... That'd be highly appreciated.
HTML:
<div class="linksbar">
<div class="logo"><img src="images/logo2.png"></div>
<div class="logo2"><img src="images/logo.png"></div>
<div class="tabs">
<nav><ul style="min-width:90%;">
<li><img src="images/b_home.png"></li>
<li><img src="images/g_portfolio.png"></li>
<li><img src="images/g_grades.png"></li>
<li><img src="images/g_school.png"></li>
</ul></nav>
</div>
</div>
CSS:
body{
margin:0 !important;
overflow-y: scroll;
}
h2, h3, h4{
margin: 0;
}
.okbar{
width:100%;
background-color:black;
color:black;
height:25px;
min-width:90%;
}
.okbarlinks li{
list-style-type:none;
display:inline;
padding:0px 10px 0px 10px;
float:right;
}
.okbarul {
padding:3px;
}
.okbarlinks a{
font-weight:bold;
font-family:Arial, Helvetica, sans-serif;
font-size:15px;
text-decoration:none;
color:#8a8a8a;
padding:0px;
transition:all 1s ease;
-webkit-transition-delay:all .5s ease;
-moz-transition-delay:all .5s ease;
-ms-transition-delay:all .5s ease;
-o-transition-delay:all .5s ease;
position:static;
}
.okbarlinks a:hover{
color:#454545;
}
.whitestrip{
width:100%;
height:1px;
background-color:white;
color:white;
text-align:center;
}
.linksbar{
background: url('images/blacktabbar.jpg');
background-color:black;
width:100%;
height:102px;
}
.logo{
height:102px;
margin-left:5%;
width:68px;
background-repeat:no-repeat;
vertical-align:middle;
background-position: center center;
float:left;
display:block;
border-radius:15px;
}
.logo2{
height:102px;
width:200px;
padding-left:30px;
background-repeat:no-repeat;
vertical-align:middle;
background-position: center;
float:left;
display:block;
border-radius:15px;
}
.bluebody{
background: url('images/bluebar.jpg');
width:100%;
height:200px;
margin-top:1px;
padding:0;
}
.tabs ul{
margin:0;
}
.tabs li{
list-style-type:none;
display:inline;
min-width:90%;
}
.tabs a{
margin-left:10px;
text-decoration:none;
}
.tabs{
position:absolute;
text-align:center;
width:100%;
}
.bluebodyheaderfont{
font-size:22px;
font-family:'Helvetica Neue', Helvetica, Arial, 'lucida grande',tahoma,verdana,arial,sans-serif;
}
Related
so at first i was just doing a section and aside, with footer at bottom. no problem, they were where i wanted, now i want to add another
so i want the yellow bit which is the article to be centered below the achievements and favorites section, but above footer. i've been messing around with positions, clear, float, margins and i'm losing my sanity for this assignment that's due next week. So far all i've managed to achieve is either putting it behind or on top of the section and article.
please help.
keep in mind: i have to have a liquid page layout
body{
background:white;
margin:0;
font-family:arial;
margin-left:0;
margin-right:0;
}
#typeAbout{
font-family:'Fira Mono', monospace;
text-align:center;
position:relative;
color:black;
font-size:40px;
margin:0.5%;
width:max-content;/*this is interefering with text alignment for some reason*/
}
#typeAbout::before,
#typeAbout::after{
content:"";
position:absolute;
top:0;
right:0;
bottom:0;
left:0;
}
#typeAbout::before{
background:white;
animation:typewriter 2s steps(11) 500ms forwards;/*steps stand for letter characters*/
}
#typeAbout::after{
width:0.125em;
background:black;
animation:typewriter 2s steps(11) 500ms forwards, blink 500ms steps(11) infinite;
}
#keyframes typewriter{
to{
left:100%;
}
}
#keyframes blink{
to{
background:transparent;
}
}
.navbar ul{
top:0;
list-style:none;
text-align:center;
background:purple;
margin:0;
margin-top:0;
padding:0.5%;
box-shadow:0 0 40px 0;
}
.navbar li{
display:inline-block;
}
.navbar a{
text-decoration:none;
text-align:center;
color:black;
width:100px;
display:block;
padding:10% 10%;
text-transform:uppercase;
}
.navbar a:hover{
background:lightgray;
}
section{
font-family:'Fira Mono', monospace;
position:absolute;
float:left;
width:28%;
height:50%;
margin-top:1%;
margin-bottom:5%;
margin-left:20%;
padding-left:1%;
background-color:white;
border-radius: 10px;
box-shadow:2px 2px 2px 2px lightgray;
}
aside{
float:right;
width:25%;
height:100%;
margin-top:1%;
margin-right:20%;
padding-left:1%;
background-color:lightgray;
border-radius: 10px;
box-shadow:2px 2px 2px 2px lightgray;
}
article{
position:inital;
background:yellow;
clear:both;
}
footer{
position: absolute;
bottom:0;
clear:both;
width:100%;
height:10%;
background-color:red;
}
Maybe you can try something like this. You didn't provide all your code so I just made something similar with your code. Let me know
body{
background:white;
margin:0;
font-family:arial;
margin-left:0;
margin-right:0;
}
#typeAbout{
font-family:'Fira Mono', monospace;
text-align:center;
position:relative;
color:black;
font-size:40px;
margin:0.5%;
width:max-content;/*this is interefering with text alignment for some reason*/
}
#typeAbout::before,
#typeAbout::after{
content:"";
position:absolute;
top:0;
right:0;
bottom:0;
left:0;
}
#typeAbout::before{
background:white;
animation:typewriter 2s steps(11) 500ms forwards;/*steps stand for letter characters*/
}
#typeAbout::after{
width:0.125em;
background:black;
animation:typewriter 2s steps(11) 500ms forwards, blink 500ms steps(11) infinite;
}
#keyframes typewriter{
to{
left:100%;
}
}
#keyframes blink{
to{
background:transparent;
}
}
.navbar ul{
top:0;
list-style:none;
text-align:center;
background:purple;
margin:0;
margin-top:0;
padding:0.5%;
box-shadow:0 0 40px 0;
}
.navbar li{
display:inline-block;
}
.navbar a{
text-decoration:none;
text-align:center;
color:black;
width:100px;
display:block;
padding:10%;
text-transform:uppercase;
}
.navbar a:hover{
background:lightgray;
}
.wrapper{
display: flex;
justify-content: space-evenly;
}
section{
font-family:'Fira Mono', monospace;
width:100%;
height:auto;
margin-top:1%;
margin-bottom:5%;
margin-left:20%;
padding-left:1%;
background-color:white;
border-radius: 10px;
box-shadow:2px 2px 2px 2px lightgray;
}
aside{
width:100%;
height:100%;
margin-top:1%;
margin-right:20%;
padding-left:1%;
background-color:lightgray;
border-radius: 10px;
box-shadow:2px 2px 2px 2px lightgray;
}
article{
position:inital;
background:yellow;
clear:both;
}
footer{
position: absolute;
bottom:0;
clear:both;
width:100%;
height:10%;
background-color:red;
}
<nav class="navbar">
<ul>
<li>HOME</li>
<li>ORIGIN</li>
<li>ABOUT</li>
<li>STUDY</li>
<li>ANIMATION</li>
</ul>
</nav>
<div class="wrapper">
<div>
<section>This is the achievements</section>
</div>
<div>
<article> This is your article</article>
</div>
<div>
<aside> This is your Favourite</aside>
</div>
</div>
I have a header set up as fixed, so that it will always be at the top of the page when scrolling, however when the browser window is re-sized, the full header doesn't show. It is fixed, but I want the horizontal scroll to show the full header. I just need help in doing that. I tried the alternative position attributes but it failed to accomplish what I wanted, alongside my attempt with float.
Here's the html `
<div id="container">
<header>
<h1>Home</h1>
</header>
<div id="content">
<nav>
<div id="logo">
<img src="Images/Logo.png" >
</div>
<ul>
<li>
<a href="Index.HTML">
<i class="fa fa-HOME fa-2x" id="on"></i> <!--this is using the font awesome icons, reffered to in the head. Multiple divs are used as the websote declared it should be done. Purely used for the icons -->
<span class="nav-text" id="on">
HOME
</span>
</a>
</li>
<li>
<a href="standards&info.HTML">
<i class="fa fa-info fa-2x"></i>
<span class="nav-text">
STANDARDS & INFORMATION
</span>
</a>
</li>
<li>
<a href="interesting_info.HTML">
<i class="fa fa-magic fa-2x"></i>
<span class="nav-text">
INTERESTING INFORMATION
</span>
</a>
</li>
<li>
<a href="JOBS.HTML">
<i class="fa fa-briefcase fa-2x"></i>
<span class="nav-text">
JOBS
</span>
</a>
</li>
<li>
<a href="photo&video.HTML">
<i class="fa fa-picture-o fa-2x"></i>
<span class="nav-text">
PHOTOS & <BR> VIDEOS
</span>
</a>
</li>
</ul>
</nav>
</div>
<footer>
<h4>© 2015</h4>
</footer>
</div>`
And heres the CSS
#import url(http://netdna.bootstrapcdn.com/font-awesome/4.0.3/css/font-awesome.css);
html, body{
height:100%;
width:100%;
background: rgb(110, 110, 110);
padding:0;
margin:0;
min-width:1280px;
}
#container{
width: 100%;
height: 100%;
}
.fa-2x{
font-size:2em;
}
.fa {
position: relative;
display: table-cell;
width: 60px;
height: 36px;
text-align: center;
vertical-align: middle;
font-size:20px;
margin-right:10px;
margin-left:10px;
}
nav {
background:rgb(255, 90, 9);
position:fixed;
top:0;
height:calc(100% - 40px);
min-height:600px;
left:0;
width:80px;
overflow:hidden;
transform:translateZ(0) scale(1,1);
transition:all .1s linear;
-webkit-transform:translateZ(0) scale(1,1);
-webkit-transition:all .1s linear;
-moz-transform:translateZ(0) scale(1,1);
-moz-transition:all .1s linear;
-ms-transform:translateZ(0) scale(1,1);
float:left;
z-index:100;
}
nav:hover{
width:200px;
transform:translateZ(0) scale(1,1);
transition:all .1s linear;
-webkit-transform:translateZ(0) scale(1,1);
-webkit-transition:all .1s linear;
-moz-transform:translateZ(0) scale(1,1);
-moz-transition:all .1s linear;
-ms-transform:translateZ(0) scale(1,1);;
}
nav li {
position:relative;
display:block;
width:250px;
}
#on{
color:#41A3A3;
}
nav li>a {
position:relative;
display:table;
border-collapse:collapse;
border-spacing:0;
font-size: 14px;
text-decoration:none;
transform:translateZ(0) scale(1,1);
transition:all .1s linear;
-webkit-transform:translateZ(0) scale(1,1);
-webkit-transition:all .1s linear;
-moz-transform:translateZ(0) scale(1,1);
-moz-transition:all .1s linear;
-ms-transform:translateZ(0) scale(1,1);
transition:all .1s linear;
margin-top: calc(100% / 8);
}
nav .nav-icon {
position:relative;
display: table-cell;
width:60px;
height:36px;
text-align:center;
vertical-align:middle;
font-size:18px;
}
.nav-text {
position:relative;
display: table-cell;
vertical-align:middle;
width:180px;
font-family: 'Droid Serif', serif;
font-size:14px;
}
nav ul,nav li {
outline:0;
margin:0;
padding:0;
}
header{
position:fixed;
top:0px;
margin-left:80px;
width:100%;
height:113px;
background:rgb(57, 57, 57);
z-index:90;
white-space: nowrap;
}
h1{
font-family: 'Impact', sans-serif;
text-align:center;
font-size:40px;
color:white;
line-height:50px;
padding-left:129px;
}
footer{
position:fixed;
bottom:0px;
right:0px;
width:100%;
height:40px;
background:rgb(57, 57, 57);
line-height:0px;
}
h4{
font-family: 'Impact', sans-serif;
font-size:22px;
color:white;
text-align:center;
padding-right:20px;
}
h2{
text-align:center;
font-family: 'Cuprum', sans-serif;
font-size:50px;
color:#BFBFBF;
}
#content{
height:calc(100% - 160px);
width:100%;
min-width:100%;
top:114px;
}
.twobox{
width:35%;
height:96%;
top:0;
margin-right:4%;
margin-left:6%;
float:left;
}
.title{
background-color:#7E4A00;
height:70px;
margin-bottom:8%;
margin-top:6%;
width:100%:
}
.info{
background-color:#7E4A00;
height:auto;
padding-top:10px;
width:auto%;
padding-left:4%;
padding-right:4%;
overflow:hidden;
text-overflow:ellipsis;
height:500px;
overflow-y:auto;
}
.infojob{
background-color:#7E4A00;
height:auto;
padding-top:10px;
width:auto%;
padding-left:4%;
padding-right:4%;
overflow:hidden;
text-overflow:ellipsis;
height:600px;
overflow-y:auto;
}
hr{
margin-top:40px;
margin-bottom:40px;
opacity: 0.0001;
}
p{
text-align:center;
font-family: 'Times New Roman', serif;
color:#BFBFBF;
font-size:18px;
}
#onebox{
width:40%;
height:96%;
top:0;
float:left;
margin-left:26%;
background-color:#7E4A00;
overflow-y:auto;
}
.threebox{
width:20%;
height:94%;
top:0;
margin-right:4%;
margin-left:6%;
float:left;
}
.row{
display: inline-block;
height:170px;
width:80%;
margin-left:10%;
margin-top:60px;
min-width:1120px;
}
#rows{
display: inline-block;
height:390px;
width:80%;
margin-left:10%;
margin-top:60px;
min-width:1120px;
}
.read_more{
text-align:center;
font-family: 'Times New Roman', serif;
color:#E50000;
font-size:18px;
opacity:0.8;
}
h3{
text-align:center;
font-family: 'Times New Roman', serif;
color:#BFBFBF;
font-size:30px;
}
h5{
font-family: 'Impact', sans-serif;
text-align:center;
font-size:25px;
color:#BFBFBF;
text-align:center;
}
a:link {
color:#efefef;
}
a:visited {
color:#efefef;
}
a:hover {
color:#52CCCC;
}
.boxmore{
width:18%;
height:170px;
background-color:#7E4A00;
float:left;
margin-left:4%;
margin-left:4%;
border-radius:0px 0px 30px 30px;
}
.box{
width:18%;
height:170px;
background-color:#7E4A00;
float:left;
margin-left:4%;
margin-left:4%;
}
.center{
margin-left:42%;
width:260px;
height:50px;
background-color:#7E4A00;
margin-bottom:15px;
}
.wraps{
width:220px;
height:350px;
float:left;
margin-right: calc((100% - 910px ) / 4);
}
.discriptions{
width:220px;
height:60px;
margin-top:310px;
margin-left:43px;
background-color:#7E4A00;
padding-bottom:1px;
}
.discriptionvid{
width:240px;
height:60px;
background-color:#7E4A00;
padding-bottom:1px;
}
.rowvid{
display: inline-block;
white-space:nowrap;
padding-left:3%;
margin-left:6%;
height:280px;
width:calc( (560px * 2) + (20px * 2));
}
.media{
width:240px;
height:280px;
margin-left:38px;
float:left;
}
.standard{
width:30%;
min-width:20%;
margin-left:10%;
margin-bottom:100px;
border-spacing:0px;
padding:10px;
}
.centered{
margin-left:40%;
width:260px;
height:70px;
background-color:#7E4A00;
}
.standard th {
width:200px;
border-bottom:solid #000000;
padding:20px;
background:#7E4A00;
height:50px;
}
.standard td {
border-bottom:dashed #000000;
padding: 0px 10px;
height:170px;
min-height:170px;
min-width:365px;
}
.left{
width:40%;
}
.mid {
border:1px;
border-right:solid #000000;
border-left:solid #000000;
}
.involves{
height:144px;
background-color:#7E4A00;
width:60%;
margin-top:0%;
margin-left:19%;
padding:1px;
}
.small{
height:30px;
background-color:#7E4A00;
width:60%;
margin-top:0%;
margin-left:4%;
margin-bottom:14.5px;
}
.small_ind{
margin-top:0%;
height:30px;
margin-bottom:105px ;
background-color:#7E4A00;
width:60%;
margin-left:18%;
}
And here's the JSFiddle
It isn't displaying properly as font awesome isn't working, so the nav seems a bit out of sorts. You can still see the issue with the header though, if you minimise the screen size.
Any help will be appreciated, thank you!!
Remove this CSS:
html, body{min-width:1280px;}
header{margin-left:80px;
h1{padding-left:129px;}
See JSFiddle
Can someone please help me with the rollover states on this Instagram feed?
http://www.christielakekids.com/gala2015/
I can't figure out why they are showing below the images in the very bottom row.
.image_block div:hover .rollover { bottom:0px; transition:all ease-in-out 0.5s;}
.rollover { width:100%; height:100%; background-color:rgba(92, 112, 163, 0.9); position:absolute; bottom:-100%; left:0px; display:block;}
.roll_content a { display:block; font-family: 'GothamBookRegular'; color:#FFF; font-size:25px; text-decoration: none;}
.roll_content p { margin-top: 20px; font-family: 'GothamBookRegular'; font-size:25px; color:#FFF; line-height:30px; text-align:center; padding:3% 10% 0 10%;}
I have a small but annoying issue here. My footer and background image stay with the page when on different resolutions or zoomed in and out (because of the footer being fixed and the background image being positioned in the center) but my other images don't seem to stay with the page, they move on their own given a change in different resolutions or if I zoom in and out. Here's my code/screenshots of what's happening:
Screenshots:
My view of the webpage (1920x1080): http://gyazo.com/11c8a55c697696eb7667fdf23f903bb9
Here is my code pen: http://codepen.io/anon/pen/JobwRB
Try scroll zooming in codepen and I'll think you'll see what I mean. Is media queries worth a read here? Or will have to to put everything into a container?
Thanks for any help received.
HTML Code:
<!DOCTYPE HTML>
<html>
<head>
<link rel="stylesheet" href="footer.css" type="text/css"/>
<link rel="stylesheet" href="body.css" type="text/css"/>
</head>
<body>
<div>
</div>
<div id="img">
<img src="images/deets.png">
</div>
<div id="footer">
<ul id="footer_menu">
<li class="homeButton"></li>
<li>Profile
<div class="three_column_layout">
<div class="col_3">
<p></p>
</div>
</div>
</li>
<li>Work Exp
<div class="two_column_layout">
</div>
</li>
<li>Qualifications
<div class="two_column_layout">
<div class="col_2">
<a class="headerLinks">Test</a>
</div>
</div>
</li>
<li class="right">Log Out</li>
</ul>
<ul id="notifications">
<li>
<img src="images/twitter.png"
</li>
<li>
<img src="images/facebook.png">
</li>
</ul>
</div>
</body>
Footer CSS:
body{
background:rgba(20,20,20,1);
}
#footer{
position:fixed;
bottom:0px;
margin:0;
padding:0;
left:0;
right:0;
width:100%;
height:40px;
font-family:Arial;
text-shadow:1px 1px 1px black;
border-top:1px solid rgba(0,0,0,1.0);
background: rgba(0,0,0,0.5);
box-shadow:inset 0 1px rgba(255,255,255,0.3), inset 0 10px rgba(255,255,255,0.2),
inset 0 10px 20px rgba(255,255,255,0.25), inset 0 -15px 30px rgba(0,0,0,0.3);
}
#footer h2{
font-weight:normal;
font-size:14px;
text-decoration:underline;
color:#CC0000;
margin-top:10px;
margin-bottom:5px;
margin-left:10px;
}
#footer p{
color:white;
font-size:12px;
float:left;
padding:0px 10px;
margin:10px 0px;
}
#footer img{
border:none;
}
#footer li ul{
list-style:none;
padding:0px;
margin-bottom:12px;
}
.clear{
clear:both;
display:block;
overflow:hidden;
visibility:hidden;
width:0px;
height:0px;
}
#footer .whiteBorder{
border:1px solid white;
}
#footer .img_left{
float:left;
margin-right:10px;
width:40px;
}
#footer .black_box{
background:rgba(0,0,0,0.4);
padding:5px;
margin-bottom:5px;
border-radius:5px;
}
#footer #notifications{
float:right;
width:auto;
margin:5px 15px 0px;
padding:0px;
overflow:hidden;
}
#footer #notifications li{
margin-right:12px;
float:left;
width:24px;
padding:0px;
height:32px;
list-style:none;
}
#footer #notifications li:hover{
margin-top:-1px;
}
#a .notificationIcons span{
display:none;
font-size:12px;
color:white;
bottom:45px;
width:150px;
position:absolute;
border:1px solid #333333;
padding:5px;
margin-left:-70px;
background:rgba(0,0,0,0.4)
}
#a .notificationIcons:hover span{
display:block;
}
#footer_menu{
margin:0px;
padding:0px;
width:auto;
}
#footer_menu li{
list-style:none;
text-align:center;
width:75px;
float:left;
font-size:12px;
padding:12px 14px 14px 14px;
border-right:1px solid rgba(0,0,0,0.4);
background:rgba(0,0,0,0.1);
}
#footer_menu li:hover{
background:rgba(0,0,0,0.3);
}
#footer_menu li a{
display:block;
color:#CCCCCC;
text-decoration:none;
}
#footer_menu li a:hover{
color:white;
}
#footer_menu .homeButton{
padding:5px 8px 0px 5px;
border:none;
background:none;
}
#footer_menu .homeButton a{
background:url("C:/Users/Charlie/Desktop/CV Website/images/greyhouse1.png") top left no-repeat;
width:36px;
height:30px;
}
#footer_menu .homeButton:hover{
background:none;
}
#footer_menu .homeButton a:hover{
background:url("C:/Users/Charlie/Desktop/CV Website/images/whitehouse2.png") top left no-repeat;
}
/*Programs menu drop-up box*/
#footer_menu li ul.dropup{
display:none;
}
#footer_menu li:hover ul.dropup{
display:block;
position:absolute;
margin: 0 0 0 -15px;
bottom:40px;
border:1px solid #111111;
border-bottom:none;
background:rgba(0,0,0,0.5);
}
#foot_menu li:hover li{
float:none;
background:none;
border:none;
border-bottom:1px solid #111111;
padding:12px 10px 12px 10px;
}
/*Drop up default links*/
#footer_menu li:hover a{
color:#aaaaaa;
}
#footer_menu li:hover a:hover{
color:white;
}
/*Header links*/
.headerLinks {
display:none !important;
}
#footer_menu li:hover a.headerLinks{
font-size:14px;
text-decoration:underline;
margin-bottom:5px;
color:#CC0000;
margin-top:10px;
margin-left:10px;
display:block !important;
}
#footer_menu li:hover a.headerLinks:hover{
color:white;
cursor:pointer;
}
/*List links*/
#footer_menu li:hover a.listLinks{
font-size:12px;
color:#aaaaaa;
margin-left:10px;
}
#footer_menu li:hover a.listLinks:hover{
color:white;
cursor:pointer;
}
#footer_menu .right{
float:right;
right:0px;
margin-right:2px;
border-right:none;
border-left:1px solid rgba(0,0,0,0.3);
}
/*Layouts*/
#footer .one_column_layout,
#footer .two_column_layout,
#footer .three-column_layout,{
margin:4px;
position:absolute;
padding-bottom:15px;
display:none;
text-align:left;
}
/*Width of each layout*/
#footer .one_column_layout{width:140px;}
#footer .two_column_layout{width:280px;}
#footer .three_column_layout{width:420px;}
/*Display Dropup menus on hover */
#footer_menu li:hover .one_column_layout,
#footer_menu li:hover .two_column_layout,
#footer_menu li:hover .three_column_layout{
display:block;
position:absolute;
text-align:left;
margin:0 0 0 -15px;
bottom:40px;
background:rgba(0,0,0,0.5);
}
#footer.col_1,
#footer.col_2,
#footer.col_3{
display:block;
float:left;
position:relative;
margin-left:5px;
margin-right:5px;
}
#footer.col_1{width:130px;}
#footer.col_2{width:270px;}
#footer.col_3{width:410px;}
Body CSS:
body {
background-image:url('C:/Users/Charlie/Desktop/CV Website/images/background1.png');
box-shadow:5px 5px 2px;
background-repeat: repeat-y;
background-attachment:fixed;
background-position:center;
max-width:1080px;
}
#javaPic {
width:366px;
height:236px;
display:block;
border:1px solid white;
background:transparent url('C:/Users/Charlie/Desktop/CV Website/images/java.png');
position:fixed;
top:5%;
left:28.8%;
max-width:100%;
}
#javaPic:hover {
background-image: url('C:/Users/Charlie/Desktop/CV Website/images/java2.png');
}
#htmlcssPic {
width:366px;
height:236px;
display:block;
border:1px solid white;
background:transparent url('C:/Users/Charlie/Desktop/CV Website/images/htmlcss.png');
position:fixed;
top:5%;
right:28.8%;
max-width:100%;
}
#htmlcssPic:hover {
background-image: url('C:/Users/Charlie/Desktop/CV Website/images/htmlcss2.png');
}
#javascriptPic {
width:366px;
height:236px;
display:block;
border:1px solid white;
background:transparent url('C:/Users/Charlie/Desktop/CV Website/images/javascript.png');
position:fixed;
top:35%;
left:28.8%;
max-width:100%;
}
#javascriptPic:hover {
background-image: url('C:/Users/Charlie/Desktop/CV Website/images/javascript2.png');
}
#phpPic {
width:366px;
height:236px;
display:block;
border:1px solid white;
background:transparent url('C:/Users/Charlie/Desktop/CV Website/images/php.png');
position:fixed;
top:35%;
right:28.8%;
max-width:100%;
}
#phpPic:hover {
background-image: url('C:/Users/Charlie/Desktop/CV Website/images/php2.png');
}
#img {
position:fixed;
top:0.5%;
left:28.8%;
display:block;
max-width:100%;
}
So I have successfully done this in Chrome, as well as for Firefox. Today I realized why not try it in IE! Well, looks like IE doesn't exactly want to work the same...
Does anyone know how I can do this a different way to make it also work for IE?
HTML:
<div id="navbar">
<div id="navlinks">
<nav>
<ul id="navlist">
<li>HOME</li>
<li>ASSIGNMENTS</li>
<li>DREAM CARS</li>
<li>PROJECTS</li>
<li>CONTACT</li>
</ul>
</nav>
</div>
</div>
CSS:
body{
margin:0 auto;
}
#logo{
margin:auto;
width:430px;
}
#navbar{
width:100%;
height:50px;
display:table;
margin:auto;
}
#navlinks ul {
display:table;
border-collapse:collapse;
width:100%;
margin:0 0 20px;
padding:0;
list-style:none;
}
#navlinks li {
display: table-cell;
vertical-align: middle;
text-align:center;
width:20%;
background: linear-gradient(to right, #111 50%, #444 50%);
background-size: 200% 100%;
background-position:left top;
transition:all 1s ease;
}
#navlinks li:hover{
background-position:right top;
}
#navlinks a {
text-decoration:none;
color: #999;
text-transform: uppercase;
display:block;
padding-top:10px;
padding-bottom:10px;
font: bold 12px/25px Arial, Helvetica;
transition:color 1s ease-in-out;
}
#navlinks li:hover a{
color:black;
}
Demo in JSFiddle