gwmbox
04-07-2016, 04:39 AM
Hi all
I have been trying my best to get a result where images and content resize as a window resizes and/or it is displayed on smaller screens.
I have three images all of the same height that I need to display at the same height when side by side.
I have drawn up several images (see attachments) to illustrate what I am trying to do
html code
<div class="container">
<div class="my-content">
<div class="left-content"><img src="http://mysite.com/image1.png" alt="image1" width="573" height="415" /></div>
<dib class="right-content">
<div class="left-sub-content"><img src="http://mysite.com/image2.png" alt="image2" width="273" height="415" /></div>
<div class="right-sub-content"><img src="http://mysite.com/image3.png" alt="image3" width="273" height="415" /></div>
</div>
</div>
</div>
Basic css (at this stage) I have tried many configurations including using pixel, em etc measurements instead of % plus various layout configs with floats etc
Assuming the site set max-width is set at 1120px and the container is a set width of 100%, with a 14px padding; The css for the above is
.my-content {
margin: 0.875rem auto 0.875rem 0;
white-space: nowrap;
width:100%;
}
.left-content {
display:inline-block;
width: 50%;
float:left;
}
.right-content {
display:inline-block;
}
.left-sub-content {
display:inline-block;
width: 25%;
}
.right-sub-content {
display:inline-block;
width: 25%;
}
Image 1 - the base full size layout - all three images are the same height and in proportion to the original size of each image
http://gmwebfiles.com/data/g/forumposts/2016/l1.png
Image 2 - the width of the window is smaller than the full size layout and the images etc are resized to fit into that reducing window size, all 3 images are to remain the same height
http://gmwebfiles.com/data/g/forumposts/2016/l2.png
Image 3 and Image 4 - when viewed on even smaller screens the layouts change depending on width, in 3 the two side by side resize as they are moved under the top image, and these two images are displayed at the same height. Finally on the smallest of screens all three images load to the window size width under each other.
http://gmwebfiles.com/data/g/forumposts/2016/l3-l4.png
I hope my request here makes sense and is clear enough to describe what I am trying to do.
Thanks
I have been trying my best to get a result where images and content resize as a window resizes and/or it is displayed on smaller screens.
I have three images all of the same height that I need to display at the same height when side by side.
I have drawn up several images (see attachments) to illustrate what I am trying to do
html code
<div class="container">
<div class="my-content">
<div class="left-content"><img src="http://mysite.com/image1.png" alt="image1" width="573" height="415" /></div>
<dib class="right-content">
<div class="left-sub-content"><img src="http://mysite.com/image2.png" alt="image2" width="273" height="415" /></div>
<div class="right-sub-content"><img src="http://mysite.com/image3.png" alt="image3" width="273" height="415" /></div>
</div>
</div>
</div>
Basic css (at this stage) I have tried many configurations including using pixel, em etc measurements instead of % plus various layout configs with floats etc
Assuming the site set max-width is set at 1120px and the container is a set width of 100%, with a 14px padding; The css for the above is
.my-content {
margin: 0.875rem auto 0.875rem 0;
white-space: nowrap;
width:100%;
}
.left-content {
display:inline-block;
width: 50%;
float:left;
}
.right-content {
display:inline-block;
}
.left-sub-content {
display:inline-block;
width: 25%;
}
.right-sub-content {
display:inline-block;
width: 25%;
}
Image 1 - the base full size layout - all three images are the same height and in proportion to the original size of each image
http://gmwebfiles.com/data/g/forumposts/2016/l1.png
Image 2 - the width of the window is smaller than the full size layout and the images etc are resized to fit into that reducing window size, all 3 images are to remain the same height
http://gmwebfiles.com/data/g/forumposts/2016/l2.png
Image 3 and Image 4 - when viewed on even smaller screens the layouts change depending on width, in 3 the two side by side resize as they are moved under the top image, and these two images are displayed at the same height. Finally on the smallest of screens all three images load to the window size width under each other.
http://gmwebfiles.com/data/g/forumposts/2016/l3-l4.png
I hope my request here makes sense and is clear enough to describe what I am trying to do.
Thanks