php - How to set image map in a portion of the background image? -
i know how set image map foreground image.but time want set image map portion of image,which set background image of div.how can this.i have searched lot in web,couldn't got solution.please help.for example,
html
<div class="header full" style="background:url('/hdr.jpg';?>) no-repeat; height:492px">
the entire image set background image,i want click nestle
oval portion , redirected url.
please try following code
use image , rename test.jpg please put in same folder testing , change code needs (this example)
**css** (style.css) .image{ background: url("test.jpg") repeat scroll 0 0 transparent; height: 185px; width: 266px; border: 1px solid; } .link{ padding-left: 26px; padding-top: 23px; position: absolute; } .link a{ padding-left: 0; display: block; height: 48px; width: 67px; } .container{ position: relative; }
html
<head> <link rel="stylesheet" type="text/css" href="style.css"> </head> <body> <div class="container"> <div class="link"> <a href=""> </a></div> <div class="image"> </div> </div>
Comments
Post a Comment