I have the following code:
<!DOCTYPE html>
<html>
<head>
<style>
img {position: absolute; height: auto; }
</style>
</head>
<body>
<div style="width: 100%; position: absolute; top:0px; left:0px;">
<img style="width: 100%; top: 0px; left: 0px;" src="dad.png" />
<img style="width: 28%; top: 3%; left: 38%;" src="img1.png" />
<img style="width: 28%; top: 29%; left: 38%;" src="img2.png" />
<img style="width: 28%; top: 55%; left: 38%;" src="img3.png" />
<img style="width: 28%; top: 3%; left: 69%;" src="img4.png" />
<img style="width: 28%; top: 29%; left: 69%;" src="img5.png" />
<img style="width: 28%; top: 55%; left: 69%;" src="img6.png" />
<!-- Mais código vai ser adicionado à DIV -->
</div>
</body>
</html>
Here I have a "bigger" image in the source of the document and "on" this image I place another 6 smaller images. However the larger image should have the same width of the browser (relative), and not lose the proportion, hence: unknown height (automatic).
Problem: because the height is unknown; and it is impossible to nest the images,% relative% property (%) is not applied to other images.
Note: property top
relative (%) works normally because the size of left
parent is recognized.
Does anyone know of any way to achieve this relative positioning?