Question d’entretien chez Bloomberg

Given a DIV box of x width and y height in a browser how do you position four smaller images in each corner of the box?

Réponses aux questions d'entretien

Utilisateur anonyme

15 avr. 2015

Position the DIV box relative. Have the other four child DIV boxes inside that positioned absolute. Then position .box1{ top:0; left: 0; position: absolute;} .box2{ top:0; right: 0; position: absolute;} .box3{ bottom:0; left: 0; position: absolute;} .box4{ bottom:0; right: 0; position: absolute;}

8

Utilisateur anonyme

4 déc. 2014

This is what I would do: Wrap those images in the div box Use float left for 2 images and float right for the other 2 images and have their width and height to be half of the width and height of the box ( x/2 and y/2)

1