|
| |
|
|
GolfMad
Posts: 190 Joined: 3/20/2002 From: UK Status: offline
|
Include pages in PHP - IE position error - 3/8/2008 6:25:16
I have Googled this problem without success and was wondering if anyone here knows why or how to fix this: Structuring a template called index.php, in between say the menu div it has this class: #menu { padding: 0px; margin: 0px auto 0px auto; background-image: url('images/content.png'); background-repeat: repeat-y; width: 800px; height: 30px; The only other code in this div is: <?php include('_menu-incl.php'); ?> On the _menu-incl.php page we have the code: <div id="awmAnchor-menu"></div> I promise there is no silly code like breaks or paras there! Now, in Firefox the browser displays the same result whether the include set up is used, or if I just place the code directly in the *menu div But in IE7, using the include method, it forces the menu to slightly overlap or be right on the bottom and ignore padding, making a larger top margin or padding appear from somewhere. I also found the same error when I tried an include page method for the simple div undeneath the menu div, to contain the sites name in a single graphic. So IE7 has done this on two counts yet FF is fine. Does anyone know the reason or a fix please? Thanks Phil
|
|
|
|
GolfMad
Posts: 190 Joined: 3/20/2002 From: UK Status: offline
|
RE: Include pages in PHP - IE position error - 3/8/2008 6:58:32
Thanks Tailslide. Here is the link with the club name and menu divs with the code directly in them: http://tgc.sitesoon.co.uk Here is the page where I have used include pages for the club name and menu. Strangley enough, the club name is now not being forced 5 pixels towards the bottom anymore in this version (I think I added a div tag to the image and text in that name div, yesterday after the problem first occured, to fix something else) but the menu div underneath it still is: http://tgc.sitesoon.co.uk/index-with-incl.php <div id="name"><?php include('_name-incl.php'); ?></div> <div id="menu"><?php include('_menu.php'); ?></div> _name-incl.php:<div class="nameleft"><img alt="" src="images/name21.gif" width="526" height="35" /></div><div><?php include("dt.php"); show_dt(0,"l, jS F Y. g:ia"); ?><br /> <a target="_blank" href="http://www.bbc.co.uk/weather/5day.shtml?id=3117">BBC current weather for Tavistock</a></div> _menu.php <div id="awmAnchor-menu"></div> Lets hope you can spot it, I will end up with about 30 pages and the php include will help for future changes. (using PHP for content management later in the site) By the way I have just made these changes to the mocked up page in the new EWD 2 Beta, - seems really cool being able to insert aphp include page from the Insert Menu! Regards Phil
< Message edited by GolfMad -- 3/8/2008 7:04:59 >
|
|
|
|
GolfMad
Posts: 190 Joined: 3/20/2002 From: UK Status: offline
|
RE: Include pages in PHP - IE position error - 3/8/2008 9:09:23
Thats interesting, I really do not know where it is finding the "?" <div id="wrap"> <div id="top"> </div> <div id="header"> </div> <div id="name"><?php include('_name-incl.php'); ?></div> <div id="menu"><?php include('_menu.php'); ?></div> <div id="content"> <div id="center1"> This is the _menu.php <div id="awmAnchor-menu"></div> Really weird Thanks Phil
|
|
|
|
GolfMad
Posts: 190 Joined: 3/20/2002 From: UK Status: offline
|
RE: Include pages in PHP - IE position error - 3/8/2008 9:28:43
This is the main php file that calls the include copied from Notepad: <div id="wrap"> <div id="top"> </div> <div id="header"> </div> <div id="name"><?php include('_name-incl.php'); ?></div> <div id="menu"><?php include('_menu.php'); ?></div> <div id="content"> <div id="center1"> This is the _menu.php from Notepad: <div id="awmAnchor-menu"></div> No sign to me of that spare "?" Thanks Phil
|
|
|
|
GolfMad
Posts: 190 Joined: 3/20/2002 From: UK Status: offline
|
RE: Include pages in PHP - IE position error - 3/8/2008 9:59:20
I renamed the include file to just menu.htm and updated the call but that did not solve it. <div id="name"><?php include('_name-incl.php'); ?></div> <div id="menu"><?php include('menu.htm'); ?></div> <div id="content"> <div id="center1"> Have we 'hit the wall' here and that it is some weird IE bug no one has discovered yet. The strange thing was it was also happening to the name div above it until, i accidently cured it yesterday by making the two elements of an image and text have divs surrounding them, tehm the problem i was having with the date and BBC weather text lining up right disappeared as well. Thanks again Phil
|
|
|
|
GolfMad
Posts: 190 Joined: 3/20/2002 From: UK Status: offline
|
RE: Include pages in PHP - IE position error - 3/8/2008 11:03:16
quote:
Bite Order Mark I dont quite understand what this is but another MVP warned me about it in EWD with PHP. I have just this morning installed EWD2 Beta with support for php. What should I do with my exisitng index.php, do I have to scrap it completely and build it again in EWD2, togehter with a new page from scratch called menu.htm as if I called it menu.php originally it may have this BOM hidden in it. Thanks Phil
|
|
|
|
GolfMad
Posts: 190 Joined: 3/20/2002 From: UK Status: offline
|
RE: Include pages in PHP - IE position error - 3/8/2008 13:46:55
Thanks Jaybee, I'm saving as php or htm. Read the article and a bit confused but will take more time later, seems like some editors mention there will strip out the BOM. My php page that was created with EWD original, placed this meta tag in the header: <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> So am I saving as a UTF-8 file please? The new EWD2 Beta also mentions something about it here, it seems they have tried to cure it: http://www.microsoft.com/expression/products/readme.aspx?key=web2beta Regards Phil
|
|
|
|
GolfMad
Posts: 190 Joined: 3/20/2002 From: UK Status: offline
|
RE: Include pages in PHP - IE position error - 3/9/2008 4:01:23
Thanks for your help and patience Jaybee and you have told me exactly what I wanted to know about how to remove the BOM. As the page was made with EWD original and it will be a template for 30 pages, I think I might clean as you suggest and I guess paste the clean text back into a new page in EWD2Beta. Hopefully it will be trouble free after that with the new EWD2. Thanks again Regards Phil
|
|
|
|
GolfMad
Posts: 190 Joined: 3/20/2002 From: UK Status: offline
|
RE: Include pages in PHP - IE position error - 3/10/2008 10:30:35
Some feedback after all your kind help thanks Jaybee, it actually worked to stop that gap appearing. The UniRed program did not seem to have an option for saving without BOM for 8 bit, only 16 and 32 but in that link you gave me explaining it, another editor was mentioned, Babel Pad and this enable saving without BOM for 8 bit. I placed all the php files and htm, css through it, saving without BOM as suggested, uploaded and - the gap had gone in IE7! Fiddling around with the Site Settings in EWD2 Beta I notice that the default is to save with a BOM for all extensions except PHP, so I wonder whether there will be any problems in the html and css files now I have stripped the BOM out. Regards Phil
|
|
New Messages |
No New Messages |
Hot Topic w/ New Messages |
Hot Topic w/o New Messages |
Locked w/ New Messages |
Locked w/o New Messages |
|
Post New Thread
Reply to Message
Post New Poll
Submit Vote
Delete My Own Post
Delete My Own Thread
Rate Posts
|
|
|