Welcome Guest ( Log In | Register)



2 Pages V   1 2 >  
Reply to this topicStart new topic
> Question About Tables!
the_furious1
post Mar 1 2005, 11:41 PM
Post #1


Advanced Member
*******

Group: Members
Posts: 116
Joined: 28-February 05
Member No.: 4,058



How can I make tables on my web page to be static (always same size)?
I want my page to always be the same size, I don't want my text to adjust to visible on the page when you make window smaller. I want horizontal scroll bar to appear!!!
Help me!!!!
Go to the top of the page
 
+Quote Post
no9t9
post Mar 1 2005, 11:56 PM
Post #2


Privileged Member
*********

Group: Members
Posts: 773
Joined: 4-November 04
Member No.: 2,118



you can just use the style attributes for the table to specify the size. that way the table will not adjust.

example
<table style="width:200px"><tr>
<td style="width:100px"></td>
<td style="width:100px"></td>
</tr></table>

the px after the number is pixels. there are different ones but I find pixels is the easiest to work with. The other one I use (but not as often) is %.

in this example, you will have a table that is 200 pixels wide with 2 columns that are 100px wide each.

By the way... I hate horizontal scroll bars. They suck ASS. Vertical is ok...
Go to the top of the page
 
+Quote Post
beeseven
post Mar 2 2005, 12:24 AM
Post #3


Privileged Member
*********

Group: Members
Posts: 629
Joined: 26-February 05
Member No.: 3,995



Vertical are fine, it can get annoying if there's so little information on a page that there isn't one. Horizontal scroll bars are really annoying though, especially when used along with vertical.
Go to the top of the page
 
+Quote Post
the_furious1
post Mar 2 2005, 05:13 AM
Post #4


Advanced Member
*******

Group: Members
Posts: 116
Joined: 28-February 05
Member No.: 4,058



Thanks for the tip!!!
The reason why I'm doing this is that my background is different color where the menu and contents are, so when you make the window smaller my contents goes to the menu part of the page. And I don't like it!!!
Thanks again!!!
Go to the top of the page
 
+Quote Post
krap
post Mar 2 2005, 03:06 PM
Post #5


Super Member
*********

Group: Members
Posts: 204
Joined: 6-October 04
From: London, uk
Member No.: 1,444



whatever you do .. dont make a horizintal scrollbar. They are annoying by themselfs but with a vertical one I really get annoyed and i think other guys do as well
Go to the top of the page
 
+Quote Post
cse-icons
post Mar 2 2005, 03:14 PM
Post #6


Super Member
*********

Group: Members
Posts: 351
Joined: 19-October 04
From: India
Member No.: 1,824



yes, the horizontal scrollbar is very annoying...
use % of the screen in place of 'px' .

As for ur reason or background, u can use div tags and make background to fit only that div...

css is a very powerful thing.. if u can use it just right... try out... u will only be happier if u cud do it without fixing width and of course w/o horizontal scrollbar...

Cheers
Go to the top of the page
 
+Quote Post
the_furious1
post Mar 3 2005, 04:41 AM
Post #7


Advanced Member
*******

Group: Members
Posts: 116
Joined: 28-February 05
Member No.: 4,058



People you don't understand me!!!
My web page looks fine when the window is maximized!!! I just want to make sure that my tables to become smaller whenever window get smaller or when resolution is smaller that 800x600!!!

btw tip that no9t9 gave does not work for some reason!
Go to the top of the page
 
+Quote Post
HmmZ
post Mar 3 2005, 01:17 PM
Post #8


Super Member
*********

Group: Members
Posts: 362
Joined: 2-March 05
From: The Netherlands
Member No.: 4,097



Wait, you want the tables to adjust to the browsers resolution?

So if your browser is made (by hand) smaller, the tables have to automatically adjust to the browsers height and width...and the text must stay the same, with horizontal scrollbars appearing

Then you have to use % instead of px

<table width="10%" height="20%">
<tr>
<td style="background:..."></td>
<td width="" height="">your text</td>
</tr>
</table>

That should adjust the table itself to your browsers res, while the text stays on the specified width and height.

Not completely sure but it's worth a shot wink.gif
Go to the top of the page
 
+Quote Post
mizako
post Mar 3 2005, 07:07 PM
Post #9


Super Member
*********

Group: Members
Posts: 372
Joined: 16-August 04
From: Spain
Member No.: 824



Please. Do not use invisible tables to provide layout. Luckily the invisible tables time is over. It is time to move to CSS. The same static effect can be provided with CSS. Please consider moving to CSS.
Go to the top of the page
 
+Quote Post
NotoriousZach