Closed
Bug 281313
Opened 20 years ago
Closed 20 years ago
SPAN ignores width css-attribute
Categories
(Firefox :: General, defect)
Tracking
()
People
(Reporter: usmail4matt, Assigned: bugzilla)
Details
Attachments
(1 file)
1.06 KB,
text/html
|
Details |
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.5) Gecko/20041107 Firefox/1.0
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.5) Gecko/20041107 Firefox/1.0
yep <span style="width:150px">Firefox</span> yep
does not work properly; the width is ignored.
Reproducible: Always
Steps to Reproduce:
1. a<span style="width:150px">Firefox</span>b
2. if you see "aFirefoxb" instead of "aFirefox b" this isnt correct.
Actual Results:
the same problem
Expected Results:
it should render the SPAN with a fixed width.
Comment 1•20 years ago
|
||
SPAN is by default an inline element, and width and height don't apply to inline
elements.
*** This bug has been marked as a duplicate of 34415 ***
Status: UNCONFIRMED → RESOLVED
Closed: 20 years ago
Resolution: --- → DUPLICATE
Reporter | ||
Comment 2•20 years ago
|
||
> SPAN is by default an inline element,
> and width and height don't apply to inline elements.
Oh sure width does - how can I fix the width of a non-block element?
Even if it's not in the specification, all other browsers I tested do support
fixed with for inline-elements, as well as height.
The main difference between inline and block elements is that there is a break
after a block-element.
What can I do if i only wanted an element to be of fixed width, WITHOUT having
a break afterwards? As I would expect the behaviour of width and height css
attributes, they should be doing exactly that - sizing an element (no matter
what type of element).
Status: RESOLVED → UNCONFIRMED
Resolution: DUPLICATE → ---
Comment 3•20 years ago
|
||
(In reply to comment #2)
> What can I do if i only wanted an element to be of fixed width, WITHOUT having
> a break afterwards?
That would be by using "display: inline-block;" which currently isn't supported
in Mozilla.
*** This bug has been marked as a duplicate of 34415 ***
Status: UNCONFIRMED → RESOLVED
Closed: 20 years ago → 20 years ago
Resolution: --- → DUPLICATE
Comment 4•20 years ago
|
||
You can also put all the block elements in a table, then use "display: inline;"
on the table.
Reporter | ||
Comment 5•20 years ago
|
||
(In reply to comment #3)
> That would be by using "display: inline-block;" which
> currently isn't supported in Mozilla.
ok, cheers.
I think I'll have to wait for version 2 *], i mean the users of my website.
can make a note onto that 'cause it think many of them are using firefox.
---
(In reply to comment #4)
> You can also put all the block elements in a table,
> then use "display: inline;" on the table.
sounds good, but I cant do so in this very special case. it's a xslt
generating a wizard ui (html) whereby I have fields that need captions. thing
is, several fields can be in one row so i cannot construct a table, but what i
want is to fix the width of the captions so the field text-boxes are all
aligned.
Comment 6•20 years ago
|
||
Threw this together really quick. It's very ugly but it works.
Updated•20 years ago
|
Attachment #173582 -
Attachment description: Example → Ugly Example
Reporter | ||
Comment 7•20 years ago
|
||
(In reply to comment #4 and #6)
> You can also put all the block elements in a table,
> then use "display: inline;" on the table.
OH YES I CAN!
simply putting a inline table around caption and field text-box works right
for all browsers.
thanx a lot.
PS: you're very fast - didn't expect my bug being touched before next week.
well, it 3am here in germany, didn't expected anyone to react by now.
You need to log in
before you can comment on or make changes to this bug.
Description
•