causes blank space at top and bottom of page

Permalink
Hey all,

<?php Loader::element('header_required'); ?> and <?php Loader::element('footer_required'); ?> are causing blank spaces at the top and bottom of my pages????

Anyone know what causes this and what I can do?

sambrody24
 
JohntheFish replied on at Permalink Reply
JohntheFish
It could be white space in your html between the end of one php section and the start of another php section.
sambrody24 replied on at Permalink Reply
sambrody24
I just double checked and it is happening anytime I put in PHP on the html sheet. I will look into the css reset. We are using bootstrap

This is the full code for the header and footer

HEADER

<!DOCTYPE html>
<!--[if IE 7 ]><html class="ie ie7" lang="en"> <![endif]-->
<!--[if IE 8 ]><html class="ie ie8" lang="en"> <![endif]-->
<!--[if (gte IE 9)|!(IE)]><!--><html lang="en" class="ie ie9"> <!--<![endif]-->
<head>
    <meta content="text/html; charset=utf-8" http-equiv="content-type"/>
    <meta name="description" content=""/>
    <meta name="keywords" content=""/>
    <!-- Mobile Specific Metas
    +++++++++++++++++++++++++++ -->
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
    <meta http-equiv="X-UA-Compatible" content="IE=Edge">
    <link rel="shortcut icon" href="img/favicon.ico">
    <title>YellowProject - Contacts</title>
    <!-- Styles


FOOTER

<div class="pre_footer">
       <div class="container">
            <aside id="footer_bar" class="row">
               <div class="span3">
                    <div class="sidepanel widget_about">
                      <?php 
                        $a = new GlobalArea('Site About');
                        $a->display();
                        ?>
                    </div>
                </div>
               <div class="span3">
                    <div class="sidepanel widget_posts">
                        <?php 
                        $a = new GlobalArea('Site widgets');
VidalThemes replied on at Permalink Reply
VidalThemes
Just a thought have you got a CSS reset in place, the HTML body tag gets default padding and or margins in most browsers.
Kafoso replied on at Permalink Reply
Necro, but this is still relevant. The "Loader" class does produce an annoying whitespace character when called in an HTML output file.

Try adding the below code to the "header.php" file, for instance, below the body tag:

Loader::model('user_private_message');


I was fooled, at first, by my CSS. Was using Bootstrap and had ":before" and ":after" on certain selectors with content: " ". However, it was indeed the Concrete5 Loader causing the problem.