doushua7737 2014-11-26 12:00
浏览 92

laravel - partials将空文本插入HTML - “”

<div style="margin-top:-21px">
    @include('partials.header')
</div>

<div style="margin-top:-21px">
    @include('partials.navig')
</div>

<div style="margin-top:0px">
    @include('partials.footer')
</div>

Above HTML/Laravel code inserts partials into layout. Every time when I use partial, it will insert empty spaces into HTML output and causing ugly white-space (empty row) above the partial. That's why I am using margin:top:-21px, to hide empty row . But the problem is, that in Internet Explorer are not those white-spaces visible and therefore partials are shifted too much. Here is an HTML output and how empty row looks like:

image

I have no clue what can cause these white-spaces, it is not wrong margin of elements or something like that. Is there any solution or explanation for this?

  • 写回答

3条回答 默认 最新

  • dpmfur2635 2014-11-26 12:24
    关注

    This is because you are including partials in new row. Try including them in same row and it should fix your problem.

    <div style="margin-top:-21px">@include('partials.header')</div>
    
    评论

报告相同问题?

悬赏问题

  • ¥15 c语言怎么用printf(“\b \b”)与getch()实现黑框里写入与删除?
  • ¥20 怎么用dlib库的算法识别小麦病虫害
  • ¥15 华为ensp模拟器中S5700交换机在配置过程中老是反复重启
  • ¥15 java写代码遇到问题,求帮助
  • ¥15 uniapp uview http 如何实现统一的请求异常信息提示?
  • ¥15 有了解d3和topogram.js库的吗?有偿请教
  • ¥100 任意维数的K均值聚类
  • ¥15 stamps做sbas-insar,时序沉降图怎么画
  • ¥15 买了个传感器,根据商家发的代码和步骤使用但是代码报错了不会改,有没有人可以看看
  • ¥15 关于#Java#的问题,如何解决?