HighDots Forums  

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

alt.html.tags alt.html.tags


Discuss span tag with width style attribute doesn't work in Firefox in the alt.html.tags forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Frank Rizzo
 
Posts: n/a

Default span tag with width style attribute doesn't work in Firefox - 12-10-2005 , 04:49 PM






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>

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.

Reply With Quote
  #2  
Old   
Jukka K. Korpela
 
Posts: n/a

Default Re: span tag with width style attribute doesn't work in Firefox - 12-10-2005 , 06:06 PM






Frank Rizzo <none (AT) none (DOT) com> wrote:

Quote:
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
It's very poor code. It's actually completely wrong. Besides, your question
is about CSS, not about HTML tags.

Quote:
In IE, it displays just like I intended:
IE misbehaves as usual.

Quote:
Firefox ignores the 'width' attribute.
That's correct.

Try googling for "CSS FAQ". Try posting to the right group if problems
remain, and don't forget to include a URL and to explain what you are really
trying to achieve.

--
Yucca, http://www.cs.tut.fi/~jkorpela/
Pages about Web authoring: http://www.cs.tut.fi/~jkorpela/www.html




Reply With Quote
  #3  
Old   
Ed
 
Posts: n/a

Default Re: span tag with width style attribute doesn't work in Firefox - 12-11-2005 , 06:08 PM



Jukka K. Korpela wrote:
Quote:
Frank Rizzo <none (AT) none (DOT) com> wrote:


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


It's very poor code. It's actually completely wrong. Besides, your question
is about CSS, not about HTML tags.


In IE, it displays just like I intended:


IE misbehaves as usual.


Firefox ignores the 'width' attribute.


That's correct.

Try googling for "CSS FAQ". Try posting to the right group if problems
remain, and don't forget to include a URL and to explain what you are really
trying to achieve.

hey, are you a sadist or what? Sometimes, posters do make a genuine
mistake and post to the wrong list. But so what. Can't you just kindly
accept that? No need for agressive response. You might even know the
answer to the prob that is reported..

Ed



Reply With Quote
  #4  
Old   
Kurt Kroon
 
Posts: n/a

Default Re: [OT] span tag with width style attribute doesn't work inFirefox - 12-16-2005 , 12:23 AM



On 12/11/05 3:08 PM, "Ed" <ex@directory> wrote:

Quote:
hey, are you a sadist or what? Sometimes, posters do make a genuine
mistake and post to the wrong list. But so what. Can't you just kindly
accept that? No need for agressive response. You might even know the
answer to the prob that is reported..

Ed
You don't know him very well, do you?

It's nice to know that some things never change: water flows downhill and
Jukka is surly. For years, I've wanted to ask him why, but I have decided
that it doesn't really matter.

If his attitude offends you, ignore him -- but you should realize that doing
this will cause you to miss out on his advice, which is usually on-the-mark.

Eventually, you have to choose which bothers you more.

Kurtis
Sacramento, CA, USA



Reply With Quote
  #5  
Old   
Jim Michaels
 
Posts: n/a

Default Re: span tag with width style attribute doesn't work in Firefox - 02-03-2006 , 02:47 AM




"Frank Rizzo" <none (AT) none (DOT) com> wrote

Quote:
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>


Quote:
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.



Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.