Revert "Revert "add image sizing function""

This reverts commit 6a155880d27a1bcad654c376af9ae9607454ecd7.
modify sizing function
apply Math.ceil for img size
cut margin
cleaning style.css