
👋 Oi, mga repapips, Brian Dys here! I love music, photography, and creative stuff like UX design and art. This is a place where I collect my thoughts and works. Apart all these, I’m Jaycelle’s better half and Bryce’s dad. 🥰
One way to set the height of an element to 100% is to absoultely-position it yet you needed a max-width for it to follow (instead of a simple width) for layout reponse purposes.
The solution is to simply set its width to 100% and set the max-width to your desired value. For example:
[code lang=”css” title=”CSS”]
div {
position:absolute;
width:100%;
max-width:1280px;
height:100%;
background-color:red;
}
[/code]