Answer the question
In order to leave comments, you need to log in
How to center a row of floating-width divs?
Hello. Help solve the problem.
There are divs with a fixed width of 630 pixels. It is supposed to display either 1 element by ~600 pixels, or two by ~300 or 3 by ~200. The problem is that the exact dimensions are not known in advance, and jscript is not allowed.
HTML snippet for two elements:
<div class="ban">
<div class="pic">
<img alt="" title="" src="#" width="300" height="120" border="0">
</div>
<div class="pic">
<img alt="" title="" src="#" width="300" height="120" border="0">
</div>
</div>
Answer the question
In order to leave comments, you need to log in
I slightly customized the variant from timtimIT
And it all worked.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question