Closed Bug 191093 Opened 22 years ago Closed 22 years ago

max-width style doesn't work

Categories

(Core :: DOM: CSS Object Model, defect)

x86
Windows XP
defect
Not set
normal

Tracking

()

RESOLVED INVALID

People

(Reporter: tonn81, Assigned: jst)

Details

User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.3a) Gecko/20021212
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.3a) Gecko/20021212

When I apply style that set maximum and width of the object by max-width to
table, it still makes wider instead of wrapping data in it

Reproducible: Always

Steps to Reproduce:
1. Create a table with max-width property set
2. Fill the table with many wrapable data
3. Open in a browser
4. See a bug

Actual Results:  
Table is wider than set in it's property

Expected Results:  
Fix table's width and wrap it's data

<style>
.wide {max-width: 50%}
</style>
<table class='wide'>
<tr><td>jh dg dfg gfdg gd gdg gdf gf fdg fdg fdg dffdg g gdg dg dfgd<td>jh dg
dfg gfdg gd gdg gdf gf fdg fdg fdg dffdg g gdg dg dfgd<td>jh dg dfg gfdg gd gdg
gdf gf fdg fdg fdg dffdg g gdg dg dfgd<td>jh dg dfg gfdg gd gdg gdf gf fdg fdg
fdg dffdg g gdg dg dfgd<td>jh dg dfg gfdg gd gdg gdf gf fdg fdg fdg dffdg g gdg
dg dfgd</tr>
<tr><td>jh dg dfg gfdg gd gdg gdf gf fdg fdg fdg dffdg g gdg dg dfgd<td>jh dg
dfg gfdg gd gdg gdf gf fdg fdg fdg dffdg g gdg dg dfgd<td>jh dg dfg gfdg gd gdg
gdf gf fdg fdg fdg dffdg g gdg dg dfgd<td>jh dg dfg gfdg gd gdg gdf gf fdg fdg
fdg dffdg g gdg dg dfgd<td>jh dg dfg gfdg gd gdg gdf gf fdg fdg fdg dffdg g gdg
dg dfgd</tr>
<tr><td>jh dg dfg gfdg gd gdg gdf gf fdg fdg fdg dffdg g gdg dg dfgd<td>jh dg
dfg gfdg gd gdg gdf gf fdg fdg fdg dffdg g gdg dg dfgd<td>jh dg dfg gfdg gd gdg
gdf gf fdg fdg fdg dffdg g gdg dg dfgd<td>jh dg dfg gfdg gd gdg gdf gf fdg fdg
fdg dffdg g gdg dg dfgd<td>jh dg dfg gfdg gd gdg gdf gf fdg fdg fdg dffdg g gdg
dg dfgd</tr>
</table>
Sorry, today I could not enter w3c cite, so I could use only my local
documentation. And there stated max-size excluded from tables.
I've used O'REILLY CSS Reference and it says that max-width, max-height,
min-width and min-height present is CSS and i think (just logical thoughts) that
thoose atributes can be applied to any obj, even to tables.
By the way, while making web-sites I understood that this attribute can be quite
useful for tables, that allows to have tables thin when there is no data and
wider (but not wider than a screen) when there is a lot of data
According w3c spec (http://www.w3.org/TR/REC-CSS2/visudet.html#min-max-widths):

'min-width'
    Value:  	<length> | <percentage> | inherit
    Initial:  	UA dependent
    Applies to:  	all elements except non-replaced inline elements and table
elements

Sorry, wrong paragraph:

'max-width'
    Value:  	<length> | <percentage> | none | inherit
    Initial:  	none
    Applies to:  	all elements except non-replaced inline elements and table
elements

So this bug is invalid.
Actually, the O'Reilly CSS Pocket Reference doesn't mention max-width, and
O'Reilly's "CSS: The Definitive Guide" says on page 314 that 'max-width' applies
to all elements except nonreplaced inline elements and table elements.  Plus,
the specification says that same thing, and the specification is always right. 
I agree the bug is invalid.
INVALID it is.
Status: UNCONFIRMED → RESOLVED
Closed: 22 years ago
Resolution: --- → INVALID
You need to log in before you can comment on or make changes to this bug.