답변 4개 / 댓글 8개
채택된 답변
+20 포인트
답변에 대한 댓글 3개
.phcategory{ width: 90%; text-align: center; overflow: hidden; } .phcategoryimg { position: relative; left: 100%; margin-left: -200%; }
margin 이런거 말고 height, width 만 지정해주면 기본 동작이 님이 말한 center crop 일겁니다.
답변에 대한 댓글 3개
답변을 작성하려면 로그인이 필요합니다.

.phcategory {width:100%; margin:0 auto; overflow:hidden;}
.phcategory img {width:100%;}
이랬는데 답변보고 변경해봤는데도 가운데 정렬은 안되네요.
변경후
.phcategory {width:600px; height:100px;}
.phcategory img {width:600px; height:100px;} 입니다.