• 0

Mysterious Margin!


Question

I have this annoying margin that won't go away.

http://caseymilstead.com/bpa2/

In my CSS I have body set to margin:0;padding:0; but i still have the margin at the top, UNLESS you look at the master page.

http://caseymilstead.com/bpa2/master.php

I was previously coding in ASP and I liked the idea of master pages so I did it with php.

The content pages are like this:

<?php ob_start(); ?>

<!-- ###CONTENT STARTS HERE### -->



<!-- ###CONTENT ENDS HERE### -->
<?php
  $pagemaincontent = ob_get_contents();  ob_end_clean();
  $pagetitle = "Page Title";
  $tabname = "Tab Name"; //Choose between: Home - Food - Attractions - Lodging - Transit
  include("master.php");
?>

But something in the content page is causing the margin since it doesnt show in the actual master page.

Can anyone figure out what is causing this?

Link to comment
https://www.neowin.net/forum/topic/845900-mysterious-margin/
Share on other sites

3 answers to this question

Recommended Posts

  • 0

It looks like the BOM encoding character () from saving the file using UTF-8 is getting output before the ob_start(), which text editor are you using?

Try saving as either ANSI, or UTF-8 Without BOM... if your editor has the option.

This topic is now closed to further replies.
  • Recently Browsing   0 members

    • No registered users viewing this page.