Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Using IE6, IE7 and Firefox (if it m 1

Status
Not open for further replies.

Kalisto

Programmer
Feb 18, 2003
997
GB
Using IE6, IE7 and Firefox (if it matters)

I have a number of pages on an intranet site where the 'buttons' are composed of an <a> tag wrapped round a span.

Code:
<a href="somepage">Button Text<span></span></a>

On one of the pages these buttons are in a table, and the span makes them fill the table cell.

However, Only the text in the span is clickable. Is there any way of making the whole span, no matter how wide it is clickable?

Apologies of Ive not explained this very well!

 
Yes, you need to convert span or even better the anchor (<a>) to be a block level element and for IE (6 at least, not sure about 7) you will also have to add width 100% to make it work.

___________________________________________________________
[small]Do something about world cancer today: PACT[/small]
 
Hmm, from my (Brief) research on this, I cant make <a> block level?
 
Sure you can:

<a href="" style="display:block;"></a>


Or have it inside a style sheet and give the <a> a class.

----------------------------------
Ignorance is not necessarily Bliss, case in point:
Unknown has caused an Unknown Error on Unknown and must be shutdown to prevent damage to Unknown.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top