I'm currently tackling a straightforward HTML page but facing some challenges with the divs. The goal is to have a fullscreen background with four horizontal buttons aligned next to each other at the bottom. These buttons are currently linked to the background image - so one option is to include four invisible layers (divs) with href attributes. Alternatively, I could manually place them (as separate jpgs) at the bottom...
However, I want the entire site to smoothly scale up and down without borders to accommodate various screen resolutions. Therefore, the sizes of the divs/images should scale proportionally while maintaining their position.
What I've managed to achieve so far:
body {
height: 100%;
width: 100%;
margin: 0;
padding: 0;
}
.background {
position: absolute;
top: 0;
left: 0;
height: 100%;
width: 100%;
overflow: hidden;
}
img {
height: auto;
width: auto;
min-width: 100%;
min-height: 100%;
}
<body>
<div class="background">
<div class="img">
<img src="background.jpg">
</div>
</div>
</body>
Currently, I only have the background image set up: it's contained within an img-div within a background container with absolute positioning.
How can I now add the four buttons to remain fixed at the bottom of the background and retain their relative size and position when the screen resolution changes?
:)