Forum Moderators: not2easy

Message Too Old, No Replies

FF text

         

collymellon

10:31 am on Jun 6, 2005 (gmt 0)

10+ Year Member



Hi all,

I have a table layout (few rows,few collums), in one of the cells I have a content div with the width set to 365px, fill this with text and all is well in IE (as you prob guessed!)but in FF the text just overflows to the right, like this:

IE:

content content
content content
content content
content content

FF:

content content content content content content
content content content content content content

Its like its not complying to the set width; any ideas?

CSS:

#content{
width: 365px;
height: auto;
}

HTML:

<TD style="WIDTH: 396px" vAlign="top">
<div id="content" style="WIDTH: 376px; HEIGHT: 233px">
content content etc
content content etc
</DIV>

createErrorMsg

11:04 am on Jun 6, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



all is well in IE (as you prob guessed!)but in FF the text just overflows to the right

What is probably happening is that the table in which this cell resides does not have 365px worth of width to give to the div. IE is exhibiting it's auto-enclosing behavior and ignoring the width setting (i.e., it makes containers bigger to contain bigger content), whereas FF is respecting the width setting of the table cell and allowing the content to run out of it.

Check the table's width to make sure it has enough room to house a div that wide. It also wouldn't hurt if you posted the table code w/ CSS here for us to see.

Also note that the widths given by your CSS are different from those given by your inline styles. Inline styles have a higher specificity so they will override the external.

cEM