CSS does not allow class names that begin with a number. The first character MUST be a letter.
.threecol {
width: 32%;
margin-right:1%;
float:left;
text-align:center;
}
Question
Have 3 floated divs thatI have set to act responsively. It works fine in the live view of dreamweaver but not when testing in browsers. Here is a fiddle http://jsfiddle.net/pa5Ey/
CSS
#maincontentInner{
max-width:1170px;
position:relative;
margin:0 auto;
background-color:#FFF;
overflow:hidden;
border-right-width: 1px;
border-left-width: 1px;
border-right-style: solid;
border-left-style: solid;
border-right-color: #999999;
border-left-color: #999999;
padding-top:50px;
}
.3col {
width: 32.26%;
margin-right:1.6%;
float:left;
text-align:center;
}
and the Markup
<div class="3col" style="margin-left:1.9%">
Some Text Here<br />
Some Text Here<br />
Some Text Here<br />
Some Text Here<br />
</div>
<div class="3col">
Some Text Here<br />
Some Text Here<br />
Some Text Here<br />
Some Text Here<br />
</div>
<div class="3col">
Some Text Here<br />
Some Text Here<br />
Some Text Here<br />
Some Text Here<br />
</div>
<div class="clearfix"/>
</div><!-- End maincontentInner -->
Solution
CSS does not allow class names that begin with a number. The first character MUST be a letter.
.threecol {
width: 32%;
margin-right:1%;
float:left;
text-align:center;
}
OTHER TIPS
Width and margin doesn't work with decimals So the right code will be:
.threecol {
width: 32%;
margin-right:1%;
}