Answer the question
In order to leave comments, you need to log in
How to fix a layout bug?
Good afternoon! There is a problem on the site sanmarino.kz when you change the window size, then the right block moves down under the content, adaptability flies. How to fix?
For tablets, cell phones everything is ok. but when you change the size of the window everything goes. www.prntscr.com/8jxoxg
Answer the question
In order to leave comments, you need to log in
div.content-block is fixed width. When changing (reducing) the size of the window, the right div does not fit into the width of the window, so it runs down.
Either use the ancient way - a table instead of a div layout, or use JS to control the width of the div.content-block so that the right block fits within the width.
There is another option that might work:
.content-block{
max-width:700px;
min-width:200px;
width:100%; /* возможно эта строка лишняя */
}
write for screen width less than 950px: (Media Queries)
.right-block .sidebar-head{
position: relative;
left: -100px
height: auto;
}
if the right block should be next to the middle (content-block) then like so:
.content-block { width:65% }
.right-block .sidebar-head{
position: relative;
height: auto;
left: -60px
}
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question