Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Crop Image from Bottom by CSS

Tags:

html

css

image

I want to crop a image from the bottom whose height is too much.

Like a image whose height is around 2400px, I want to take its 600px upper part only.

Fiddle Link

like image 853
Govind Singh Avatar asked Dec 13 '14 06:12

Govind Singh


1 Answers

You need to do the work in the container, not the image. I forked your fiddle and added the height limit to the article container and overflow: scroll just to demonstrate the point. You can use overflow: hidden if you really want to crop it.

http://fiddle.jshell.net/7b01ednx/

with overflow: hidden

http://fiddle.jshell.net/t2wksLa5/

like image 173
Lawrence Avatar answered Sep 17 '22 17:09

Lawrence