I have created example at http://jsfiddle.net/GKnkW/2/
html
Test
<
Just adding that I had a similar problem and thought it was a Javascript/Jquery issue. This thread solved for me.
INLINE elements have no width, so you cannot set it via js.
Thanks.
Here's a link to my issue just in case.
Jquery and Jqueryui: set width not working after using resizable?
Inline objects don't have heights or widths. Why are you setting them inline to begin with? You probably want to either float them or use display: inline-block
.
Use this:
display:inline-block;
This should do it
html
<!DOCTYPE html>
<html>
<head>
<title>Test</title>
</head>
<body>
<div class="step-section">
<div class="step">1</div>
<div class="step">2</div>
</div>
<div class="step-section">
<div class="step">3</div>
<div class="step">4</div>
</div>
</body>
</html>
css
.step
{
margin:5px;
height:150px;
width:150px;
background: yellow;
float:left;
}
.step-section
{
clear:both;
}