I'm using James Tauber's hexagon tutorial to create a honeycomb-styled navigation. I have the orientation that I want, but I am having trouble figuring out how to add images to the inside of the hexagons. Is the code in the jsfiddle not optimized for putting images inside of the hexagons or am I not seeing something?
I realize that there are other questions about putting images inside of hexagons, but none of them really helped me.
Advice would be appreciated.
HTML:
.hex {
float: left;
margin-right: -26px;
margin-bottom: -50px;
}
.hex .left {
float: left;
width: 0;
border-right: 30px solid #444;
border-top: 52px solid transparent;
border-bottom: 52px solid transparent;
}
.hex .middle {
float: left;
width: 60px;
height: 104px;
background: #444;
}
.hex .right {
float: left;
width: 0;
border-left: 30px solid #444;
border-top: 52px solid transparent;
border-bottom: 52px solid transparent;
}
.hex-row {
clear: left;
}
.hex.even {
margin-top: 53px;
}
#wrap {
min-width: 600px;
}
<div id="wrap">
<div class="hex-row">
<a href="http://www.google.ca">
<div class="hex">
<div class="left"></div>
<div class="middle"></div>
<div class="right"></div>
</div>
</a>
<div class="hex even">
<div class="left"></div>
<div class="middle"></div>
<div class="right"></div>
</div>
<div class="hex">
<div class="left"></div>
<div class="middle"></div>
<div class="right"></div>
</div>
<div class="hex even">
<div class="left"></div>
<div class="middle"></div>
<div class="right"></div>
</div>
<div class="hex">
<div class="left"></div>
<div class="middle"></div>
<div class="right"></div>
</div>
</div>
</div>