FRIHOSTFORUMSSEARCHFAQTOSBLOGSDIRECTORY
You are invited to Log in or Register a Frihost Account!

problem with IE and "include"

 


guitarcrazy087
Ok, i'm having a problem with Internet Explorer. here's the code on my pages:

Code:
<?php
   $title = 'Joe Henry- contact';
   include('../header.php');
?>

content

<?php include('../footer.php'); ?>


here's header.php:

Code:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

   <html xmlns="http://www.w3.org/1999/xhtml"><head>

   <meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
   <meta name="author" content="Joe Henry" />
   <meta name="resource-type" content="document" />
   <meta name="description" content="Joe Henry's Website.  Web-building tutorials, Photoshop Tutorials, Blog, Gallery, and more!" />
   <meta name="keywords" content="Joe, Joseph, Henry, Website, personal, site, tutorial, tutorials, photoshop, ps, web, building, construction, html,       css, blog, gallery, movies, blog" />

   <title><?php echo $title; ?></title>

   <link rel="stylesheet" style="text/css" href="http://joehenry.frihost.net/style.css" />
   <script type="text/javascript" src="http://joehenry.frihost.net/js/prototype.js"></script>
   <script type="text/javascript" src="http://joehenry.frihost.net/js/scriptaculous.js?load=effects"></script>
   <script type="text/javascript" src="http://joehenry.frihost.net/js/lightbox.js"></script>

   </head><body>
   <div class="side"></div><div class="header"><a href="http://joehenry.frihost.net"></a></div><div class="container"><div class="content">


and here's footer.php

Code:
</div><div class="sidepanel"><div class="menu">

   <div class="menuheader">Navagation-</div><br />
   <div class="menuwhole"><a href="http://joehenry.frihost.net">AbOUt</a></div>
   <div class="menuhalf"><a href="/blog">bLoG</a></div>
   <div class="menutf"><a href="/gallery">GalLeRY</a></div>
   <div class="menuquarter"><a href="/videos">VIdEoS</a></div>
   <div class="menuwhole"><a href="/tutorials">TuTOriaLS</a></div>
   <div><a href="/contact">cOntACt</a></div>

   <br />

   <div class="menuheader">Blog-<br /><br /></div>
   <div class="menusubheader"><a href="/blog/archives">Archives</a></div>
   <div><a href="/blog/archives/march">March</a><br /></div>
   <div class="menusubheader"><a href="/blog/topics">Topics</a></div>
   <div><a href="/blog/topics/">My Life</a></div><br />

   </div></div></div><div class="footer"><div class="footertext">

   Design and Content &copy; <a href="http://joehenry.frihost.net">Joe Henry</a><br />
   Hosted by <a href="http://frihost.net" target="_blank">Frihost.net</a>

   </div></div>

   </body></html>


here's the site: http://joehenry.frihost.net

It works fine if i forget the includes and just put all the code in one file, but with the includes, it doesn't.

it works fine in Firefox and opera, but not in IE. it moves the header image down like 20px, and the footer paint splat background up about 20px. also, if you click on a link that takes you to another part of the site, it won't recognize the style sheet until you refresh the page...i have no clue what the problem is, mostly bc i'm not a real php programmer. Ok, also, the background that repeats on the bottom of the page, is supposed to stay at the bottom of the page no matter what...below all the content. when i use the includes, it just stays positioned at the bottom of the browser window and lets text go below it and on down the page. I hope that was clear.

thanks for all your suggestions!

Joe.
escritor
Well, the problem can't be with the includes, because the browser just shows parsed HTML pages. Smile You need to work on your CSS code. The proper place for you to ask for design help is Html, CSS and Javascript.
rvec
yeah you probably need some css trick for IE.
I'll move the thread.
guitarcrazy087
hey, thx for moving the thread...i had a bit of trouble finding it again though..lol.

sooo..if the problems not with the includes, and it displays properly without the includes (if i put the include document content into my pages manually) then why should there be a problem when i have the includes? or is it just IE acting up?

and i have no clue what i should do with my css to get it working in IE. anyway, any help would be appreciated.

thanks! Very Happy
sonam
I think how some browser few empty lines before or after php script render like used (necessary) lines, someting like /n or br. Try to clean all empty lines before and after php script (put your content exactly after script) and see what happend.

Sonam
guitarcrazy087
HMMMM.....I tried it out with no success....I'm still lost as to what's making this happen....anyone with suggestions, no matter how crazy, plz post them!

thx!

joe
guitarcrazy087
Hey, i got it working! i found a guy with a similar problem on another forum. it was my UTF-8 encoding. anyway, thx for your help!
Very Happy
escritor
Congratulations, guitarcrazy087. Smile It often takes us much time to notice that the real problem is something as silly as that. Confused
guitarcrazy087
lol, thanks. Very Happy
Agent ME
guitarcrazy087 wrote:
Hey, i got it working! i found a guy with a similar problem on another forum. it was my UTF-8 encoding. anyway, thx for your help!
Very Happy

Did you have the html reporting it was utf-8 but not save it as utf-8?
escritor
Agent ME: I understand what you thought about... Many editors don't support uft-8. Sad
Fire Boar
Wait, what?! Which editors don't support it? UTF-8 is standard... it's the default on Windows Notepad for goodness sake!
Peterssidan
Fire Boar wrote:
Wait, what?! Which editors don't support it? UTF-8 is standard... it's the default on Windows Notepad for goodness sake!

On my computer ANSI is the default encoding for Notepad. UTF-8 is not the standard everywhere. Especially not in older applications. Often you have to chose that you want to save the document in UTF-8.
escritor
Fire Boar wrote:
Wait, what?! Which editors don't support it? UTF-8 is standard... it's the default on Windows Notepad for goodness sake!

TopStyle is an example of an editor that doesn't support Unicode/UTF-8.
guitarcrazy087
Agent ME wrote:
guitarcrazy087 wrote:

Hey, i got it working! i found a guy with a similar problem on another forum. it was my UTF-8 encoding. anyway, thx for your help!
Very Happy

Did you have the html reporting it was utf-8 but not save it as utf-8?


Hm...looking at the header file again, I see that one of the meta tags says:

Code:
<meta http-equiv="Content-Type" content="text/html;charset=utf-8" />


And I still have it that way...maybe I should change that :/

The default on Windows Notepad is ANSI. That's what I use for all my coding so I'm sure of that. I heard on a forum that UTF-8 inserts line breaks around the code in the file or something like that. I'm thinking that was my problem, or at least it sounds like it could have been.
escritor
If you write only in English, there's no need to use UTF-8. You should use it especially if you mixed different kinds of scripts (Arabic, Russian etc.) in the same page.
guitarcrazy087
I see. Thank you for your input. I'll put it into use. Wink
Related topics

Why use IE?
PHP Includes Problem
What happend with my name??
whats happening to fire fox?..
.htaccess problem

Renault Clio petrol tank leak
Internet Explorer de bir sorun!
Flash Movie in IE 7 Problem
150 frh$ for menubar Please CLOSE
password reset

What is the point of prayer?
Could God create a stone that even he can't lift?
Firefox 3.x crashes so often.. i am moving back to IE
Global Warming article - critique and pointers
CSS div alignment issue, IE and FF (newbie problem)
Reply to topic    Frihost Forum Index -> Scripting -> Html, CSS and Javascript

FRIHOST HOME | FAQ | TOS | ABOUT US | CONTACT US | SITE MAP
© 2005-2007 Frihost, forums powered by phpBB.