html - Remove space around clickable image -
i'm trying place clickable image in center using padding
.
the problem there lot of unwanted clickable space around image now. can click image edges of screen although image in middle of screen.
if remove padding
works image isn't want.
is there way fix this?
my html:
<body> <div class="page"> <div class="body"> <div id="clicktoenter"> <h1><a href="home.html" class="home" title="home link"></a></h1> </div> </div> </div> </body>
my css:
.body{ width:940px; margin:0 auto; padding:0 10px; overflow:hidden; } .home{ margin-bottom: 10px; width: 460px; height:460px; display:block; background:url(../images/image.png) center center no-repeat; padding:200px 200px; } .home:hover{ background:url(../images/imageclick.png) center center no-repeat; padding:200px 200px; }
change margin , center, not using padding.
.home{ margin:200px auto 200px auto; width: 460px; height:460px; display:block; background:url(../images/image.png) center center no-repeat; }
Comments
Post a Comment