Say I have a span block, I want to make the entire block clickable. But NOT the sides. Ex: (too lazy to take screenshot and upload file so will use basic ascii)
[0000000088888888000000000]
The [ ] represent browser window, the 0's represent the entire page, the 8's represent the actual block.
I don't want to be able to click on the 0 part and still it being clickable. I want to have to click on the actual block. For some reason I can't figure out how to make this work. I tried using a div and span (I can never really figure out the difference between the two) but the result is the same. How do I get this to behave properly?
Here's my code:
HTML:
CSS:
[0000000088888888000000000]
The [ ] represent browser window, the 0's represent the entire page, the 8's represent the actual block.
I don't want to be able to click on the 0 part and still it being clickable. I want to have to click on the actual block. For some reason I can't figure out how to make this work. I tried using a div and span (I can never really figure out the difference between the two) but the result is the same. How do I get this to behave properly?
Here's my code:
HTML:
Code:
<br>
<a class="serviceselect" href="'.$GLOBAL['baseurl'].'&act=regform&serviceid='.$data['sid'].'"><span class="serviceselect"><font style="font-size:24px;text-decoration:none">'.$data['sname'].'</font><br>'.$data['sattendees'].'/'.$data['scapacity'].' filled </span></a> <br><br>
<br>
CSS:
Code:
span.serviceselect
{
width:500px;
border:2px solid #333333;
background:#2e6599;
padding:10px;
color:#dddddd;
display: block;
}
a.serviceselect
{
text-decoration:none;
}
span.serviceselect:hover
{
background:#1b3c5b;
}