CLTaylor Posted April 14, 2009 Share Posted April 14, 2009 I'm developing a new site in Expressions Web and saving the files as .php. When I use the .php includes, it throws off my site design and I can't see how to fix it. Can someone please take a look at this page and let me know? www.menopauseinfo.org Thanks Cathy Quote Link to comment https://forums.phpfreaks.com/topic/154114-php-includes-causing-bad-design-issues/ Share on other sites More sharing options...
Maq Posted April 14, 2009 Share Posted April 14, 2009 Please don't double post, someone could have moved it for you if you requested it. Like I said in your other post, we can only see the final HTML with that link. You're including your file in the wrong spot. We would need to see the relevant code. Quote Link to comment https://forums.phpfreaks.com/topic/154114-php-includes-causing-bad-design-issues/#findComment-810119 Share on other sites More sharing options...
CLTaylor Posted April 14, 2009 Author Share Posted April 14, 2009 Ok, sorry. I was trying to find that right place to post because you said the first one was wrong. I pasted the code into the other location. Also, it appears that this problems happens only in IE and Mozilla is fine. Quote Link to comment https://forums.phpfreaks.com/topic/154114-php-includes-causing-bad-design-issues/#findComment-810138 Share on other sites More sharing options...
nadeemshafi9 Posted April 15, 2009 Share Posted April 15, 2009 Ok, sorry. I was trying to find that right place to post because you said the first one was wrong. I pasted the code into the other location. Also, it appears that this problems happens only in IE and Mozilla is fine. what do you mean it throws off your site design ? did you make the .php includes or are you just including them what do they have in them >:? Quote Link to comment https://forums.phpfreaks.com/topic/154114-php-includes-causing-bad-design-issues/#findComment-810547 Share on other sites More sharing options...
Maq Posted April 15, 2009 Share Posted April 15, 2009 what do you mean it throws off your site design ? Please see the link: www.menopauseinfo.org Quote Link to comment https://forums.phpfreaks.com/topic/154114-php-includes-causing-bad-design-issues/#findComment-810633 Share on other sites More sharing options...
CLTaylor Posted April 15, 2009 Author Share Posted April 15, 2009 compare this ULR www.menopauseinfo.org in both internet explorer and mozilla it works fine in firefox, but in IE the design is thrown off Quote Link to comment https://forums.phpfreaks.com/topic/154114-php-includes-causing-bad-design-issues/#findComment-810686 Share on other sites More sharing options...
PFMaBiSmAd Posted April 15, 2009 Share Posted April 15, 2009 This is not a php/include problem. It is a HTML markup problem. Your page has a number of HTML errors that cause it to render differently in different browsers - http://validator.w3.org/check?uri=http%3A%2F%2Fwww.menopauseinfo.org%2F&charset=(detect+automatically)&doctype=Inline&group=0 Edit: The biggest problems with it are there is no doctype and you have apparently placed, I'll guess using an include() statement, most of a web page inside of the <head> </head> section of your main page. Quote Link to comment https://forums.phpfreaks.com/topic/154114-php-includes-causing-bad-design-issues/#findComment-810691 Share on other sites More sharing options...
CLTaylor Posted April 15, 2009 Author Share Posted April 15, 2009 Thanks for your response regarding my html. I will have to find someone to fix these mistakes as I don't pretend to be a programmer of any kind. Can someone please tell me what the doctype for php should be? Quote Link to comment https://forums.phpfreaks.com/topic/154114-php-includes-causing-bad-design-issues/#findComment-810732 Share on other sites More sharing options...
PFMaBiSmAd Posted April 15, 2009 Share Posted April 15, 2009 There is actually no doctype for php, because php is a server side scripting language that simply outputs HTML/CSS/Javascript to a browser to make up a valid web page. This link talks about the HTML doctypes - http://w3schools.com/html/html_whyusehtml4.asp You should produce pages using the "strict" doctype whenever possible. Quote Link to comment https://forums.phpfreaks.com/topic/154114-php-includes-causing-bad-design-issues/#findComment-810741 Share on other sites More sharing options...
meomike2000 Posted April 17, 2009 Share Posted April 17, 2009 why dont you try to create a page in html that would lay out the page you want then just include the php files in the correct spot or you can just intermingle the html inside the php to get the lay out and the script.. check this out the file will be named index.php in my case. <?php session_start(); //includes. include 'dirconf.php'; include 'find/get_num_users.php'; echo '<link rel="stylesheet" type="text/css" href="../home/styles/generic1.css" >'; //set page title. echo '<title>' . $title . '</title>'; echo '<html> <head></head> <body text="#ffffff" link="#ffffff" vlink="#ffffff" alink="#ffffff"> <table border="0" cellpadding="0" width="100%"> <tr height="25px"> <td colspan="2">'; include '../home/test_title.php'; echo '<center><font size="+1">Are you <i>"n"</i>?</font></center><br><br>'; echo '</td> </tr> <tr> <td width="40%" valign="top">'; echo '<form method="post" action="auth.php"> <br>'; if($cutoff>0) { echo ' <input type="button" name="signup" value="sign up" style="width:90px;" onClick="window.location=\'../signup/signup.php\'">'; } echo '<br><br> enter username: <input type="text" name="username"><br > <br > enter password: <input type="password" name="password"><br > <br > <input type="submit" name="submit" style="width:90px;" value="log in">'; echo '</form><br><br> <center>'; echo $numusers; echo '</center> </td> <td width="70%" valign="top" align="center"> <br><br><br><br>'; include 'find/find_user.php'; echo '</td> </tr> </table> </body> </html>'; ?> hope this helps.. mike Quote Link to comment https://forums.phpfreaks.com/topic/154114-php-includes-causing-bad-design-issues/#findComment-812009 Share on other sites More sharing options...
CLTaylor Posted April 17, 2009 Author Share Posted April 17, 2009 Thanks for the help, but my problem is I'm not a coder. Maybe it will help to show you the 2 pages I have created. This page www.menopauseinfo.org/index.php works fine But the minute I add the .php includes, I get this: www.menopauseinfo.org/index-old.php Maybe someone can tell what's causing the problem now. Thanks Quote Link to comment https://forums.phpfreaks.com/topic/154114-php-includes-causing-bad-design-issues/#findComment-812592 Share on other sites More sharing options...
meomike2000 Posted April 17, 2009 Share Posted April 17, 2009 well can u post the code here so we can see it like i have and maybe we can fix it.... please use code tags, the # above when you are posting.... thanks mike Quote Link to comment https://forums.phpfreaks.com/topic/154114-php-includes-causing-bad-design-issues/#findComment-812607 Share on other sites More sharing options...
CLTaylor Posted April 20, 2009 Author Share Posted April 20, 2009 Thanks for trying Mike. I'm posting the code here for you to see. My html helpers tell me I have an incomplete DOCTYPE, so I'm also including that. If you look at www.menopauseinfo.org/index.htm you can see that the page loads fine. UNTIL I had the .php includes which you can see at www.menopauseinfo.org/index.php <table width="900" border="0" cellspacing="0" cellpadding="0" align="center"> <tr valign="top"> <td width="165" bgcolor="#EEEEEE"> <table width="165" border="0" cellspacing="0" cellpadding="0"> <tr> <td><img src="images/left_red.jpg" width="165" height="27" /></td> </tr> <tr> <td> <?php include("include/links.php"); ?><br></td> </tr> <tr> <td><img src="images/left_orange.jpg" width="165" height="29" /></td> </tr> <tr> <td> <?php include("include/newsletter.php"); ?></td> </tr> </table> Here's what I have for my head in case that helps. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML Basic 1.0//EN" http://www.w3.org/TR/xhtml-basic/xhtml-basic10.dtd."> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta name="TITLE" content= "Menopause | Menopause Symptoms | Early Menopause"> <meta name="description" content= "Menopause articles, resources and links so you can learn how to eliminate the symptoms of menopause"> <meta name="keywords" content= "menopause symptoms,hormones,estrogen,progesterone,hot flashes,night sweats,perimenopause,bioidenticals"> <meta http-equiv="Content-Type" content= "text/html; charset=us-ascii"> <link rel="stylesheet" href="styles.css" type="text/css"> </head> Quote Link to comment https://forums.phpfreaks.com/topic/154114-php-includes-causing-bad-design-issues/#findComment-814568 Share on other sites More sharing options...
nadeemshafi9 Posted April 21, 2009 Share Posted April 21, 2009 try puttint first javascript comments arround them echo <script> echo /* include(****); echo */ echo <script> if that dosent work try html comments Quote Link to comment https://forums.phpfreaks.com/topic/154114-php-includes-causing-bad-design-issues/#findComment-815594 Share on other sites More sharing options...
meomike2000 Posted April 23, 2009 Share Posted April 23, 2009 well unless you are just not showing it, the code below that you supplied starts two tables and only closed one... <table width="900" border="0" cellspacing="0" cellpadding="0" align="center"> <tr valign="top"> <td width="165" bgcolor="#EEEEEE"> <table width="165" border="0" cellspacing="0" cellpadding="0"> <tr> <td><img src="images/left_red.jpg" width="165" height="27" /></td> </tr> <tr> <td> <?php include("include/links.php"); ?><br></td> </tr> <tr> <td><img src="images/left_orange.jpg" width="165" height="29" /></td> </tr> <tr> <td> <?php include("include/newsletter.php"); ?></td> </tr> </table> try this one if that is the case... <table width="900" border="0" cellspacing="0" cellpadding="0" align="center"> <tr> <td valign="top" width="165" bgcolor="#EEEEEE"> <table width="165" border="0" cellspacing="0" cellpadding="0"> <tr> <td><img src="images/left_red.jpg" width="165" height="27" /></td> </tr> <tr> <td> <?php include("include/links.php"); ?><br></td> </tr> <tr> <td><img src="images/left_orange.jpg" width="165" height="29" /></td> </tr> <tr> <td> <?php include("include/newsletter.php"); ?></td> </tr> </table> </td> </tr> </table> Quote Link to comment https://forums.phpfreaks.com/topic/154114-php-includes-causing-bad-design-issues/#findComment-816970 Share on other sites More sharing options...
meomike2000 Posted April 23, 2009 Share Posted April 23, 2009 as for the doctype try this one <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"> Quote Link to comment https://forums.phpfreaks.com/topic/154114-php-includes-causing-bad-design-issues/#findComment-816979 Share on other sites More sharing options...
meomike2000 Posted April 23, 2009 Share Posted April 23, 2009 dont think that will work ether after looking at the page again try this <table width="900" border="0" cellspacing="0" cellpadding="0" align="center"> <tr> <td valign="top" bgcolor="#EEEEEE"> <table width="165" border="0" cellspacing="0" cellpadding="0"> <tr> <td><img src="images/left_red.jpg" width="165" height="27" /><br> <?php include("include/links.php"); ?><br> </td> </tr> <tr> <td><img src="images/left_orange.jpg" width="165" height="29" /><br> <?php include("include/newsletter.php"); ?></td> </tr> </table> </td> </tr> </table> the only other think is if one of the included files has tables in them and there is a problem there........ Quote Link to comment https://forums.phpfreaks.com/topic/154114-php-includes-causing-bad-design-issues/#findComment-816987 Share on other sites More sharing options...
Yesideez Posted April 23, 2009 Share Posted April 23, 2009 I don't know what state I'm catching this in now but I'm looking at a large chunk of paragraphs of text sat at the bottom of the page when they look like they should be placed in the large section to the right of the menu. So many tables there but if this isn't how it should look - well, I'd use DIVs. Quote Link to comment https://forums.phpfreaks.com/topic/154114-php-includes-causing-bad-design-issues/#findComment-817146 Share on other sites More sharing options...
ricmetal Posted April 23, 2009 Share Posted April 23, 2009 including files can include also a line break which can throw off a design save your phps as utf-8 (no mark <=> BOM) search wiki for that info if you like Quote Link to comment https://forums.phpfreaks.com/topic/154114-php-includes-causing-bad-design-issues/#findComment-817156 Share on other sites More sharing options...
Yesideez Posted April 23, 2009 Share Posted April 23, 2009 I advise against saving PHP files as UTF-8 (with or without BOM) as I had strange padding problems appear where I'd get vertical padding appear at the point of files being included. I changed them to plain ANSI and the padding disappeared. Pulled my hair out over this myself for a good couple weeks until I accidentally discovered it was UTF-8 causing the problem. Quote Link to comment https://forums.phpfreaks.com/topic/154114-php-includes-causing-bad-design-issues/#findComment-817200 Share on other sites More sharing options...
CLTaylor Posted April 23, 2009 Author Share Posted April 23, 2009 Just want to thank everyone who has tried to help. I have saved the files both in utf-8 and ansi and it has not made any difference yet. I tried adding the extra table at the end Mike, and what was strange about that is it made the skewed design show up in my htm editor the way it was on the server. Before, it was just on the server. So wierd. I tried putting the java around the includes like this: <td> echo <script> echo/* ("include/links.php"); echo */ echo <script> <br></td> </tr> <tr> <td><img src="images/left_orange.jpg" width="165" height="29" /></td> </tr> <tr> <td> echo <script> echo/* ("include/newsletter.php"); echo */ echo <script></td> and got this page as a result: www.menopauseinfo.org/index2.php Quote Link to comment https://forums.phpfreaks.com/topic/154114-php-includes-causing-bad-design-issues/#findComment-817632 Share on other sites More sharing options...
nadeemshafi9 Posted April 23, 2009 Share Posted April 23, 2009 I'm developing a new site in Expressions Web and saving the files as .php. When I use the .php includes, it throws off my site design and I can't see how to fix it. Can someone please take a look at this page and let me know? www.menopauseinfo.org Thanks Cathy i cant belive you still havent fixed it Quote Link to comment https://forums.phpfreaks.com/topic/154114-php-includes-causing-bad-design-issues/#findComment-817728 Share on other sites More sharing options...
meomike2000 Posted April 24, 2009 Share Posted April 24, 2009 do the included files contain tables.... if so are they all correct..... using a lot of tables within tables can produce strange effects if one of the tables is not proper.......... just a thought at this point for you to look at...... mike..... Quote Link to comment https://forums.phpfreaks.com/topic/154114-php-includes-causing-bad-design-issues/#findComment-818087 Share on other sites More sharing options...
CLTaylor Posted April 24, 2009 Author Share Posted April 24, 2009 GREAT NEWS - my siteis alive! Thanks to all that cared enough to help. But the prize goes to Mike - it was the tables! I cleaned up the html on the tables and voila ... it's perfect. Thanks everyone. Have a great weekend! Quote Link to comment https://forums.phpfreaks.com/topic/154114-php-includes-causing-bad-design-issues/#findComment-818378 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.