Jump to content

PHP Include with IE - added padding???


MartinHansell

Recommended Posts

Hi,  I am using "include" to enable smoother updating of my menus.  In Mozilla Firefox when I include a .php or .txt file with a ul list/menu it works fine, but in IE7 there is additional space at the top of the list shoving it down the page so that it overlaps with other content...  Strange, no?  Below are the urls to the included list and the normal html page.  I have added the style sheet also, 'coz although this should not be a css issue, it just might be???

 

Also, it only happens with lists.  I have tested it with unformatted "anonymous" text which is rendered as it should be.

 

Many thanks.

Martin

 

http://hansellfamily.homeip.net/testing/test_inc.php

http://hansellfamily.homeip.net/testing/test_no_inc.php

 

===Style Sheet===

body {

margin:0;

padding:0;

}

 

ul {

margin:0px;

padding:0px 0 0 20px;  /*This left-padding is only to be able to view the bullets*/

border:1px solid;

}

===============

 

Link to comment
https://forums.phpfreaks.com/topic/60491-php-include-with-ie-added-padding/
Share on other sites

It's very difficult to resist crafting a smart-alec response to your smart-alec "help".  But thanks for the effort.

 

This IS a php/css problem albeit due to IE's appalling support of the INTEGRATION of the two technologies.  If anyone does use css in relation to their websites, perhaps you might be able to assist.

 

Martin

It's very difficult to resist crafting a smart-alec response to your smart-alec "help".  But thanks for the effort.

 

This IS a php/css problem albeit due to IE's appalling support of the INTEGRATION of the two technologies.  If anyone does use css in relation to their websites, perhaps you might be able to assist.

 

Martin

 

First off... what? I was saying maybe someone will help you even though this is a CSS problem. php and css together is the same thing as html and css together, no?

 

Secondly, I do use CSS but I'm more of a programmer.

This is not an issue with php at all, and it isn't a matter of how IE "integrates" with php. The end result from php is the same no matter what browser you are using.

 

The issue you are having is in regards to the css file. I ran your page through the w3 html validator and it told me this:

 

Byte-Order Mark found in UTF-8 File.

The Unicode Byte-Order Mark (BOM) in UTF-8 encoded files is known to cause problems for some text editors and older browsers. You may want to consider avoiding its use until it is better supported.

 

Then I used the webdev extension in firefox to look at your css, and the character showed up there. You need to fix the encoding for your css file.

Ryeman98 : apologies for over-reacting.  I simply was not sure if it was php or css or ie [or me, as it turns out] nor where to turn to for the answer...... just tearing my hair out over such a "simple" issue.  The fact that I feel stupid when it comes to php etc... made it very easy to read your reply as a reinforcement of that.

 

Rlindauer : thanks for taking the trouble!

 

Martin

Ryeman98 : apologies for over-reacting.  I simply was not sure if it was php or css or ie [or me, as it turns out] nor where to turn to for the answer...... just tearing my hair out over such a "simple" issue.  The fact that I feel stupid when it comes to php etc... made it very easy to read your reply as a reinforcement of that.

 

Rlindauer : thanks for taking the trouble!

 

Martin

 

Hey man, no one is perfect. We all make mistakes, believe me. I forget to close braces all of the time.

Also, most CSS stuff is IE's fault but there is always a way around it. It just takes a little of googling.

 

Good luck!

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.