How can I set the overflow: hidden property for an absolutely positioned element. I know that setting absolute position makes an element to not be in the document flow. Here's my code. I've been trying to set overflow: hidden for the img element for so long. please help me.
HTML
<html>
<head>
<link rel="stylesheet" type="text/css" href="Style.css">
</head>
<body>
<div>
<img src="http://photoblogstop.com/wp-content/uploads/2012/07/Sierra_HDR_Panorama_DFX8048_2280x819_Q40_wm_mini.jpg"/>
</div>
</body>
</html>
CSS
body {
margin: 0;
}
div {
width: 100%;
overflow: hidden;
}
img {
position: absolute;
height: 100%;
clip: rect(0px, 678px, 600px, 0px)
}