Apologies if this has been asked before but I can't find an answer that specifies this exactly.
Without using media queries or javascript/jquery, I need to get my 5 divs to display like this:
A B C
D E
and on a smaller screen to go to
A B
C D
E
However I am getting this instead:
A B C
... D
E
If I add 'clear:float;' to the 4th div, on a smaller screen it goes to this:
A B
C
D E
Which I don't want.
I don't want to specify the height of each div as content may be added over time.
Can anyone point out where I've gone wrong in my code, thanks in advance!
P.S. All of my CSS is inline as that's all our system can guarantee working - sorry!
<center>
<div style="width:100%; max-width:1000px;">
<div style="max-width:333px; width:100%; display:inline-block; float:left; text-align:left; padding-bottom:10px; color:rgb(71,70,70); font-family:arial, verdana, sans-serif;">
<span style="font-size:18px; font-weight:bold;">A</span>
<ul style="font-size:13px; list-style-type:none; padding-left:10px;">
<li>XX</li>
<li>XX</li>
<li>XX</li>
<li>XX</li>
<li>XX</li>
<li>XX</li>
<li>XX</li>
</ul>
</div>
<div style="max-width:333px; width:100%; display:inline-block; float:left; text-align:left; padding-bottom:10px; color:rgb(71,70,70); font-family:arial, verdana, sans-serif;">
<span style="font-size:18px; font-weight:bold;">B</span>
<ul style="font-size:13px; list-style-type:none; padding-left:10px;">
<li>XX</li>
<li>XX</li>
<li>XX</li>
<li>XX</li>
<li>XX</li>
</ul>
</div>
<div style="max-width:333px; width:100%; display:inline-block; float:left; text-align:left; padding-bottom:10px; color:rgb(71,70,70); font-family:arial, verdana, sans-serif;">
<span style="font-size:18px; font-weight:bold;">C</span>
<ul style="font-size:13px; list-style-type:none; padding-left:10px;">
<li>XX</li>
<li>XX</li>
<li>XX</li>
</ul>
</div>
<div style="max-width:333px; width:100%; display:inline-block; float:left; text-align:left; padding-bottom:10px; color:rgb(71,70,70); font-family:arial, verdana, sans-serif;">
<span style="font-size:18px; font-weight:bold;">D</span>
<ul style="font-size:13px; list-style-type:none; padding-left:10px;">
<li>XX</li>
<li>XX</li>
<li>XX</li>
<li>XX</li>
</ul>
</div>
<div style="max-width:333px; width:100%; display:inline-block; float:left; text-align:left; padding-bottom:10px; color:rgb(71,70,70); font-family:arial, verdana, sans-serif;">
<span style="font-size:18px; font-weight:bold;">E</span>
<ul style="font-size:13px; list-style-type:none; padding-left:10px;">
<li>XX</li>
<li>XX</li>
</ul>
</div>
</div>
</center>