...

View Full Version : Height problem



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

here the css:


.HR{
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>
</table>

what is wrong?

thanks for any help

ronaldb66
02-02-2004, 12: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.

JAVAEOC
02-02-2004, 10: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, 10:33 PM
If you want to shrink the cells you can use the CSS "clip" to slice off the content at an arbitrary point.

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

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

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

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

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

CSS:

.Court{
overflow: hidden;
clip: rect(10 10 10 10);
}

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

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

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



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum