Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to display only few lines of content & expand instantly on demand? 1

Status
Not open for further replies.

may1hem

Programmer
Jul 28, 2002
262
GB
I have a Web page which displays a large table. Each row of the table has lots of text in it, which means the user has to scroll through a lot of text to find what they're looking for.

I want to show just the first 10 words of each row, and when the user wants to read more then they just need to click on the text to expand it. How can this be done with HTML / CSS?

I've seen it on the Microsoft site and on other sites. What's the simplest way that this can be done?

Thx for your help,

May
 
You could use the CSS overflow:hidden property on your cells in conjunction with height:30px or something, so that excessive text is cut short. Then use DHTML to expand the cells whe the user clicks a link for example.

petey
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top