?
Solved

Table and Table Cell Widths

Posted on 2009-04-18
7
Medium Priority
?
263 Views
Last Modified: 2012-05-06
I need to format a table so that it is exactly 1250px where the individual columns are specific width. If I set the width of the parent table tag to 1250 and each of the child td tags so that the sum of the td tags is 1250 - shouldn't the IE6 respect the explicit widths?

I've got a situation where IE6 is altering the widths of the cells and I can't figure out why.

Any ideas.

I'll post code as soon as I have it split out its a part of a ASP.NET page and will take some time.
0
Comment
Question by:Mick87
  • 3
  • 3
7 Comments
 
LVL 14

Expert Comment

by:theras2000
ID: 24177444
Is the table mostly empty?  If my memory serves me, you need something inside all the cells of at least 1 row.  I think even just a   will do.  I haven't coded html in a while, but I seem to remember something like that.
0
 
LVL 28

Expert Comment

by:gamebits
ID: 24177692
2 things with table

1) IE will not display the cell if it's empty but Firefox will
2) If the object in a cell is bigger than the cell (like an image) the cell will expand to accomodate the object, regardless of the set width.
0
 

Author Comment

by:Mick87
ID: 24186152
I'm actually reworking the markup to see if that helps. The project is a telephone directory that includes the ability to see a person's assistants. The assistant information is in a nested table. For aesthetic considerations, I want the information to appear seamlessly to the user where the assistant information appears as just another row(s) below the primary person. The information can be hidden/shown on demand. Moving one step out, the directory information resides within a fixed height div that scrolls on overflow which then led to my placing the header information outside of the div - the result being what appears to be a scrollable table.
0
Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

 

Author Comment

by:Mick87
ID: 24187767
I think that the problem was two fold - first, there was a hidden column which I did not take into account on a table cell that I set to span all columns - the colspan was off by one. Second, the formatting isn't consistent because there is a nested repeater that conditionally adds a table. Since the asp:repeater does not contain any template if there's no data things the lack of it was jacking things up. I realize that doesn't help anyone else out too much as I haven't given any examples, but the time it would take to present one isn't worth trying it given that the time could be spent trying to fix it.
0
 

Accepted Solution

by:
Mick87 earned 0 total points
ID: 24187786
The solution that I'm going with is to leave the table and cell widths undefined and provide div's with defined width's within each cell. Its a suggestion that I found elsewhere.
0
 
LVL 28

Expert Comment

by:gamebits
ID: 24187821
the way I handle this kind of situation usualy is by writing my code in such a way that I always have something to display or at least have a hidden place holder, kind of an image saying there is no image to display, this way I can "stabilise" the table by having consistent object within the cell.

if there is data display it
if not display the default value.
0
 
LVL 28

Expert Comment

by:gamebits
ID: 24187841
Also Firefox has a add on called web developer that you can download it allow you to show the cells and/or the table without having to actually set a border for each one I found it very usefull to debug tables issues.
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article describes how to create custom column layout styles for Bootstrap. The article uses 5 columns to illustrate the concept, but the principle can be extended to any number of columns.
The first step to building an amazing About page is to figure out what you want the page to say about your company. You then must grab the attention of the reader, boast a bit, tell a story and let others brag about you. With a little bit of thought…
The viewer will the learn the benefit of plain text editors and code an HTML5 based template for use in further tutorials.
The viewer will learn how to create a basic form using some HTML5 and PHP for later processing. Set up your basic HTML file. Open your form tag and set the method and action attributes.: (CODE) Set up your first few inputs one for the name and …
Suggested Courses

839 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question