I have a fixed positioned div at the bottom of my web (oriented just for mobiles). Inside I have 5 links, and I would like these links to be perfect squares always but I want to avoid to use any fixed size so I'm trying always to use "%". These squares needs to be always distribute using the full width of the container.
html so simple:
<div class="container">
<a href="#" class="facebook">
</a>
<a href="#" class="info">
</a>
<a href="#" class="contacto">
</a>
<a href="#" class="telefono">
</a>
<a href="#" class="galeria">
</a>
</div>
and my css's so far:
.container {
width:90%;
height:20%;
position:fixed;
bottom:5%;
left:5%;
overflow:hidden;
}
.container a {
width: 18.4%;
margin-right: 2%;
height:100%;
background-color: blue;
float:left;
}
.container a:last-child {margin-right: 0;}
Here you have the jsfiddle: http://jsfiddle.net/7jJsf/3/
So, could it be possible to make the links perfect squares whatever width or height the browser have?
or, if maybe my aproach is not good enough, any other way to make it?
note: I think I could do it probably using a square img inside every link but I would love to avoid the use of innecesary images.
thanks in advance and excuse my english, hope the question is clear enough.