开发者

Remove the space above content in zendframework layout

开发者 https://www.devze.com 2023-02-12 03:50 出处:网络
I have a zend framework layout like this: ... <div id=\"div1\"></div> <?php echo $this->layout()->content; ?>

I have a zend framework layout like this:

...
<div id="div1"></div>
<?php echo $this->layout()->content; ?>
...

The problem is a space between div1 and content about 15px.

How can i remove it?

EDIT: I use inspect element in chrome, there is a " " (spaces between double quotations) above content that i don't add it.

EDIT: Please 开发者_如何学运维see below picture, I don't add the selected area.

Remove the space above content in zendframework layout


try setting a negative bottom margin for your div

http://www.w3schools.com/CSS/css_margin.asp


My content page's encoding was UTF 8 with BOM. This encoding add a character in the begin of file, and that character cause to those spaces. I use encoding UTF 8 witout BOM.

0

精彩评论

暂无评论...
验证码 换一张
取 消