P
P
painfulangel2014-09-24 14:47:30
css
painfulangel, 2014-09-24 14:47:30

How to make 3 horizontal DIVs under each other, in the center of the screen, when the window narrows?

Help me please! I've been struggling with this problem for days now.
There are 3 horizontal DIVs with float:left ; and fixed width
thumb300.jpg
these divs are center aligned margin: 0 auto;
When narrowing the window, you need the blocks to rebuild under each other and align in the center like this:
thumb300.jpg
You just get the blocks under each other, but they are nailed to the left edge, but there is an ugly large indent on the right.

Answer the question

In order to leave comments, you need to log in

2 answer(s)
V
Vitaly Kirenkov, 2014-09-24
@painfulangel

@media (max-width: 1000px){
div { float: none; margin: 0 auto;}
}

and why are they suffering?

N
NO, 2014-09-24
@Mihail9575

Try a ready-made framework type solution: getbootstrap.com
In Russian: bootstrap-3.ru

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question