php - Making div a clickable link -
i have php search script parses results html div elements make styling results easier. have following code:
<div class='webresult'><div class='title'><a href='{$row['url']}'>{$row['title']}</a></div><div class='url'>{$row['url']}</div><div class='desc'>{$row['description']}</div></div>
i want make when whole webresult div clicked on, goes url of result.
i hope people can understand i'm trying describe.
if want make entire div clickable, try style <a>
element block element , make size equivalent parent <div>
, i.e.,
.title { display: block; width: 100%; height: 100%; }
Comments
Post a Comment