[solved] IE not stretching properly

JavaScript and client side scripting.

Moderator: General Moderators

Post Reply
User avatar
pickle
Briney Mod
Posts: 6445
Joined: Mon Jan 19, 2004 6:11 pm
Location: 53.01N x 112.48W
Contact:

[solved] IE not stretching properly

Post by pickle »

Hi all,

I'm having a problem with making IE stretch the proper table cells. Of course, Firefox behaves as I'd expect and IE craps on all my hopes and dreams :cry: :cry: :cry: ;). You can view the problem page here: http://media.augustana.ca/Directory1/Directory2/ .

Obviously, I want the middle cell to stretch, and the edge cells to not stretch.

Relevant XHTML code:

Code: Select all

<td class = "half-left" style = "width:16px;">
    &nbsp;
  </td>
  <td class = "half-stretch">
    Files
  </td>
  <td class = "half-right" style = "width:16px;">
    &nbsp;
  </td>
</tr>
Relevant CSS declarations:

Code: Select all

.half-left{
  height:30px;
  width:16px;
  background-image:url(/images/half-left.gif);
  background-repeat:no-repeat;
}
.half-stretch{
  height:30px;
  background-image:url(/images/half-stretch.gif);
  background-repeat:repeat-x;
  font-weight:bold;
  font-size:10pt;
}
.half-right{
  height:30px;
  width:16px;
  background-image:url(/images/half-right.gif);
  background-repeat:no-repeat;
}
I'm sure it's something simple - any insight will be appreciated.

Thanks!
Last edited by pickle on Wed Jan 18, 2006 3:07 pm, edited 1 time in total.
Real programmers don't comment their code. If it was hard to write, it should be hard to understand.
User avatar
Zoram
Forum Contributor
Posts: 166
Joined: Sun Aug 18, 2002 3:28 pm
Location: Utah
Contact:

Post by Zoram »

Have you tried just the <td width="16"> instead of the style to see if that displays correctly?
User avatar
pickle
Briney Mod
Posts: 6445
Joined: Mon Jan 19, 2004 6:11 pm
Location: 53.01N x 112.48W
Contact:

Post by pickle »

Doesn't work - same effect.
Real programmers don't comment their code. If it was hard to write, it should be hard to understand.
User avatar
neophyte
DevNet Resident
Posts: 1537
Joined: Tue Jan 20, 2004 4:58 pm
Location: Minnesota

Post by neophyte »

Your using id-subsection-cell in two places. ID's are intended to be used only once per page.

I think the other problem might be an alignment issue. Try align="left" in the td tag.
User avatar
pickle
Briney Mod
Posts: 6445
Joined: Mon Jan 19, 2004 6:11 pm
Location: 53.01N x 112.48W
Contact:

Post by pickle »

Thanks for the heads up re: the id - should have caught that. Unfortunately, those changes didn't do anything. You'll notice that it appears the left and right cells are expanding the same. It's almost like the middle cell reaches a maximum width then doesn't stretch any more.
Real programmers don't comment their code. If it was hard to write, it should be hard to understand.
User avatar
pickle
Briney Mod
Posts: 6445
Joined: Mon Jan 19, 2004 6:11 pm
Location: 53.01N x 112.48W
Contact:

Post by pickle »

~burrito helped me figure it out. I put the header section in it's own table. Thanks.
Real programmers don't comment their code. If it was hard to write, it should be hard to understand.
Post Reply