Html 删除图像下方的空白区域

Html 删除图像下方的空白区域,html,css,Html,Css,如下图所示,我们可以看到大量的空白。我想把那些空的地方藏起来 html <div class="custom_case"> <div class="custom_case_left"> <h1 class="cc1">Custom Cases</h1> <h2 class="cc2">Make Your Own design</h2> </div> <?p

如下图所示,我们可以看到大量的空白。我想把那些空的地方藏起来

html

<div class="custom_case">
    <div class="custom_case_left">
        <h1 class="cc1">Custom Cases</h1>
        <h2 class="cc2">Make Your Own design</h2>
    </div>

<?php


$brandSelect = '<select id="brand_select">';
$brandSelect .= '<option value="">My Brand</option>';

$brandSelect .= '</select>';


echo '<select id="model_select"><option value="">My Model</option></select>';
?>


<div class ="cc3">
<div class ="cc4">
<a href= "><span class ="cc5"> See Cases > </span> </a>
</div>

</div>

海关案件
做你自己的设计
我不想给这么多的空白之间的图像和下面的页脚

请帮我做这个


提前感谢。

尝试制作
img

  • 行高:0
  • 垂直对齐
    :顶部或底部
      您必须固定主容器的高度

      enter code here.main-container{
      
      高度:550px;
      }

      对您的
      类进行以下更改:

      .col1-layout .col-main {
       position: relative;     
       }
      
      .custom_case_right {
       float: left;
       position: absolute;
       top: 0;
       bottom: 0;
       right: 0;
      }
      
      在图像中删除位置
      绝对
      ,改为添加此样式:

         .custom_case_right img {
          position: relative;
          width: 620px;
          height: 100%;
        }
      

      我帮你弄明白了

      手机外壳的图像是导致空间问题的原因

      .custom_case_right img {
         /*float:right;*/
         /*bottom:320px;*/
      }
      
      这将固定图像下方的间距。现在您的图像显示不正确,要修复此问题,请执行以下操作

      .custom_case_right {
          float:right;
          margin-top:-310px;
      }
      
      这两个变化应该能帮你解决。我用铬合金做了测试


      您仍然需要考虑在视口缩小时图像的行为。

      我使用了此代码
      。自定义\u case\u right img{lineheight:0px;vertical align:top;}
      但不适用于我。您使用的是哪种浏览器?我在Chromein chrome中没有看到图像下方的空格,请在看到图像问题后向下滚动一点,寻求代码帮助必须包括在问题本身中复制它所需的最短代码,最好是在一个文本中。请参阅。主容器{高度:550px;}您可以在这里检查,我检查了元素并给出了
      高度:550px你能告诉我你在告诉哪个主集装箱吗?你能告诉我行号和文件名吗
      
      .custom_case_right {
          float:right;
          margin-top:-310px;
      }