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.