tags:

views:

147

answers:

2

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
Thanks so much.
AMWJ
put a tick to it =D
thephpdeveloper
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
Thanks, but I wanted to make it enlarge slowly.
AMWJ