Crop sides of image to size of screen and center align it

sajidsahaab

New Member
I have an image which runs along the width of my site. It is contained in a div with width set to 100%. The image itself is 2560px in width.I would like the image to be the same width as the page in the browser view, as currently it makes the page longer.Simply setting the width of the image to 100% has the effect of making it smaller and disproportionate.Searching suggests it may be possible by setting the \[code\]max-width\[/code\] to 100%, but this only cuts the end of the image off.Is there a way to maintain the center alignment, i.e. to crop both ends of the image so that it always remained centered?Many thanks.
 
Back
Top