【问题标题】:Remove white space below google map (iframe inserted) [duplicate]删除谷歌地图下方的空白(插入iframe)[重复]
【发布时间】:2018-08-10 14:39:12
【问题描述】:

我使用 iframe 在我的网站中插入了谷歌地图。

问题是地图正下方有一个“空白区域”。

我已经尝试过:

padding: 0 !important;
margin: 0 !important;

但不工作。 如何删除它?

这是真正的网站(只是底部):http://jurisglobal.es/

【问题讨论】:

    标签: css google-maps


    【解决方案1】:

    试试这个

    使行高:0;对于 iframe 的父 div。

    .et_pb_text_inner {
        line-height: 0; 
    }
    

    【讨论】:

      【解决方案2】:

      您可以将其添加到 css 文件中以删除空间

      .et_pb_text_inner iframe{float:left}
      

      【讨论】:

        【解决方案3】:

        有两种方法可以删除空格。

        首先,您可以将float 的值设置为leftright

        iframe {
           float: right;
              // or
           float: left;
        }
        

        这将在您的网站上看起来相同,因为您已将 iframe max-height 设置为 100%

        iframe {
           max-height: 100%;
        }
        

        浮动=左:

        float = 右: 其次,您可以将iframe line-height 周围的div 设置为0

        .et_pb_row_5 .et_pb_row {
           line-height: 0;
        }
        

        希望这些信息对您有所帮助。

        【讨论】: