Is there a way to make graphical elements work like resizable Finder or Windows Explorer windows on a computer screen? I want the window to fill up 100% of the viewport with 15px margins on all sides. However, my current coding is causing the .window element to adjust according to the content rather than taking up the entire viewport with margins included. Could it be that I need to set the body/head height/width to 100% as well? What am I missing as a beginner?
.window {
background:url("http://theinspirationgallery.com/wallpaper/ivy/images/wp_ivy_142.jpg");
width:100%;
height:100%;
margin: 15px 15px 15px 15px;
}
You can view the JSFiddle here.