PHP includes resizing my page

06-24-07, 04:21 PM
|
|
Newbie Coder
|
|
Join Date: Dec 2003
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
|
PHP includes resizing my page
I have my main index page ( here) and my content page ( here)
and as you can see, it's aligned exactly as it should be.
Now, when I try to include a content page inside the white space on the index page ( here) it resizes my tables for some reason and adds all that extra white space on the right side. I've tried everything I can think of -- both tables should be 709px in width, and both are when seperated. It's just once I try to use includes that everything goes haywire.
I'm hoping this is just a simple fix, but I'm desperate -- any ideas?
Thanks
|

06-24-07, 04:23 PM
|
 |
Community Liaison
|
|
Join Date: May 2005
Location: Antwerp, Belgium
Posts: 3,165
Thanks: 4
Thanked 25 Times in 25 Posts
|
|
I moved it to the HTML/XHTML forum, as this is not related to php. The php include function only includes the html, it doesn't change anything to it.
__________________
"Good judgement comes from experience, and experience comes from bad judgement." - Fred Brooks
|

06-28-07, 11:13 PM
|
 |
Community VIP
|
|
Join Date: Apr 2006
Location: Los Angeles, CA
Posts: 660
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
Your index.html page is redirecting to a different page, so it's hard to see what you are talking about.
Also, you might want to try validating your page first. There are lots of errors being returned by the validator...
A little FYI: this page is a prime example of why it is bad to use HTML tables to control layout. You have inline scripts, widths, borders, margins all defined within the tag and I see cells spanning 20+ rows or columns...that's going to be a nightmare to maintain. You should at least check out CSS, if not table-less layouts.
But if you get all of your links working, maybe someone will be able to help you find a quick fix. Just keep in mind that small changes might end up breaking your layout again in the future.
|

06-29-07, 12:48 AM
|
 |
Aspiring Coder
|
|
Join Date: Nov 2003
Posts: 506
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
Tables are incredible when you know how to use them.. +1 on the validation
|

06-29-07, 04:41 AM
|
 |
Community Liaison
|
|
Join Date: Dec 2006
Location: Tacoma, Washington USA
Posts: 3,454
Thanks: 0
Thanked 140 Times in 137 Posts
|
|
Tables work wonders if used wisely.
__________________
Jerry Broughton
|

06-29-07, 02:18 PM
|
|
Wannabe Coder
|
|
Join Date: Oct 2004
Posts: 183
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
Quote:
|
Tables are incredible when you know how to use them
|
Quote:
|
Tables work wonders if used wisely.
|
For layout?!
For tabular data, sure thats what they were made for! Layout however, thats just plain wrong!
|

06-29-07, 02:54 PM
|
 |
Community Liaison
|
|
Join Date: Dec 2006
Location: Tacoma, Washington USA
Posts: 3,454
Thanks: 0
Thanked 140 Times in 137 Posts
|
|
Quote:
|
For tabular data, sure thats what they were made for! Layout however, thats just plain wrong!
|
Well all I can say is "we agree to disagree".
__________________
Jerry Broughton
|

06-29-07, 04:57 PM
|
 |
Level II Curmudgeon
|
|
Join Date: Dec 2004
Posts: 3,027
Thanks: 14
Thanked 35 Times in 33 Posts
|
|
Quote:
Originally Posted by ben.periton
For tabular data, sure thats what they were made for! Layout however, thats just plain wrong!
|
That is, frankly, a ridiculous attitude to have. Over-relying on CSS for layout (something it was NOT developed for) more closely fits the term "wrong".
A 500px table will look exactly the same in every browser ever made. The same cannot be said of a CSS-rendered layout. Opera, FireFox, IE, Konquerer, Gallion, WebTV, Cello, etc etc etc will all render CSS slightly differently, and that's a fact.
There's nothing "wrong" with using tables for layout.
|

06-29-07, 06:21 PM
|
 |
Aspiring Coder
|
|
Join Date: Nov 2003
Posts: 506
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
:-) Thank you
Ill stick with tables as they have better browser compatibility as said by End User
|

06-29-07, 09:48 PM
|
 |
Community VIP
|
|
Join Date: Apr 2006
Location: Los Angeles, CA
Posts: 660
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
And the endless war continues...
Quote:
Originally Posted by End User
There's nothing "wrong" with using tables for layout.
|
It depends on your definition of "wrong." If by "wrong," you mean "goes against the W3's (the guys who create the standards which browser vendors are supposed to follow) reccommendation" then using tables for layouts is wrong.
Quote:
|
Tables should not be used purely as a means to layout document content as this may present problems when rendering to non-visual media. Additionally, when used with graphics, these tables may force users to scroll horizontally to view a table designed on a system with a larger display. To minimize these problems, authors should use style sheets to control layout rather than tables.
|
(from the HTML 4.01 Specification)
Quote:
Originally Posted by End User
That is, frankly, a ridiculous attitude to have. Over-relying on CSS for layout (something it was NOT developed for) more closely fits the term "wrong".
|
CSS wasn't developed to control layout??? Cascading Style Sheets? Again, I'd refer you to the CSS specification. The whole point of CSS is to separate presentation from structure - presentation being colors, fonts, positioning, etc. Using CSS to control layouts for web pages is exactly what it was developed for.
Quote:
Originally Posted by End User
A 500px table will look exactly the same in every browser ever made. The same cannot be said of a CSS-rendered layout. Opera, FireFox, IE, Konquerer, Gallion, WebTV, Cello, etc etc etc will all render CSS slightly differently, and that's a fact.
|
Someone with well structured markup and a good knowledge of CSS can overcome cross-browser issues. Also, keep in mind that people are accessing the internet from more and more devices now, not just computers/WebTV (do people actually still use WebTV???) If you use a table to layout your web page, you're going to be stuck using that same table when you serve your page to a mobile phone. Using CSS you can serve different styles depending upon what type of device is trying to access your page.
So don't assume using tables is a catch-all solution. It is "wrong" and is only going to make maintenance more difficult, create accessibility issues, and increase page weights. But then again, who wants to actually learn CSS? 
|
|
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
|
|
|
| Thread Tools |
|
|
| Display Modes |
Linear Mode
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
|