Scrollbar in Table?

  Charence 16:29 27 May 06
Locked

Hi, I'm currently having trouble setting the height of a cell in a table. It will only let me set the value in pixels, but I would like to use percentage so that the page will display properly on all screen resolutions.

I've used div> tags to allow the cell to be scrollable.

td>
div style="height: 420px; overflow:auto;">
cell content
/div>
/td>

Is it possible to make the height a percentage instead?

Thanks

Charence
click here for site

  Forum Editor 16:48 27 May 06

was to wonder why you want the text to be in a table cell in the first place - it's a slight irritation to have to scroll to read. It might look far better just laid out as text on the page in the first place, especially as there's not much of it.

Anyway, in answer to your question click here

  Charence 16:52 27 May 06

Thanks FE. It wasn't my decision to have the text in a scrollable cell, the other people in my group said they want it to be like that. I'll try to change their minds :-)

Thanks

  PurplePenny 18:01 28 May 06

You can use percentages for the height of a td. Have you tried adding the height to the td instead of the div?

  PurplePenny 18:08 28 May 06

Did you change their minds? I didn't have to scroll anything - even when I enlarged the text.

P.S. Weren't you at school when you first posted to the forum?

  Charence 18:18 28 May 06

:-) Yes I eventually managed to change their minds and yes I think I was doing GCSEs when I first posted here.

I just tried adding height to td but it seems to be a lower limit, it's only used when the number of lines doesn't exceed the height. Setting a tr height seems to have similar effects. Maybe I'm doing something wrong?

Thanks for your help FE and PurplePenny; I'll tick this now, but I'm still interested how/if this can be done.

Charence

  Charence 18:01 02 Jun 06

Thank you once again everyone.

Here's what the final product looks like...I've just handed it in.
click here

Charence

This thread is now locked and can not be replied to.

What is Amazon Go and will it come to the UK? The store without checkouts or queues

1995-2015: How technology has changed the world in 20 years

Hands-on with the Star Wars fighting drones you can fly yourself

15 macOS Sierra tips | How to use macOS Sierra: Secret tricks and best new features in Apple's new…