I am trying to organize my page into 3 columns. So far, I have the columns existing, however one of the columns is getting wrapped under the other two.
I utilize a picture, at width=300 and height=300 and a simple heading in each column.
Here is my CSS:
<style type="text/css">
/*4 + 335*3 = 1009px*/
#wrapper {
border: 2px solid black;
width: 1009px;
margin-left: auto;
margin-right: auto;
}
#header {
text-align: center;
}
/* 325px content + 10px = 335px physical width per column */
.column {
float: left;
width: 325px;
margin: 5px;
text-align: center;
min-height: 250px;
}
#middle {
border-left: 2px solid black;
border-right: 2px solid black;
margin-left: 0;
margin-right: 0;
padding-left: 10px;
padding-right: 10px;
}
Something must be wrong with my math in the wrapper width I am guessing, but I cannot spot the error. Let me know your thoughts.
HTML:
<div id="wrapper">
<div id="left" class="column">
<h2>Tic Tac Toe</h2>
<a href="tictactoe.php">
<img src="images/tictactoe.png" alt="Tic-Tac-Toe"
width="300" height="300"/>
</a>
</div>
<div id="middle" class="column">
<h2>Puzzle</h2>
<a href="puzzle.php">
<img src="images/puzzle.png" alt="Puzzle"
width="300" height="300"/>
</a>
</div>
<div id="right" class="column">
<h2>Rock Paper Scissors</h2>
<a href="rockpaperscissors.php">
<img src="images/rock_paper_scissors" alt="Rock Paper Scissors"
width="300" height="300"/>
</a>
</div>
</div>
/*4 + 335*3 = 1009px