View Full Version : Height problem

02-01-2004, 10:12 PM
my height atribute does not seem to work :(

here the css:

height: 5px;
overflow: hidden;
the table:

<table class="ContextTable" id="ContextMenu">
<tr><td class="ContextMenu" id="LinkOne" onMouseOver="Color(this.id);Stop();Hide(1,4)" onMouseOut="UnColor(this.id);Delay()">Stuff</tr></td>
<tr><td class="HR" onMouseOver="Stop();Hide(1,4)" onMouseOut="Delay()"><hr></tr></td>
<tr><td class="ContextMenu" id="LinkTwo" onClick="PrintPage()"onMouseOver="Color(this.id);Stop();Hide(1,4)" onMouseOut="UnColor(this.id);Delay()">Print this page</tr></td>
<tr><td class="ContextMenu" id="LinkThree" onClick="Source()" onMouseOver="Color(this.id);Stop();Hide(1,4)" onMouseOut="UnColor(this.id);Delay()">View Source</tr></td>

what is wrong?

thanks for any help

02-02-2004, 01:11 PM
Define "does not work".
At any rate, correct the order in which you close your tr and td elements, so </td></tr> , and not </tr></td>; it's syntactically false and may lead more sensitive browsers astray.

Delving a bit further into the CSS2 specs, it seems to me that the height property does not apply to table cells; try to specify it for the table row it is in instead.

02-02-2004, 11:25 PM
no :(

the thing is that i can make the table cell as big as i want with my height but i cant make it smaller......

i tried the table row and it still didnt work :(

Roy Sinclair
02-02-2004, 11:33 PM
If you want to shrink the cells you can use the CSS "clip" to slice off the content at an arbitrary point.

02-03-2004, 06:48 PM
COOL can you give me an example on how to use clip?

Roy Sinclair
02-03-2004, 07:37 PM
See http://www.w3.org/TR/REC-CSS2/visufx.html#propdef-clip

02-03-2004, 11:30 PM
thanks that helps alot :)

02-05-2004, 07:43 PM
clip doesnt work :(

<img class="Court" src="court.gif">


overflow: hidden;
clip: rect(10 10 10 10);

Roy Sinclair
02-05-2004, 08:36 PM
Sorry, that's all I could think of.

02-05-2004, 11:24 PM
but did i do something wrong?

i have seen clip workin on images before, but not for me :(