Go Back   Velocity Reviews > Newsgroups > HTML
User Name
Password
Register FAQ Members List Calendar Search Today's Posts Mark Forums Read

Reply

HTML - Limit table cell content displayed?

 
Thread Tools Search this Thread
Old 06-17-2004, 10:35 AM   #1
Default Limit table cell content displayed?


Using IE 5.5 (sp2)

I have a table cell whose width is set to i.e <td width="100">

Several cells contents exceed this width, is there a CSS that can only
display the 1st 100px's & chop the rest?

Tried various combniations of style's using "width, clip, overflow" but
seems to just completely ignores any of these settings!

Sample table -

<table>
<tr>
<td width="85"> Access</td>
<td width="40"> aaaa</td>
<td width="100">
12345678901234567890123456789012345678901234567890 </td>
<td width="112"> 1</td>
<td width="111"> 1</td>
</tr>
</table>

thanks

harry




harry
  Reply With Quote
Old 06-17-2004, 10:57 AM   #2
Steve Pugh
 
Posts: n/a
Default Re: Limit table cell content displayed?
"harry" <> wrote:

>Using IE 5.5 (sp2)


Is that relevant? What are your users using?

>I have a table cell whose width is set to i.e <td width="100">
>
>Several cells contents exceed this width, is there a CSS that can only
>display the 1st 100px's & chop the rest?


You need to set table-layout: fixed; for the table and specify a width
for the table. Then you can specify overflow: hidden; for the cells
you want cropped.

It should go without saying that this isn't very user friendly - your
visitors will need to disable CSS to see all the content of your page.

Steve

--
"My theories appal you, my heresies outrage you,
I never answer letters and you don't like my tie." - The Doctor

Steve Pugh <> <http://steve.pugh.net/>


Steve Pugh
  Reply With Quote
Old 06-17-2004, 11:09 AM   #3
harry
 
Posts: n/a
Default Re: Limit table cell content displayed?
Thanks for that Steve will give it a go.

Sorry should have explained it's for an intranet with every user having the
same browser & version

As regards the chopping, I thought I'd set the cell's title attibute to the
full value so they can see it as a tooltip!


"Steve Pugh" <> wrote in message
news:...
> "harry" <> wrote:
>
> >Using IE 5.5 (sp2)

>
> Is that relevant? What are your users using?
>
> >I have a table cell whose width is set to i.e <td width="100">
> >
> >Several cells contents exceed this width, is there a CSS that can only
> >display the 1st 100px's & chop the rest?

>
> You need to set table-layout: fixed; for the table and specify a width
> for the table. Then you can specify overflow: hidden; for the cells
> you want cropped.
>
> It should go without saying that this isn't very user friendly - your
> visitors will need to disable CSS to see all the content of your page.
>
> Steve
>
> --
> "My theories appal you, my heresies outrage you,
> I never answer letters and you don't like my tie." - The Doctor
>
> Steve Pugh <> <http://steve.pugh.net/>





harry
  Reply With Quote
Old 06-17-2004, 03:36 PM   #4
harry
 
Posts: n/a
Default Re: Limit table cell content displayed?
thanks mate - worked perfectly!


"harry" <> wrote in message
news:b5eAc.2469$...
> Thanks for that Steve will give it a go.
>
> Sorry should have explained it's for an intranet with every user having

the
> same browser & version
>
> As regards the chopping, I thought I'd set the cell's title attibute to

the
> full value so they can see it as a tooltip!
>
>
> "Steve Pugh" <> wrote in message
> news:...
> > "harry" <> wrote:
> >
> > >Using IE 5.5 (sp2)

> >
> > Is that relevant? What are your users using?
> >
> > >I have a table cell whose width is set to i.e <td width="100">
> > >
> > >Several cells contents exceed this width, is there a CSS that can only
> > >display the 1st 100px's & chop the rest?

> >
> > You need to set table-layout: fixed; for the table and specify a width
> > for the table. Then you can specify overflow: hidden; for the cells
> > you want cropped.
> >
> > It should go without saying that this isn't very user friendly - your
> > visitors will need to disable CSS to see all the content of your page.
> >
> > Steve
> >
> > --
> > "My theories appal you, my heresies outrage you,
> > I never answer letters and you don't like my tie." - The Doctor
> >
> > Steve Pugh <> <http://steve.pugh.net/>

>
>





harry
  Reply With Quote
Old 06-17-2004, 04:12 PM   #5
Steve Pugh
 
Posts: n/a
Default Re: Limit table cell content displayed?
"harry" <> wrote:

Please don't top post.

>As regards the chopping, I thought I'd set the cell's title attibute to the
>full value so they can see it as a tooltip!


And if they want to print it? Or cut and paste the text to another
application?
Design and layout are supposed to enhance and support content not
obscure it, I think you're fixing the wrong problem.

Steve

--
"My theories appal you, my heresies outrage you,
I never answer letters and you don't like my tie." - The Doctor

Steve Pugh <> <http://steve.pugh.net/>


Steve Pugh
  Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
MCITP and stored procedure permissions Darrilgibson@gmail.com MCITP 5 06-07-2008 12:37 PM
How to Add more than one Textbox in a table cell on the fly.... tapasmahata Software 0 04-26-2008 06:37 AM
Enjoy DVD movies on your cell phone senderila Software 0 07-26-2007 11:04 AM
SafeSquid: Content Filtering Internet Proxy - free 20 user edition released Sachinpurohit Software 0 06-23-2007 04:34 PM
High Definition and the future of viewing. Allan DVD Video 3 03-09-2005 12:56 AM




SEO by vBSEO 3.3.2 ©2009, Crawlability, Inc.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46