Help to impose a nonstandard behavior [Solved]

Hello.

It is necessary to impose some non-standard behavior of the blocks without the use of javascript and media query.
The idea is that blocks with small resolution screen arranged one above the other and their content is centered, but when the screen width allows, the blocks are arranged one after the other, for example 50% of the width.

Beat has a lot of options adequately is able to only do this with a media-query.

Does anyone have any ideas?
October 8th 19 at 01:17
3 answers
October 8th 19 at 01:19
Solution
jsfiddle.net/HwD3R/

Most likely there will be problems in IE6-IE7 – unfortunately, there is no way to check
please note that between the closing and the next opening divom divom should be no spaces or line breaks. - Hazel.Wel commented on October 8th 19 at 01:22
As a crutch in this case you can from the parent unit to put font-size:0 or white-space:-0.25 em; - Allene_Crona78 commented on October 8th 19 at 01:25
Great! Thank you so much! For younger browsers I have always used the snippet cross-browser inline-block — most importantly, I understand Your idea. Thanks again! - garrett.Davis commented on October 8th 19 at 01:28
October 8th 19 at 01:21
Not so. The units should not plotitsa, and must stand at the center. The decision below — have hom9k. - Hazel.Wel commented on October 8th 19 at 01:24
October 8th 19 at 01:23
Verstaile divas, specify the width of the blocks and float, everything will be as it should.

Here, for example, if you do:
<br / > <br / >
When the width of the container in which they are less than six hundred pixels — durug line up under each other
And if more, then in two columns.

This is my idea.
Habr ate water =(
there was
Habr, why did you eat my code? - Hazel.Wel commented on October 8th 19 at 01:26
Uh... the Preview shows the code and when you write — nothing =(
try without ploskonos
div style="width:300px;float:left" /div
div style="width:300px;float:left" /div - Allene_Crona78 commented on October 8th 19 at 01:29
Habr Breakfast. - garrett.Davis commented on October 8th 19 at 01:32
> = >
< = <
You are web developer or not? Use safe signs. - garrett.Davis commented on October 8th 19 at 01:35
Heh heh ) - Jacinto_Oberbrunn commented on October 8th 19 at 01:38
Not so. The units should not plotitsa, and must stand at the center. The decision below — have hom9k. - Jacinto_Oberbrunn commented on October 8th 19 at 01:41

Find more questions by tags HTMLCSS