This Image below shows what should be achieved.
Trying to make a Header with 4 images. All 4 in separate corners and a Text in the middle. When you shrink the display size for tablet or mobile the images and whole content should shrink with it. Unfortunately I got a problem with the images. 3 of them are indeed in the corners but the bottom left one is not properly. also the size can not be changed as well as the text to be set right as it should. When putting the text in a new div it does not align right and not shrink automaticaly. When inside the same div like the images also not working.
here is the code from the css and html part.
.Header {
display: grid;
grid-template-columns: auto auto;
justify-content: space-between;
align-content: space-between;
height: 700px;
background-color: antiquewhite;
}
.container {
text-align: center;
}
import React from 'react';
import styles from '../styles/Header.module.css';
import upperLeft from '../public/upperleft.svg'
import upperRight from '../public/upperright.svg'
import bottomLeft from '../public/bottomleft.svg'
import BottomRight from '../public/bottomright.svg'
import Image from 'next/image';
const Header = () => {
return (
<>
<div className={styles.Header}>
<Image src={upperLeft} className={styles.box1} />
<Image src={upperRight} className={styles.box2} />
<Image src={bottomLeft} className={styles.box3} />
<Image src={BottomRight} className={styles.box4} />
</div>
<div className={styles.container}>
<h2>spot on Workspace</h2>
</div>
</>
)
}
export default Header
.Header {
display: grid;
grid-template-columns: auto auto;
justify-content: space-between;
align-content: space-between;
height: 80vh; /* 700px; */
background-color: antiquewhite;
}
.container {
text-align: center;
}
<div class="Header">
<img src="https://via.placeholder.com/90x60">
<img src="https://via.placeholder.com/90x60">
<img src="https://via.placeholder.com/90x60">
<img src="https://via.placeholder.com/90x60">
</div>
<div class="container">
<h2>spot on Workspace</h2>
</div>
