Click to See Complete Forum and Search --> : Display a lot of information
hibbeac1
12-11-2003, 08:00 AM
Hi everyone i am currently doing a website in PHP, where i need to display a lot of information from a database. My issue though is with HTML. I was wandering whether you can have a really big table that is bigger than the page i.e you need to scroll sideways to see some of the information. If anyone knows this or can think of a better way of showing the information please could you reply.
giggledesign
12-11-2003, 08:13 AM
if you are meaning what i think you are then the answer is simply yes. you can use html width and height to change the size of the table and you can create a table that is bigger that the page, forcing the user to scroll around the page looking for information!
if you want then you can create an autostretch, thus entitles you to stretch or shrink the table width to match the users page width,
<table width="100%" height="500" cellspacing="0">
<tr>
<td width="100%"></td>
</tr>
</table>
does that answer your question?
paper
12-11-2003, 12:54 PM
do this:
<table width="900px" height="500px">
instead of:
<table width="100%" height="100%">
By using pixels instead of percent, u can go OVER the 100% of the window. Play around with the numbers until it gets to what you want.
I think this was the answer u were looking for??;)
lcscne
12-11-2003, 01:59 PM
Gosh I didn't realize pixles out-smarted percentages? I would have thought
<table width="110%" height="110%" border="1">
<tr>
<td> </td>
</tr>
</table>
would work too. Well by golly it does work, so maybe PERCENTS ARE WHAT THE MAN NEEDS.
paper
12-11-2003, 02:04 PM
:confused: so percents work too, huh?
whodathunkit...
i should have known.. >__<
jaegernaut
12-11-2003, 02:36 PM
IMHO
In the end, I think that we are missing a requirement to see which is the better way to go.
If we are just looking to have a table that is larger than any screen size that hits the site, then the percentages will work fine.
If, however, the issue is that you need a minimum amount of horizontal space, then px is the way to go.
Example:
We are displaying a report in which each record needs 1000px of space to keep each row on one line.
If we used percentages we would have to include code to replace the percentages depending on the screen resolution to keep the minimum width of the table at least 1000 px.
If we used the px we could set the table to 1000 px and anyone with a lower res would scroll and those that were over, say 1280 x 1024, wouldn't have a scroll.
We don't really have the information to see if this is the case, but it seems to make a difference on which would be the better way to go.
At least that's the way it looks to me. :D
spufi
12-11-2003, 11:14 PM
*Oops* ;)
spufi
12-11-2003, 11:16 PM
I think it's ok to have the user scroll to the left and right only if they don't also have scroll up and down. One kind of scrolling is ok, two is bad.
giggledesign
12-12-2003, 04:36 AM
yea i agree! it is very annoying.
i usually use percentages over pixels but whatever floats your boat!
hibbeac1
12-12-2003, 09:41 AM
Thanks for your reply. I used pixels as for some reason when i used percentages no scroll bar came up. Does look a bit unsightly is width 1800px. Will probably think of other way of displaying info and give users an option between which way they display it.