I'm trying to show a div on a webpage, with mostly text. I would like to know if I can make it smaller so that not all the contents are able to be seen. (Javascript would make it larger later on.)
+7
A:
Sure, just specify an overflow of hidden.
EG: in CSS:
#divid {
height: 100px;
overflow: hidden;
}
That'd make it cut it off after 100 pixels.
Tim Schneider
2009-11-22 04:18:41
Thanks so much.
AMWJ
2009-11-22 04:22:38
put a tick to it =D
thephpdeveloper
2009-11-22 04:35:05
A:
If you want to hide things using CSS, I'd use display:none or visibility:hidden, not putting them in a div that's too small.
Brendan Long
2009-11-22 04:34:43