div#pagewrapper { display: block; overflow: hidden; } div#p_items { overflow: hidden; height: 100%; width: 100%; } div.p_item { height: 100%; width: 100%; } div.p_item > a { width: 128px; height: 128px; box-shadow: 2px 2px 6px 0px rgb(0, 0, 0); margin: 4px; float: left; outline: none; box-shadow: inset 0 0 10px #4c4a4a; } div.p_item > a > img.thumb { border: 2px solid black; transition: .1s ease-out; } div.p_item > a > img.thumb:hover { box-shadow: 0px 0px 0px 2px #dac8d2; border-radius: 5px; transition: .1s ease-in; }