Sign Up   Sign In

Join the community!
Sign in now with your Facebook account.
ForumsTechnicalThread
Forum
Advanced Search
Filter     |   View Watchlist
[ Print Friendly ] [ Watch Thread ]


HTML - Fixed cell size in tables? [ 1 ]
MichyGeary
MichyGeary
HEAT WAVE
FORUM MOD
#1   Posted 1 year ago
    [ Reply ]   [ Quote ]
I'm tearing my hair out trying to get this damn cell to stay one fixed height. I know that using "width" and "height" attributes don't work on the <td> tag. There's got to be a way to do this, right? I tried some CSS, but that shit kicked my ass right out the door. Help?

Post edited 12/01/08 5:32PM
Strider165 is online
Strider165
Gunners
FORUM MOD
#2   Posted 1 year ago
    [ Reply ]   [ Quote ]
Perhaps something like this?

<div style="height: 100px;
width: 400px; overflow: hidden">
MichyGeary
MichyGeary
HEAT WAVE
FORUM MOD
#3   Posted 1 year ago
    [ Reply ]   [ Quote ]
Okay. Explain it to me like I'm dumb. Where do I put that?
Strider165 is online
Strider165
Gunners
FORUM MOD
#4   Posted 1 year ago
    [ Reply ]   [ Quote ]
I believe you enclose the content in that. Why exactly do you want fixed size tables anyway?
MichyGeary
MichyGeary
HEAT WAVE
FORUM MOD
#5   Posted 1 year ago
    [ Reply ]   [ Quote ]
In reply to Strider165, #4:

Because all the extra space in the "Notes" cell is really annoying.
Hockeypuck
Hockeypuck
#6   Posted 1 year ago
    [ Reply ]   [ Quote ]
I'm not sure if this will fix it, but not having a consistent DOCTYPE declaration at the top of your page can wreak havoc on rendering engines. Decide on a spec, (HTML 4.01, for instance) and stick to it.
Shrew
Shrew
Sponsor
#7   Posted 1 year ago
    [ Reply ]   [ Quote ]
I dunno what kind of HTML you learned, but when I learned it, I learned it the quotations way.

Ie, height="200" instead of height=200px.

Other than that, I got nothing, the source code looks fine to me.
MichyGeary
MichyGeary
HEAT WAVE
FORUM MOD
#8   Posted 1 year ago
    [ Reply ]   [ Quote ]
Well sure, that'd work fine if height was a legitimate attribute for the cells.
papercup
papercup
#9   Posted 1 year ago
    [ Reply ]   [ Quote ]
When I took your page's source and removed the height line from the notes TD, the only space in the cell was the amount defined in the cellpadding for the table definition. If I changed the cellpadding to zero, the text was right up next to the edge of the cell. Is it that you only want the poem's cell padded? (You can do that by embedding a table inside the poem's TD and giving *that* table cellpadding). Something more like:

<table cellpadding=0 cellspacing=0 border=0>
<tr>
<td rowspan=2>
<table cellpadding=25 cellspacing=0 border=0 width=100% height=100%>
<tr><td>Roses are red, violets are also red, I'm color blind.</td></tr>
</table>
</td>
<td>Notes notes notes</td>
</tr>
<tr>
<td>purtypic</td>
</tr>
</table>

(I forgot what your cellspacing was, you may want it changed in the first table)

Would something like that fix your spacing issue?
MichyGeary
MichyGeary
HEAT WAVE
FORUM MOD
#10   Posted 1 year ago
    [ Reply ]   [ Quote ]
In reply to papercup, #9:

I put the cellpadding and cellspacing in for a reason. There needs to be space between the cells, and there needs to be space within the cells to read the text well -- but I've set those values relatively low, just to give them enough space to "breathe." However, I have discovered that, if you view the page in FireFox, there actually is no problem, and the blank space below the Notes text does not exist. In Internet Explorer, however, there is a giant, GIANT amount of space below the line and before the image. IE is that with which the computer at school, from which I will be projecting this webpage, is equipped.
KWierso is online
KWierso
BEARSHAFT
#11   Posted 1 year ago
    [ Reply ]   [ Quote ]
In reply to MichyGeary, #10:

It doesn't even look good in the IE8beta...
SpitFireJay
SpitFireJay
#12   Posted 1 year ago
    [ Reply ]   [ Quote ]
In reply to MichyGeary, #10:

it might be time to redesign it in dreamweaver - you know cheat a bit.
papercup
papercup
#13   Posted 1 year ago
    [ Reply ]   [ Quote ]
Give this a shot then. I did and it looks fine in all browsers I tried (IE6, IE7, FF1, FF2, Safari). I took out the rowspan and just used embedded tables.

<table border=0 cellspacing=15 cellpadding=0>
<tr>
<td>
<table border=0 cellpadding=25 height=100% width=100%>
<tr><td>Poem goes here</td></tr>
</table>
</td>
<td>
<table border=0 cellpadding=25 cellspacing=15 height=100% width=100%>
<tr><td>Note here</td></tr>
<tr><td>Pic here</td></tr>
</table>
</td>
</tr>
</table>
[ 1 ]