I have been struggling to find my answer. Isthre anyway to set the height 100% in relative positioning?
css
div{
width:100%;
height:100%;
min-height:100%;
max-height:100%;
position:relative;
background:red;
}
Yes but the parent container must have its height set to 100% as well. In your fiddle's case it will be the body
This is because the position is relative so you need to ask what is it set relative to. If you set it to 100% it will become 100% of its nearest parent so if you have a parent container that is less than 100% of the body the relative div will not fill the height of the body.