WP 3.0.4 multisite network enabled, local installation with MAMP, PHP 5.3.2, WP THEME: Twentyten Child (Wordpress Theme)
Having trouble with not displaying my CSS styling for horizontal alignment of 4 div-boxes inside a div-container.
NOTE: The same css styling works fine with HTML 4.01 Transitional//EN on my hand-coded html/php website. But on my WordPress site, the four boxes stepped down from each other, like a staircase.
Same behavior in Firefox v3.6.13 and Safari v5.0.3.
My CSS:
div .box-container { display: inline; margin: 0.63em 0pt; padding:10px; width: 640px; background-color:rgb(229, 231, 225); position:relative; float: left; overflow:hidden; }
div .small-box { border: 1px solid rgb(153, 51, 102); margin: 10px 5px; padding: 0.325em; float: left; background-color: rgb(255, 244, 227); width: 128px; line-height: 0.85em; max-height: 8em; min-height: 8em; position: relative; }
My HTML:
<div class="box-container">
<div class="small-box">SOME TEXT & IMAGE</div>
<div class="small-box">SOME TEXT & IMAGE</div>
<div class="small-box">SOME TEXT & IMAGE</div>
<div class="small-box">SOME TEXT & IMAGE</div> </div>
The box-container div width is specified as 640px, but I notice the padding extends it beyond this.
In any case, it is plenty large to accommodate the four small boxes, which total 512px plus their total 40px margin, plus the 20px padding on the box-container div.
My Problem:
I don't understand why the padding pushes the size of the box-container div. When I tried to use max-width: 640px, I observed that the boxes all lined up vertically, and the box-container div was no wider than 170px. EDIT: The padding has since been removed from the box-container div, and margins adjusted on the small-box divs.
REAL PROBLEM IS AS STATED IN THE FIRST 2 PARAGRAPHS: The four small boxes are stepped down from each other, like a staircase. I want them to align horizontally.
The small-box divs are actually all the same size, their contents consist of text & image.
Help?
Edit:
Screenshot of my hand-coded website, behaving as expected:
Staircase effect I'm seeing in WordPress my WordPress Theme: