N
N
Nikolay2015-03-08 17:44:06
Adaptive design
Nikolay, 2015-03-08 17:44:06

What styles to prescribe for page layout?

There is a view page - af504cf070e44cbd8eec411ded2c3b1a.png
The problem is that when the window is narrowed, elements 3 and 4 run into elements 1, 2, 5.
What to register so that they line up in a vertical row.
I tried:

  • offset margin
  • clear both
  • transfers

then it turns out the original layout becomes crooked or with large gaps.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
dm, 2015-03-08
@Nikolaos

In order for the right column to be below the left one on a narrow screen, both of them need to cancel the float using media queries.
For example:

@media screen and (max-width: 768px) {
  .column-left,
  .column-right {
    float: none;
  }
}

This entry overrides float for screen resolutions of 768 pixels or less. The columns will line up one above the other.
And in the HTML in the head add the line:
PS So you need?
179deb12762649c6afbf120d132fa353.png

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question