This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.

Bug 25481 - enhancement: some way to set width, height of span without causing line break
Summary: enhancement: some way to set width, height of span without causing line break
Status: NEW
Alias: None
Product: CSS
Classification: Unclassified
Component: CSS Level 2 (show other bugs)
Version: unspecified
Hardware: PC Windows NT
: P2 normal
Target Milestone: ---
Assignee: Bert Bos
QA Contact: public-css-bugzilla
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-04-27 08:30 UTC by Jim Michaels
Modified: 2014-04-27 08:30 UTC (History)
0 users

See Also:


Attachments

Description Jim Michaels 2014-04-27 08:30:40 UTC
would someone like to propose some ideas for making it possible to set width,height of a span element without causing a line break? 

this seems to be an old problem a number of web devs would like to have solved. some browsers have this implemented, but apparently the spec in CSS2 10.3.1 and the lack of usable values for display property makes this seemingly impossible. 

setting a width and height should do what average joe user would think it does, set the width and height, without causing a line break like div does. float doesn't always work for an answer, because it reworks the flow of the content and may mess things up so it's unusable (with float in).

example problem:
when I make line counters, the width is always not set regardless of value of display property or combination with float:left. no css-only solution available.
thanks.

this seems to stem from block vs. inline thing. apparently block elements always are forced to cause a line break and I wish this wasn't so. it would be nice if there was some css to turn off (?)line-break on block level elements. that might solve a lot of problems and time I spend trying to get around being forced to use float. I would have to look somewhere to see if display:inline-block or display:run-in supports what I am describing, but when I try to use it with a counter, it doesn't work. when I try this out as just
http://Jesusnjim.com/web-design/DHTML/set-width-height-on-span.html
fails with current version of line numbering in http://JesusnJim.com/web-design/DHTML/js-associative-arrays-and-for-in.html (see code.css and /encode-decode-entities.js).