Current location: Hot Scripts Forums » General Web Coding » HTML/XHTML/XML » PHP includes resizing my page


PHP includes resizing my page

Reply
  #1 (permalink)  
Old 06-24-07, 04:21 PM
Arkinia Arkinia is offline
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
Reply With Quote
  #2 (permalink)  
Old 06-24-07, 04:23 PM
UnrealEd's Avatar
UnrealEd UnrealEd is offline
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

Reply With Quote
  #3 (permalink)  
Old 06-28-07, 11:13 PM
jfulton's Avatar
jfulton jfulton is offline
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.
Reply With Quote
  #4 (permalink)  
Old 06-29-07, 12:48 AM
Acecool's Avatar
Acecool Acecool is offline
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
__________________
Check Acecoolco.com for PHP Tutorials, and other tuts
If you plan on contacting me, please read this: Legal Terms & Conditions
Reply With Quote
  #5 (permalink)  
Old 06-29-07, 04:41 AM
job0107's Avatar
job0107 job0107 is offline
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
Reply With Quote
  #6 (permalink)  
Old 06-29-07, 02:18 PM
ben.periton ben.periton is offline
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!
__________________
Ben Periton
http://ben.periton.co.uk
Reply With Quote
  #7 (permalink)  
Old 06-29-07, 02:54 PM
job0107's Avatar
job0107 job0107 is offline
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
Reply With Quote
  #8 (permalink)  
Old 06-29-07, 04:57 PM
End User's Avatar
End User End User is offline
Level II Curmudgeon
 
Join Date: Dec 2004
Posts: 3,027
Thanks: 14
Thanked 35 Times in 33 Posts
Quote:
Originally Posted by ben.periton View Post
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.
__________________
I don't live on the edge, but sometimes I go there to visit.
-------------------------------------------------------------------------
Sanitize Your Data | Oracle Date & Substring Functions | Code Snippet Library | [url=http://www.codmb.com/Call Of Duty[/url]
Reply With Quote
  #9 (permalink)  
Old 06-29-07, 06:21 PM
Acecool's Avatar
Acecool Acecool is offline
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
__________________
Check Acecoolco.com for PHP Tutorials, and other tuts
If you plan on contacting me, please read this: Legal Terms & Conditions
Reply With Quote
  #10 (permalink)  
Old 06-29-07, 09:48 PM
jfulton's Avatar
jfulton jfulton is offline
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 View Post
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 View Post
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 View Post
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?
Reply With Quote
Reply

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Send info from a form to a php page magicadmin JavaScript 3 11-07-06 02:50 PM
Multiple Page PHP Registration form losse PHP 6 06-24-06 10:33 PM
Display PHP in HTML page using JS scott2500uk PHP 6 05-18-06 12:25 PM
Classified Ads skipper23 Perl 3 11-22-05 02:22 AM
question about updating a page or database for an, php and mysql updating mikewooten PHP 1 02-12-04 12:11 AM


All times are GMT -5. The time now is 08:56 PM.
vBulletin® Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.