Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > HTML > Limit table cell content displayed?

Reply
Thread Tools

Limit table cell content displayed?

 
 
harry
Guest
Posts: n/a
 
      06-17-2004
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


 
Reply With Quote
 
 
 
 
Steve Pugh
Guest
Posts: n/a
 
      06-17-2004
"harry" <(E-Mail Removed)> 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 <(E-Mail Removed)> <http://steve.pugh.net/>
 
Reply With Quote
 
 
 
 
harry
Guest
Posts: n/a
 
      06-17-2004
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" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> "harry" <(E-Mail Removed)> 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 <(E-Mail Removed)> <http://steve.pugh.net/>



 
Reply With Quote
 
harry
Guest
Posts: n/a
 
      06-17-2004
thanks mate - worked perfectly!


"harry" <(E-Mail Removed)> wrote in message
news:b5eAc.2469$(E-Mail Removed)...
> 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" <(E-Mail Removed)> wrote in message
> news:(E-Mail Removed)...
> > "harry" <(E-Mail Removed)> 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 <(E-Mail Removed)> <http://steve.pugh.net/>

>
>



 
Reply With Quote
 
Steve Pugh
Guest
Posts: n/a
 
      06-17-2004
"harry" <(E-Mail Removed)> 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 <(E-Mail Removed)> <http://steve.pugh.net/>
 
Reply With Quote
 
 
 
Reply

Thread Tools

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

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
error: Only Content controls are allowed directly in a content page that contains Content controls. hazz ASP .Net 6 06-09-2010 01:54 PM
limit on number of content placeholders(which are editable in content pages) in master page nemesis.saurabh@gmail.com ASP .Net 0 05-25-2006 04:44 AM
include the content of a url in a table cell Mel HTML 2 11-29-2005 02:51 AM
How do I have a table cell fetch another page to display within the cell? Phillip Roncoroni HTML 14 04-05-2004 05:58 PM
Problem: Altering cell content in a <TABLE> on demand edwin Boyette HTML 3 09-06-2003 07:01 AM



Advertisments