i'm attempting to make an image I have positioned in the center of the page, responsive (as in rescaling upon browser sizing while retaining it's position).
I've tried numerous methods (HTML and CSS only), including a popular one to add the following to the CSS:
max-width: 100%;
height: auto;
width: auto\9; /* ie8 */
However this does not seem to be working for me in Chrome or Safari.
Can anyone point me in the right direction? Thank you.
My own code is below:
<div id="contentbackground">
<div id="pagecontent">
<a href="about.html">
<img src="images/frontbanner.png" alt="Click to enter" title="Click to enter" >
</a>
</div>
</div>
and my CSS:
#contentbackground {
background: url("../images/frontcontent.jpg");
width: 100%;
min-height: 100%;
}
#pagecontent {
margin: 0 auto;
width: 960px;
padding-top: 117px;
}
#pagecontent img {
max-width: 100%;
height: auto;
width: auto\9; /* ie8 */
}