473,768 Members | 5,794 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

DIV borders different in IE7 when in td

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
Jun 27 '08 #1
15 2583
On Apr 29, 11:00 am, "Davo" <wave_...@hotma il.comwrote:
oops - its at http://members.iinet.com.au/~da...@powerup.com.au/
Not found. Try using em instead of pixels for your font-size units
Jun 27 '08 #3
>
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
Jun 27 '08 #4
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.
Jun 27 '08 #5
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.)

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

Jun 27 '08 #6
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
Jun 27 '08 #7
On 2008-04-29, Jukka K. Korpela <jk******@cs.tu t.fiwrote:
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/~d****@powerup.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.
Jun 27 '08 #8
On 2008-04-29, Davo <wa******@hotma il.comwrote:
>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.
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.
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.
in IE7 the behaviour seems to have changed.
I think you found a new bug.
Jun 27 '08 #9
On 2008-04-29, Ben C <sp******@spam. eggswrote:
[...]
OP's actual example was different from his description. This is his URL:
http://members.iinet.com.au/~d****@powerup.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.
Jun 27 '08 #10

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
3461
by: Hostile17 | last post by:
I've been trying to figure out a good way to make a CSS layout with nice-looking 1-pixel borders around the table cells. The only broadly compatible way to do this I know of is to have * the border of the table set to zero * the cellspacing of the table set to one * the background color set to black * the table cell background color set to white
3
18275
by: Christian Knoflach | last post by:
Hi everyone, well i know the CSS-Entity "border-style:dotted", but it doesn't work for me - i need 1 Pixel dotted borders, but "border-style:dotted" creates (on my IE 6, at least) dashed borders (2 Pixels wide). Is there anything to take care of too or is it simply not possible to do this with CSS/HTML? Thanks for your tips,
12
2685
by: Gnolen | last post by:
Hi, I am really getting crazy here! I just do not get why this happens with the borders of the td/tr! I just want a border on the bottom of the rows(or td) but I just can't do it!!! I have tried so many different ways but I just thought this would do it: td {border-bottom: #000000 1px solid;} But no! What am I doing wrong? Because I can have a border of a td or tr in FF, right?! Thankful for any help here! Table and CSS is below..
1
2722
by: Melissa | last post by:
A form in my database has multiple subforms. If any subform has no data, the borders of the subform still display on screen and also are printed if I print the main form. Reports are different. If a subreport has no data, the borders of the subreport do not appear in Print View nor do they print with the report. I need the borders to print whether the subreport has data or not. Is there any way to get the subreport borders to print when a...
1
1744
by: Melissa | last post by:
Sorry if this becomes a repeat! I am having trouble with my newsreader and don't know if this got posted yeserday or not or if anyone responded. A form in my database has multiple subforms. If any subform has no data, the borders of the subform still display on screen and also are printed if I print the main form. Reports are different. If a subreport has no data, the borders of the subreport do not appear in Print View nor do they print...
1
5848
by: Glen Vermeylen | last post by:
Hi, For a project at school we have to automate the assignment of seats in classrooms to students during the exams. The lady who previously did everything manually kept the layouts of the classrooms in an excel-document: 1 sheet per classroom, and she marked the cells which represent the seats with a border. The problem however is that she sometimes merged cells together to get a better layout.
10
7738
by: Matt Kruse | last post by:
See: http://www.mattkruse.com/temp/offsetleft.html It appears that the offsetLeft value in IE6 (other versions not tested) incorrectly ignores the border width on a DIV when there is a width: property specified. Without a specified width: it gets it correct. Does anyone know 1) If this is a known bug, and if it affects any other browsers? I tested a few and found no problems.
5
3043
by: sitko | last post by:
Hi, I'm done a little HTML here and there over the years...but nothing professionally. Now I'm working on a project which calls for some simple HTML. Here is my markup, for the life of me I can't figure out why the chart borders aren't showing up. <html><body> <table border=”1”> <tr> <td>Measurement locations</td><td>Description</td><td>elapsed time, </td><td>Data: Dock A (AFF) </td><td>Model: min. T_mix</td><td>Model: ...
2
30958
by: nicstel | last post by:
Hello, I'm trying to find documentation about the xlwt (py_excelerator). I want to change the border of some cells. But the only types that I found is: double and dashed. How to do a simple line and what is the all other border type name? "borders: top double, bottom double, left double, right double;" Thank You Nicolas
0
9575
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
10171
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10015
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
9842
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
6656
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5280
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
3931
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3534
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2808
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.