jeudi 26 mars 2015

Full Height/Width Image Grid

I am trying to create a full width and full height image grid. This is what I currently have: Codepen.


I am struggling with the variable height of the viewport.


Is there any way to do this?


The editor also forces me to write some more text in addition to my code, I don't know why but I have to. Really strange!





html, body, ul {
height: 100%;
}

ul {
background-color: blue;
}

a {
line-height: 0;
display: block;
}

li {
float: left;
width: 16.66%;
opacity: 0.3;
}

img {
width: 100%;
}

ul li:hover {
opacity: 1;
}



<!DOCTYPE html>
<html>
<head>
<title></title>
<link rel="stylesheet" type="text/css" href="test.css">
</head>
<body>

<ul>
<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>

</body>
</html>



Aucun commentaire:

Enregistrer un commentaire