I'm trying to create a website that will adjust the size of table elements table cells relative to the size of the window, so that it will always fit inside the window. Here's what I have:
<div class="table">
<div class="tablecell"><image src="fb.png"></div>
<div class="tablecell"><image src="twitter.png"></div>
<div class="tablecell"><image src="youtube.png"></div>
<div class="tablecell"><image src="apple.png"></div>
<div class="tablecell"><image src="email.png"></div>
</div>
And the following CSS
.table {
display:table;
margin-right:auto;
margin-left:auto;
width:100%;
}
.tablecell {
display:table-cell;
}
What's messing this up is the width:100%... Here's a picture of the results. I circled the problem space in blue. Ignore Soulja Boy's face.
Basically I just want this centered correctly so that the youtube image is in the middle of the page. The space created by using width:100% prevents that, but I want to use this or a similar property so that the table will always fit inside the window.