Jump to content


Photo

PHP - Problem with forum aligning to left in IE


  • Please log in to reply
No replies to this topic

#1 clubsoton

clubsoton
  • New Members
  • Pip
  • Newbie
  • 1 posts

Posted 01 March 2006 - 04:57 PM

I am trying to work out how to prevent the forum from aligning to the left when you click on a thread. I have been told the solution in another forum, having followed there instructioms by alas it does not work.

This is there solution:

Then I looked at what was different between the index.htm page and the mboard.php page. This was the headers. I pasted the headers of the index.htm page in my mboard_php.html page and it showd ok. I then tried to narrow down what of the header made the difference. It turned out to be doctype declaration. In the presented mboard page you declare the following doctype
Code:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
In your index.htm page you declare the following doctype
Code:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3c.org/T...224/loose.dtd">

When i replace the first with the second it works for me.

The same is true for your 31.html file this also works when i have the second doctype declaration.

I discovered another thing.
When i look at the source code from the pages created by mboard (mboard.php and 31.html) i see two doctype declarations and two <title> sections. One from the code generated by mboard.php and one from your header.txt file. When i save this page to my computer the code is cleaned up and the double doctype declaration and the double <title> section is cleaned so that only on exists (as it should).

This leads to my conclusion that you should really change the code in mboard.php or header.txt so that only one header section exists. You should choose to create the header of the html file with mboard.php (and therefor delete it in the header.txt file. Or create the header with your header.txt file and delete the part in mboard.php file which creates the headers.
Be aware that in mboard.php there are two portions that create headers.
One for the posted messages (in function createNewFile) and one for the forum startpage (in function printTopHTML).


If you click here this is the forum:

[a href=\"http://www.club-amigos.co.uk/mboard/mboard.php\" target=\"_blank\"]http://www.club-amigos.co.uk/mboard/mboard.php[/a]

I am at a loss as to what l am doing wrong, any help would really really be appreciated.[/url]




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users