I'm trying to get the primary text on a group of pages to show up in a two-column format, with 30px of padding in between. I also want to keep the paragraphs in each column aligned in the way I've chosen no matter how the user resizes the window. I've been told not to use tables for anything that's not spreadsheet data, so I tried using the method I found here -- Make two CSS elements fill their container, side-by-side, with margin. Unfortunately, for whatever reason it's just not working for me: the "main" div (which I'm trying to restrict to 75% width so that the "side" div can sit next to it) is appearing at full width in all browsers, and when I try to "inspect element" in Firefox it doesn't even show a width property at all!
Here's the adaptation I've been trying to use:
HTML:
<div class="text">
<div class="main">
<p> Main body text blahblahblah. </p>
</div>
<div class="side">
<p> Testing side text container setup. </p>
</div>
</div>
CSS:
.text {
margin: 20px;
font-family: Optima, Segoe, "Segoe UI", Candara, Calibri, Arial, sans-serif;
}
.main {
display: inline-block;
clear: both;
width: 75%
margin: 0;
padding-right: 30px;
border: none;
box-sizing: border-box;
-moz-box-sizing:border-box;
-webkit-box-sizing:border-box;
}
.main > p {
display: block;
margin-right: 0;
margin-left: 0;
padding: 0;
border: none;
}
.side {
display: inline-block;
width: 25%;
font-weight: bold;
margin: 0;
padding: 0;
border: none;
box-sizing: border-box;
-moz-box-sizing:border-box;
-webkit-box-sizing:border-box;
}
.side > p {
display: block;
margin: 0;
padding: 0;
border: none;
}
Any idea what's going wrong?