Currently working on a mobile website for my client but can't get the following to work. The homepage of this mobile site gets divided with 2 large images where users make their choice. The portrait mode works perfectly by stacking the images on the homepage with the following code.
<p><a href="/female"><img alt="" src="image1.jpg" style="width: 100%; height: 51%; position: absolute; margin-top:0; left:0; right:0;" /></a>
<a href="/male"><img alt="" src="image2.jpg" style="width: 100%; height: 49%; position: absolute; bottom:0; left:0; right:0;" /></a></p>
This works perfectly fine on all devices whilst in portrait mode, but the problem is that as soon as these devices are used in portrait mode, the images get stretched too much. This is of course because of the 100% width.
In an ideal situation; When switching to landscape two entirely different images aren't on top of one another are side by side.
Example;
___ ________
| 1 | | 1 2 |
|_2_| |________|
Portrait mode Landscape mode
Hope my drawing makes any sense.