maikucao
maikucao

Reputation: 129

Blank white space on top of the webpage

What could the possible cause blank space on top of the page

I want to provide photo for clarification but due to low reputation in stackoverflow I couldn't upload it. I am using Smarty as php template engine.

<html>
    <head>
        {include file="_js.tpl"}
        <title>{$title|escape}</title>
        <meta http-equiv="content-type" content="text/html; charset=utf-8">
        {literal}
            <style type="text/css">
                body{
                    margin:0;
                    padding:0;
                    display: block;
                    font-family: arial;
                }

                #main_iframe 
                {
                    position: relative;
                    width: 100%;
                    height:665px;
                    border:0px;         
                }

                #iframe_setting{
                    padding-left: 220px;
                    background: url('{/literal}{$vir_img}{literal}background.png');
                }
                #content-wrapper{
                    height: 665px;
                    padding-left: 10px;

                }

            </style>

            <script type="text/javascript">
                $(document).ready(function(){
                    $("button#logout").click(function(){
                        window.location = "{/literal}{$url_app}{literal}?m=account&c=do_logout";
                    });

                });

                function go(loc)
                {
                    document.getElementById('main_iframe').src=loc;
                }

                function go3(loc)
                {
                    document.getElementById('iframeid').src=loc;
                }
            </script>
        {/literal}
    </head>
        <body>{include file="header.tpl"}
                <div style="position:absolute;z-index: 999;">
                    {include file="sidebar.tpl"}
                </div>
                    <div id="iframe_setting">
                        <div id="content-wrapper">
                            {$content}
                        </div>
                    </div>
                    {include file="footer.tpl"}
        </body>
</html>

Upvotes: 0

Views: 889

Answers (1)

SAVAFA
SAVAFA

Reputation: 818

Using notepad++, make sure that all the files included in this file, as well as itself, are "Encode in UTF-8 without BOM". To do so, follow as below:

In Notpad++ -> (menu) Encoding -> (click) Encode in UTF-8 without BOM

This usually happens if you have used UTF8 characters and saved the file as UTF8. Then, there will be three invisible characters which causes that white space.

Upvotes: 1

Related Questions