html - Linking an IMG inserted from CSS to another page when clicked? -
just wanting know if it's possible insert link html page when click image have inserted via css.
width : 50%; height : 40px; float : left; background-image:url(buttons/btn_name.png); background-repeat: no repeat; background-size : 100% 100%;
for example, when click "btn_name" image when it's displayed in div have inserted into, how link "home" page via css? appreciated.
your requirement not clear far understood want make div clickable linked page. if so, there many ways way want this. put css rules in class
.link { width : 50%; height : 40px; float : left; background-image:url(buttons/btn_name.png); background-repeat: no repeat; background-size : 100% 100%; }
and anchor tag above class name
<a class="link" href="page.html">link text</a>
if don't want text visible add following property in .link css class
text-indent:-9999px;
now image linked "page.html".
if can provide more detailed requirement code may can better solution.
Comments
Post a Comment