Talk About Network

Google


Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Programming > Html Tags > Re: span tag wi...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 5 of 5 Topic 381 of 447
Post > Topic >>

Re: span tag with width style attribute doesn't work in Firefox

by "Jim Michaels" <jmichae3@[EMAIL PROTECTED] > Feb 2, 2006 at 11:47 PM

"Frank Rizzo" <none@[EMAIL PROTECTED]
> wrote in message 
news:h3Imf.2034$3Z.1286@[EMAIL PROTECTED]
>I have the following code.
> <span style="width:100px;background-color:Red;">text</span>
> <span style="width:100px;background-color:Green;">test</span>
> <span style="width:100px;background-color:Blue;">test</span>

I don't suppose a table is out of the question...  yeah, it forces a line 
break. you can set the width attribute on td cells and on the table.

try float:left on a div - it took the line breaks right out of my div
tags. 
see if it works cross-browser.  I got great results with
<div style="width:100px;background-color:Red;float:left;">text</div>
<div style="width:100px;background-color:Green;float:left;">test</div>
<div style="width:100px;background-color:Blue;float:left;">test</div>


>
> In IE, it displays just like I intended:  100 pixels of red color, 
> followed by 100 pixels of green color, followed by 100 pixels of blue 
> color all on the same line.
>
> Firefox ignores the 'width' attribute.  It only displays the red color 
> enough to display the word 'test'.  I can't use the DIV tag because it 
> forces a line break.  I need all this stuff to be on the same line.
>
> What can I do to replicate the behaviour above in Firefox?
>
> Thanks.
 




 5 Posts in Topic:
span tag with width style attribute doesn't work in Firefox
Frank Rizzo <none@[EMA  2005-12-10 21:49:01 
Re: span tag with width style attribute doesn't work in Firefox
"Jukka K. Korpela&qu  2005-12-10 23:06:39 
Re: span tag with width style attribute doesn't work in Firefox
Ed <ex@[EMAIL PROTECTE  2005-12-11 23:08:19 
Re: [OT] span tag with width style attribute doesn't work in
Kurt Kroon <kroon@[EMA  2005-12-15 21:23:41 
Re: span tag with width style attribute doesn't work in Firefox
"Jim Michaels"   2006-02-02 23:47:07 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Thu Oct 16 0:48:30 CDT 2008.