HighDots Forums  

DIV borders different in IE7 when in td

HTML Writing HTML for the Web (comp.infosystems.www.authoring.html)


Discuss DIV borders different in IE7 when in td in the HTML forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Davo
 
Posts: n/a

Default DIV borders different in IE7 when in td - 04-28-2008 , 07:59 PM






Hello,

I've created a table with two columns, the second column is fixed width at
64px and contains a div, the div has a border and contains some text, the
text renders to larger than 64px. This is a cut down version of a more
complex page to illustrate the problem so just changing it to divs or some
such wont help.

In IE6 and FF2 the div border automatically stretches to contain the text,
in IE7 the div is set to 64px and stays there, I don't think this is the
correct behaviour, but I can't seem to find another mention of this problem,
could anyone give me some pointers?

tia,
Dave



Reply With Quote
  #2  
Old   
Davo
 
Posts: n/a

Default Re: DIV borders different in IE7 when in td - 04-28-2008 , 08:00 PM






oops - its at http://members.iinet.com.au/~daven (... (DOT) com.au/



Reply With Quote
  #3  
Old   
Patricia Aldoraz
 
Posts: n/a

Default Re: DIV borders different in IE7 when in td - 04-28-2008 , 10:08 PM



On Apr 29, 11:00 am, "Davo" <wave_... (AT) hotmail (DOT) com> wrote:
Not found. Try using em instead of pixels for your font-size units


Reply With Quote
  #4  
Old   
Davo
 
Posts: n/a

Default Re: DIV borders different in IE7 when in td - 04-28-2008 , 10:57 PM



Quote:
Not found. Try using em instead of pixels for your font-size units
Not sure what you received it didn't seem to be what I sent try
http://tinyurl.com/6gnpuc
if you're curious. However your em suggestion seems to have fixed it, thanks
very much. It was on my list of things to change it to ems, but wasn't a
high priority, would you have a reason?

thanks again,
Dave




Reply With Quote
  #5  
Old   
Davo
 
Posts: n/a

Default Re: DIV borders different in IE7 when in td - 04-28-2008 , 11:30 PM



I spoke to soon, changing to em just hid the problem, effectively changing
the size to a couple of hundred px. Any other ideas are welcome.



Reply With Quote
  #6  
Old   
Jukka K. Korpela
 
Posts: n/a

Default Re: DIV borders different in IE7 when in td - 04-29-2008 , 12:57 AM



Scripsit Davo:

Quote:
I spoke to soon, changing to em just hid the problem, effectively
changing the size to a couple of hundred px. Any other ideas are
welcome.
Try learning how to post to Usenet.

Try learning how to post to the right group. This group is for HTML, not
CSS.

Decide whether you want to work in "quirks mode" or not. This depends on
whether you are working with some existing mess or creating a new page.
See
http://www.cs.tut.fi/~jkorpela/quirks-mode.html

Specifically, in "quirks mode", a block with declared width may expand
when overflow occurs. By the specifications, it does not. (By default,
the textual or other content just overflows, outside the block's box and
any eventual border.)

--
Jukka K. Korpela ("Yucca")
http://www.cs.tut.fi/~jkorpela/



Reply With Quote
  #7  
Old   
Davo
 
Posts: n/a

Default Re: DIV borders different in IE7 when in td - 04-29-2008 , 02:26 AM



Quote:
Specifically, in "quirks mode", a block with declared width may expand
when overflow occurs. By the specifications, it does not. (By default, the
textual or other content just overflows, outside the block's box and any
eventual border.)
We're not in quirks mode. The div block should inherit the container box
size is my understanding, after having a little reread of the box model docs
I still think that is how it should work. In both FF2 and IE6 the div
inherited the container (td) width when the contained text expands the block
(which is how it should work), in IE7 the behaviour seems to have changed.

Perhaps *you* should think a little before shooting off your mouth ;-), if
you have something to contribute then thanks, otherwise perhaps stick to
areas you know.

cheers,
Dave




Reply With Quote
  #8  
Old   
Ben C
 
Posts: n/a

Default Re: DIV borders different in IE7 when in td - 04-29-2008 , 02:34 AM



On 2008-04-29, Jukka K. Korpela <jkorpela (AT) cs (DOT) tut.fi> wrote:
Quote:
Scripsit Davo:

I spoke to soon, changing to em just hid the problem, effectively
changing the size to a couple of hundred px. Any other ideas are
welcome.

Try learning how to post to Usenet.

Try learning how to post to the right group. This group is for HTML, not
CSS.

Decide whether you want to work in "quirks mode" or not. This depends on
whether you are working with some existing mess or creating a new page.
See
http://www.cs.tut.fi/~jkorpela/quirks-mode.html

Specifically, in "quirks mode", a block with declared width may expand
when overflow occurs. By the specifications, it does not. (By default,
the textual or other content just overflows, outside the block's box and
any eventual border.)
I have never seen that quirk, but that's probably because I never run
IE.

OP's actual example was different from his description. This is his URL:
http://members.iinet.com.au/~daven (... (DOT) com.au/

He's actually set the 64px on the TD, not on the DIV.

Davo:

Table cells should never go narrower than the minimum width required by
their contents. Normal flow block boxes (like default DIV) get the width
you set, overflowing if necessary. If you don't set a width then they
take all the width available. That is why the blue border fills the TD
and is wider than 64px.

This is all specified and should work properly in strict mode.

If IE7 is making your table-cell 64px wide that looks very wrong and
sounds like a regression from IE6. If it's a regression it can't be
justified as a "backwards compatible quirk" either.

CSS 2.1 17.5.2.2 is the relevant section of the spec. Although the
automatic table layout algorithm is not "normative", I can't see any
logical reason for IE7 to be giving you the behaviour you report. Report
it to Microsoft as a bug.


Reply With Quote
  #9  
Old   
Ben C
 
Posts: n/a

Default Re: DIV borders different in IE7 when in td - 04-29-2008 , 02:40 AM



On 2008-04-29, Davo <wave_877 (AT) hotmail (DOT) com> wrote:
Quote:
Specifically, in "quirks mode", a block with declared width may expand
when overflow occurs. By the specifications, it does not. (By default, the
textual or other content just overflows, outside the block's box and any
eventual border.)

We're not in quirks mode.
Good. Keep it that way.

Quote:
The div block should inherit the container box size is my
understanding, after having a little reread of the box model docs I
still think that is how it should work.
No. Width is not inherited. But the "used value" (the one the browser
works out and actually uses) for width: auto on a normal flow block is
calculated so that the box's horiziontal outer margin edges fill all the
space available.

Quote:
In both FF2 and IE6 the div inherited the container (td) width when
the contained text expands the block (which is how it should work)
It's not inheritance. But the behaviour you see in FF2 is correct.

Quote:
in IE7 the behaviour seems to have changed.
I think you found a new bug.


Reply With Quote
  #10  
Old   
Ben C
 
Posts: n/a

Default Re: DIV borders different in IE7 when in td - 04-29-2008 , 02:41 AM



On 2008-04-29, Ben C <spamspam (AT) spam (DOT) eggs> wrote:
[...]
Quote:
OP's actual example was different from his description. This is his URL:
http://members.iinet.com.au/~daven (... (DOT) com.au/

He's actually set the 64px on the TD, not on the DIV.
Looking at his description again I think he actually said that. My
mistake.


Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.