Answer the question
In order to leave comments, you need to log in
Responsive block positioning with fixed and 100% width
Good afternoon!
This is not the first time I encounter this problem, but, unfortunately, I could not find a decent solution.
Imagine that we have 2 blocks. The left block has 100% width, as it contains text, which means it should be responsive. The right block has a fixed width, because it contains, for example, a picture.
My wrong decision:
.left {
width: 100%;
float: left; /*аналогично и с inline-block*/
}
.right {
width: 300px;
float: left; /*аналогично и с inline-block*/
}
Answer the question
In order to leave comments, you need to log in
.left {
margin-right: 310px;
}
.right {
width: 300px;
float: right;
}
I think this solution will be better than with an indent equal to the width of the column.
jsfiddle.net/5dDqr/2
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question