Closed
Bug 275111
Opened 20 years ago
Closed 20 years ago
DIV tag defaults to IE NOWRAP
Categories
(Firefox :: General, defect)
Tracking
()
VERIFIED
INVALID
People
(Reporter: web, Assigned: bugzilla)
Details
In the following example, it is displayed properly in IE, Opera. It fails in both Firefox and Mozilla. Can't seem to post to mozilla folks, so please pass it on. By fail I mean that the text continues on instead of wrapping to the table width. You can make IE do this by adding the NOWRAP option to the div tag. According to my doc, all browsers are suppose to wrap (except in the case of IE and nowrap) <html> <head> <title> </title> </head> <body> <!-- Begin Table --> <table border="1" cellpadding="0" cellspacing="0" width="200"> <tr> <td rowspan="1" colspan="1"> <div nowrap id="baseball" style="position:absolute; visibility:visible; z-index:1; width=200px;height=200px;"> This is text to be shown before we overwrite it. Hopefully this wraps. </td> </div> </tr> </table> <!-- End Table --> </body> </html>
Comment 1•20 years ago
|
||
You've positioned the DIV absolutely, so it out of the normal flow. It is not constrained by the table's width. And there is no such thing in HTML 4 as a nowrap attribute on a DIV tag. The only reason it's not wrapping is you wrote width=200px instead of width:200px in the styles.
Status: UNCONFIRMED → RESOLVED
Closed: 20 years ago
Resolution: --- → INVALID
Updated•20 years ago
|
Status: RESOLVED → VERIFIED
| Reporter | ||
Comment 2•20 years ago
|
||
(In reply to comment #0) > In the following example, it is displayed properly in IE, Opera. It fails in > both Firefox and Mozilla. Can't seem to post to mozilla folks, so please pass > it on. > > By fail I mean that the text continues on instead of wrapping to the table width. > You can make IE do this by adding the NOWRAP option to the div tag. According > to my doc, all browsers are suppose to wrap (except in the case of IE and nowrap) > > <html> > <head> > <title> </title> > </head> > <body> > > <!-- Begin Table --> > <table border="1" cellpadding="0" cellspacing="0" width="200"> > > <tr> > <td rowspan="1" colspan="1"> > <div nowrap id="baseball" style="position:absolute; visibility:visible; > z-index:1; width=200px;height=200px;"> > This is text to be shown before we overwrite it. Hopefully this wraps. > </td> > </div> > > </tr> > > </table> > <!-- End Table --> > > </body> > </html> (In reply to comment #1) > You've positioned the DIV absolutely, so it out of the normal flow. It is not > constrained by the table's width. > > And there is no such thing in HTML 4 as a nowrap attribute on a DIV tag. > > The only reason it's not wrapping is you wrote width=200px instead of > width:200px in the styles. I have tried to position it everyway and it still doesn't work. I added the width and height in an attempt to constrain it. It didn't work. Try the example without it. Also, the NOWRAP is an IE exclusive. IE wraps on default as does Opera. According to my HTML references, the div tag is supposed to wrap. It doesn't in mozilla or firefox. It *acts* like the IE DIV with nowrap. I did typo the width=200px vs :200px. I just tried it, and that worked. Now, It wraps in all the other browsers without the width: tag. Would you consider this a bug? Should they really require the width tag? Is it just fudging by the other browsers? I keep going back to my html ref (albeit, it is getting older) says that the default is to wrap. This is also where I learned of the IE tag NOWRAP. Sometimes it is difficult to tell when we are following the standards, or it is something just being overlooked by the browsers due to different level of adherence to standards. Either way, thanks for pointing that out. It will work for me now.
You need to log in
before you can comment on or make changes to this bug.
Description
•