Scrollbar in table

J

John M

Hello,

I have a html site with a fixed size table. I want to add a lot of texts to
one specific area of the page. I don't want to resize the tables and cells
because of the design. So I want to add a scrollbar to read the text.
Is it anyhow possible to add a scrollbar to a cell or what method can I use?

Thanks for your help?
 
W

Weyoun the Dancing Borg

John said:
Hello,

I have a html site with a fixed size table. I want to add a lot of texts to
one specific area of the page. I don't want to resize the tables and cells
because of the design. So I want to add a scrollbar to read the text.
Is it anyhow possible to add a scrollbar to a cell or what method can I use?

Thanks for your help?

As far as I am aware, you can't add a scroll bar to a table. That isn't
what tables were designed to do. I would suggest putting in a small
description and a link to another page with the full text.
 
B

Barry Pearson

John said:
Hello,

I have a html site with a fixed size table. I want to add a lot of
texts to one specific area of the page. I don't want to resize the
tables and cells because of the design. So I want to add a scrollbar
to read the text.
Is it anyhow possible to add a scrollbar to a cell or what method can
I use?

Wrap the content of the cell concerned in a <div>. Then control the <div> with
CSS.

HTML:
<td>
<div id="somecell">
Stuff goes here Stuff goes here Stuff goes here Stuff goes here Stuff goes
here Stuff goes here Stuff goes here
</div>
</td>

CSS:
#somecell {
width: 50px;
height: 50px;
overflow: auto;
}

(Choose your own parameters).
 
S

SpaceGirl

Weyoun the Dancing Borg said:
As far as I am aware, you can't add a scroll bar to a table. That isn't
what tables were designed to do. I would suggest putting in a small
description and a link to another page with the full text.

You can't, but you can place the table inside a DIV (layer) and enable the
overflow property in CSS. This will give scrollbars (with caution, there are
glitches if you do this inside IE when rendering XHTML).
 
S

SpaceGirl

John M said:
Hello,

I have a html site with a fixed size table. I want to add a lot of texts to
one specific area of the page. I don't want to resize the tables and cells
because of the design. So I want to add a scrollbar to read the text.
Is it anyhow possible to add a scrollbar to a cell or what method can I use?

Thanks for your help?


Put the table in a layer, and use the overflow property in CSS.
 
D

DU

Weyoun said:
As far as I am aware, you can't add a scroll bar to a table. That isn't
what tables were designed to do.


"(...) This division [THEAD, TFOOT and TBODY elements] enables user
agents to support scrolling of table bodies independently of the table
head and foot."

HTML 4.01 11.2.3 Row groups: the THEAD, TFOOT, and TBODY elements
http://www.w3.org/TR/html401/struct/tables.html#h-11.2.3

Scrolling tbody has been supported in Mozilla since version 0.9.2.

DU

I would suggest putting in a small
 
W

Weyoun the Dancing Borg

SpaceGirl said:
You can't, but you can place the table inside a DIV (layer) and enable the
overflow property in CSS. This will give scrollbars (with caution, there are
glitches if you do this inside IE when rendering XHTML).


oops, why didn't I think of that? :)

But a question - when I've done it before, I've ended upw ith scroll
bars for both verticle and horizontal. Since I'm still learning CSS I
couldn't get rid of the horizontal scroll bar - I assume there's a way?
 
K

Kris

You can't, but you can place the table inside a DIV (layer) and enable the
overflow property in CSS. This will give scrollbars (with caution, there are
glitches if you do this inside IE when rendering XHTML).
[/QUOTE]

No. When IE6 goes to 'Standards' mode, due to a correct DocType
declaration, whish is easily to get rid of by being 'more correct' in
XHTML and adding an XML declaration in front of the DocType line.
oops, why didn't I think of that? :)

But a question - when I've done it before, I've ended upw ith scroll
bars for both verticle and horizontal.

Often, room for one is causing the other, it seems.
Since I'm still learning CSS I
couldn't get rid of the horizontal scroll bar - I assume there's a way?

Meditate and forget about it. UA User Interface is not a webdevelopers
problem.
 
S

SpaceGirl

Weyoun the Dancing Borg said:
oops, why didn't I think of that? :)

But a question - when I've done it before, I've ended upw ith scroll
bars for both verticle and horizontal. Since I'm still learning CSS I
couldn't get rid of the horizontal scroll bar - I assume there's a way?

Layer inside a layer... by making the inner layer not as wide as the outer
layer, and only having overflow (scrolling) turned on in the outer layer
results in only a vertical scrollbar - even in XHTML mode (assuming IE
hasn't gone into glitch mode). Paste the example below into you page and
give it a try....


<div style="position:absolute; top:250px; left:100px; width:200px;
height:400px; overflow:auto">
<div style="position:absolute; top:0px; left:0px; width:100px;">
<p>xxxxxxxx</p>
<p>xxxxxxxx</p>
<p>xxxxxxxx</p>
<p>xxxxxxxx</p>
<p>xxxxxxxx</p>
<p>xxxxxxxx</p>
<p>xxxxxxxx</p>
<p>xxxxxxxx</p>
<p>xxxxxxxx</p>
<p>xxxxxxxx</p>
<p>xxxxxxxx</p>
<p>xxxxxxxx</p>
<p>xxxxxxxx</p>
<p>xxxxxxxx</p>
<p>xxxxxxxx</p>
<p>xxxxxxxx</p>
<p>xxxxxxxx</p>
<p>xxxxxxxx</p>
<p>xxxxxxxx</p>
<p>xxxxxxxx</p>
</div>
</div>
 
S

SpaceGirl

You can't, but you can place the table inside a DIV (layer) and enable
the
No. When IE6 goes to 'Standards' mode, due to a correct DocType
declaration, whish is easily to get rid of by being 'more correct' in
XHTML and adding an XML declaration in front of the DocType line.

IE still screws up. Try placing an iframe inside a layer in IE while
rendering XHTML... it totally screws with IE's DOM if you have any
scripts...
Meditate and forget about it. UA User Interface is not a webdevelopers
problem.

That is frankly the most daft thing I have ever heard. Perhaps that's why
you are a web developer and not a web designer? Visual design for the web is
*all about* UI... it's more about the UI (design, whatever you want to call
it) than the content most of the time! Part of being a good designer,
however, is knowing when and where to place navigational elements.
 
R

rf

[scroll bars AFAICT]
IE still screws up. Try placing an iframe inside a layer in IE while
rendering XHTML... it totally screws with IE's DOM if you have any
scripts...

Er, IE does not support XHTML. At all. If you give it XHTML it error
corrects it back to HTML so the results are, at best, random.
That is frankly the most daft thing I have ever heard. Perhaps that's why
you are a web developer and not a web designer? Visual design for the web is
*all about* UI... it's more about the UI (design, whatever you want to call
it) than the content most of the time!

The web developer/designer should be concerned about the web *page*. The UA
is responsible for rendering the page onto its user interface, the viewport,
the canvas.

Why should the developer/designer anticipate what shape the viewport has and
then venture to assign scrollable areas within that viewport?

At best we get additional scroll bars.

At worst we get, as I often see, a little tiny area, usually about 400x200
pixels big, in the middle of my 1100x1200 canvas, containing the content.
Part of being a good designer,
however, is knowing when and where to place navigational elements.

Scroll bars are *not* navigational elements. They are accessories to allow
the viewport to move around on the "page". As such they should be part of
the user interface, not the page.

Part of being a good designer is admitting that one does not know at all
what the users environment is and knowing how to let the viewers browser
adjust the page to the users environment.

Cheers
Richard.
 
N

Neal

Visual design for the web is
*all about* UI... it's more about the UI (design, whatever you want to
call
it) than the content most of the time!

It's intended to deliver the content effectively, so it is subordinate to
the content.

If you're talking positioning and such, ok. If you're talking about
scrollbars and other chrome; to be successful at this, you must know how
the user agent works, and you do not. There are too many, and there's no
convention established for altering the chrome of a user agent. Even those
few things we can do to alter chrome items are not dependable, and frankly
rarely if ever improve usability on all systems while not deteriorating
usability on others.
 
S

SpaceGirl

Er, IE does not support XHTML. At all. If you give it XHTML it error
corrects it back to HTML so the results are, at best, random.

It sort of supports it. It gets very fragile once it's displaying something
with XHTML content.

The web developer/designer should be concerned about the web *page*. The UA
is responsible for rendering the page onto its user interface, the viewport,
the canvas.

I agree, to an extent. If there is a scrollable area WITHIN a page (such as
an iframe), perhaps you dont want double scrollbars? A bit of careful design
can produce validating HTML that will prevent both scrollbars appearing.
Now, is that messing with the UI? After all it's a "glitch" that makes the
horizontal scroll appear in the first place (other browsers dont display
it)...
Why should the developer/designer anticipate what shape the viewport has and
then venture to assign scrollable areas within that viewport?

Agreed, at least for the outer view port. But I thought we were talking
about scrollbars within scrolling elements of a page, rather than the
container page itself?
At best we get additional scroll bars.

At worst we get, as I often see, a little tiny area, usually about 400x200
pixels big, in the middle of my 1100x1200 canvas, containing the content.

That's just poor design, not misuse of the technology. There are good
reasons to use fixed sized iframes, for example - and fixed sized scrollable
layers.
Scroll bars are *not* navigational elements. They are accessories to allow
the viewport to move around on the "page". As such they should be part of
the user interface, not the page.

Okay, so when you play Unreal on your computer, you should complain that
they have messed with the UI... after all, where are the scrollbars?

The browser itself should not be messed with (remember when everyone went
through the stage of having 'chromeless' browsers? gawwwwd that was
awful!) - but once you're inside the bounds of the browser outer frame, I
don't see what's wrong with taking control over *all* display elements.
Part of being a good designer is admitting that one does not know at all
what the users environment is and knowing how to let the viewers browser
adjust the page to the users environment.

In an ideal world, yes. In the real world, no. While a designer *should*
design something that is flexible enough to display on anything, this is
often no feasible. Remember, the web is a communication device, and it does
*not* have to communicate with everyone!


m.
 
S

SpaceGirl

It's intended to deliver the content effectively, so it is subordinate to
the content.

If you're talking positioning and such, ok. If you're talking about
scrollbars and other chrome; to be successful at this, you must know how
the user agent works, and you do not. There are too many, and there's no
convention established for altering the chrome of a user agent. Even those
few things we can do to alter chrome items are not dependable, and frankly
rarely if ever improve usability on all systems while not deteriorating
usability on others.

That's an illusion, Neal. Over 90% of user agents are IE of some sort. So
you *do* know what 90% of people are using, and you can drill this down
further if you research your audience. Perhaps if you are designing a
research site for a university, you'd find 90% of user agents would be
something other than IE - or if you are designing web sites for the music
industry over 90% of your audience will have soundcards. I dont know, but
you simply cannot make blanket statements - and it's a falicy to think that
there is any 'one way' that a web site should be designed for everyone. You
simply cannot please everyone, or satisfy the needs of all browsers, not
matter what you do.

As for scrollbars - it would depend, I think. Iframes (or scrolling layers)
within a page *could* justify control over which bars appear from a visual
design point of view. It's not as if you have to colour the things or
anything...
 
T

Toby A Inkster

rf said:
Er, IE does not support XHTML. At all. If you give it XHTML it error
corrects it back to HTML so the results are, at best, random.

Wrong. IE "corrects" XHTML back to some internal muddle tree in its
memory. The same can be said of IE's support for HTML.
 
K

Kris

Meditate and forget about it. UA User Interface is not a webdevelopers
problem.

That is frankly the most daft thing I have ever heard. Perhaps that's why
you are a web developer and not a web designer?[/QUOTE]

I'm both. Your turn again.
Visual design for the web is
*all about* UI...

Not the browser's UI.
it's more about the UI (design, whatever you want to call
it) than the content most of the time!

In some applications of webdesign it is. In most it is about the content.
Part of being a good designer,
however, is knowing when and where to place navigational elements.

The thing is that you don't place browser UI. The browser does.
 
S

SpaceGirl

That is frankly the most daft thing I have ever heard. Perhaps that's
why
I'm both. Your turn again.

If you say so.
Not the browser's UI.

Why not? You've not given me any good reasons yet.
In some applications of webdesign it is. In most it is about the content.

the design is part of the content these days :)
The thing is that you don't place browser UI. The browser does.

Obviously not the case - the fact that you can turn on and off scrollbars in
layers are a demonstration of the fact. And hey, it's even in the W3C spec.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,756
Messages
2,569,540
Members
45,025
Latest member
KetoRushACVFitness

Latest Threads

Top