User not logged in - login - register
Home Calendar Books School Tool Photo Gallery Message Boards Users Statistics Advertise Site Info
go to bottom | |
 Message Boards » » html table question Page [1]  
spfreak182
Veteran
376 Posts
user info
edit post

I'm tryin out a new web design for my website, and I can't get some of my tables to stretch all the way across the screen.

Here's a screenshot:


The top, side, center and bottom are all serperate php files, the table I'm worried about here is that second table to the right.

Here's a segment of my code starting off that table:

Quote :
"<table cellspacing="0" cellpadding="1" border="0" bgcolor="#2d3851" width="100%"><tr><td>
<table cellspacing="0" cellpadding="1" border="0" bgcolor="#bfc4cb" width="100%"><tr><td>
<table cellspacing="0" cellpadding="2" border="0" bgcolor="#ffffff" width="100%"><tr><td>
<table cellspacing="0" cellpadding="1" border="0" bgcolor="#2d3851" width="100%"><tr><td>
<table cellspacing="0" cellpadding="5" border="0" bgcolor="#5f7797" width="100%" >
<tr bglor="5f7797">"


So, since all my tables have a width of 100% I don't know why its not going all the way across. Every table in all the top, side and bottom files are 100% too. I would like to get that table to work with percentages, because if i use pixels, then i have to worry about different resolutions and all that.

So, any suggestions?

[Edited on January 27, 2006 at 12:00 AM. Reason : .]

1/26/2006 11:58:17 PM

Woodfoot
All American
60354 Posts
user info
edit post

doesn't the 100% just make it so it goes as wide as it needs to?

you should look at setting a fixed width for it

1/27/2006 12:02:53 AM

spfreak182
Veteran
376 Posts
user info
edit post

yeah, you're right. ha, i should of known that.

I think I'll use the javascript var screen.width to get the user's x-res and then use php to dynamically set a fixed width based on that. thanks.

1/27/2006 12:08:24 AM

Stein
All American
19842 Posts
user info
edit post

Please don't use table based layouts.

Especially with like 17 nested tables

1/27/2006 1:22:22 AM

sccrdude1
All American
611 Posts
user info
edit post

^is there a reason you say that? I'm new to web design and I use tables all the time. Is there a better way to do it?

1/27/2006 1:49:49 AM

agentlion
All American
13936 Posts
user info
edit post

CSS and divs.
If you're just starting learning web design now, you have an advantage over people who learned 5-10 years ago - you can skip the whole 'doing everythign with tables' phase that the rest of us went through in the late 90's.

there's thousands of articles on how to use CSS
http://www.skimcss.com/skimlist
http://www.alistapart.com/articles/practicalcss/
http://www.google.com/search?q=css+div+layout

1/27/2006 2:32:11 AM

sccrdude1
All American
611 Posts
user info
edit post

awesome, I use CSS but only for getting all the text and stuff to match up. Now something else for me to learn to help me procrastinate from all the work I should be doing...Thanks!

1/27/2006 2:35:53 AM

 Message Boards » Tech Talk » html table question Page [1]  
go to top | |
Admin Options : move topic | lock topic

© 2024 by The Wolf Web - All Rights Reserved.
The material located at this site is not endorsed, sponsored or provided by or on behalf of North Carolina State University.
Powered by CrazyWeb v2.39 - our disclaimer.