Span is an inline element and cannot have a width applied to it, unless you
display it as a block, which would sort of defeat the purpose of having it
inline. 

-----Original Message-----
From: jquery-en@googlegroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of nmiddleweek
Sent: Friday, November 07, 2008 9:46 AM
To: jQuery (English)
Subject: [jQuery] span tag is width:80px but is only showing the width of
contents?


Hello,

I've got a SPAN tag which is set to 80px...

<span style="width:80px; background-color:#00FF00;">A</span>


The contents of the SPAN is a single character and when rendered on screen,
the green SPAN is showing as only approx 15 pixels in width.

How can I force the width to be 80px?


Thanks,
Nick


Reply via email to