Welcome Guest, Not a member yet? Register   Sign In
Blank empty line on top of my website
#1

[eluser]halluchen[/eluser]
Hi,

I have a strange blank empty line on top of my website, screen shot attached.
I have no idea why this happen...

I checked my views for empty line or something like that but nothing is changed.

Does anyone had the same problem?

Thanks,
Chen
#2

[eluser]Aken[/eluser]
Looks like a CSS problem.
#3

[eluser]PhilTem[/eluser]
It's most likely malformed HTML in your views. Or you're echoing somewhere in between loading several views in your controller. Since I can only guess how you are creating the output (i.e. either consecutively loading views or using a template library) I cannot for sure help you determining the cause of your problem Wink
#4

[eluser]solid9[/eluser]
Usually find the
Code:
<p> </p>
and try removing them.

or

Try using CSS reset.
#5

[eluser]halluchen[/eluser]
Thanks for all responses Smile

Here are samples of my code-

Index function in Controller:
Code:
public function index()
{
  $data['head'] = $this->load->view('shared/head', '', TRUE);
  $data['header'] = $this->load->view('shared/header', '', TRUE);
  $data['navigation'] = $this->load->view('shared/navigation', '', TRUE);
  $data['footer'] = $this->load->view('shared/footer', '', TRUE);
  $data['slider'] = $this->load->view('shared/slider', '', TRUE);
  $data['sidebar'] = $this->load->view('shared/sidebar', '', TRUE);
  
  $this->load->view('home', $data);
}

And here is the top of the Home view:
Code:
&lt;?php
echo $head;
echo $header;
echo $navigation;
?&gt;
<div id="content-contnr">
<div id="main-content">
        ......
        ......

Am I doing something wrong?
#6

[eluser]solid9[/eluser]
Try start resetting it's element tag one by one.
example,
Code:
h1 {
margin: 0;
padding: 0;
}

If the above doesn't work proceed to next element tag,
Code:
p {
margin: 0;
padding: 0;
}

and so on...

Base on your page layout these elements tag is in the header section.
So try finding them at the header section and one by one reset them.
Until you find the culprit.




#7

[eluser]ahmed.alsiddig[/eluser]
find an empty html tag unused ... and delete it
#8

[eluser]halluchen[/eluser]
Nothing is working yet. Still trying to find a solution... :/




Theme © iAndrew 2016 - Forum software by © MyBB