a div inside of another div , needs to resize to the height of the outside div

Tongue <div style="width:500px;height:500px;><div style="width: 500px">this div needs to be as high as the first div, what code to i add to do that i have tried "width:100%"</div></div>

Keeping images aligned with the background as the browser is resized


Been trying to do this for a while and cant get my head around it.

I wish to have a gradient or pattern as a background and have some elements of my page such as the banner created slightly transparent so the background can be seen through it. The challenge is positioning the image central and keeping the background lined up with the image as the browser is resized.

You can see an example of what i mean here:


here is an example of the code I could use:


body {

Syndicate content