Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/html/82.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Html 隐藏块下方和上方的空白_Html_Css - Fatal编程技术网

Html 隐藏块下方和上方的空白

Html 隐藏块下方和上方的空白,html,css,Html,Css,请访问 您可以在链接中看到以下图像: 在图像的下方和上方都有很多空白。我想消除这些差距,我想像这样展示 我试过这个: .block block-shipping-estimate { position : relative; bottom:70px; } 但我认为它会影响页面的其他部分 有人能帮我找到合适的解决方案吗。执行以下操作将从底部和顶部删除一些额外的空间 删除页边距:0 30px;填充:10px 20px 20px从.block、.sidebar.box查看并给出位置:相对到它 更

请访问

您可以在链接中看到以下图像:

在图像的下方和上方都有很多空白。我想消除这些差距,我想像这样展示

我试过这个:

.block block-shipping-estimate
{  position : relative; bottom:70px; }
但我认为它会影响页面的其他部分


有人能帮我找到合适的解决方案吗。

执行以下操作将从底部和顶部删除一些额外的空间

删除
页边距:0 30px;填充:10px 20px 20px
.block、.sidebar.box查看
并给出
位置:相对到它

更改
ikon
css,如:

.ikon {
    position: absolute;
    top: 20px;
}
并从
.short description
.std
中删除


执行以下操作将从下方和顶部删除一些额外的空间

删除
页边距:0 30px;填充:10px 20px 20px
.block、.sidebar.box查看
并给出
位置:相对到它

更改
ikon
css,如:

.ikon {
    position: absolute;
    top: 20px;
}
并从
.short description
.std
中删除


为什么不使用第二个链接中相同的DOM和CSS类

<div class="block-content"> <div id="block_info">
    <img src="http://totaltoys.com/media/font-100.png" height="35" width="70"> 
    <strong><span>Check Delivery Availability</span></strong>       
    <input type="text" placeholder="Enter your PIN Code" class="input-text" maxlength="120" id="zipcode" size="20" name="zipcode" onkeypress="if (event.keyCode == 13) { return false;}">
    <button type="button" name="zip-check" title="Check" class="button1" id="zip-check"><span>CHECK</span></button>
    <div id="delivery-message"></div>
    <div id="delivery-html"></div>
    </div>  
</div>

检查交付可用性
检查
此外,我的建议是使用角度指令:


在代码中多次重复模板的情况下,这是一个很好的解决方案。

为什么不使用与第二个链接中相同的DOM和CSS类

<div class="block-content"> <div id="block_info">
    <img src="http://totaltoys.com/media/font-100.png" height="35" width="70"> 
    <strong><span>Check Delivery Availability</span></strong>       
    <input type="text" placeholder="Enter your PIN Code" class="input-text" maxlength="120" id="zipcode" size="20" name="zipcode" onkeypress="if (event.keyCode == 13) { return false;}">
    <button type="button" name="zip-check" title="Check" class="button1" id="zip-check"><span>CHECK</span></button>
    <div id="delivery-message"></div>
    <div id="delivery-html"></div>
    </div>  
</div>

检查交付可用性
检查
此外,我的建议是使用角度指令:


在代码中多次重复模板的情况下,这是一个很好的解决方案。

这应该可以做到,只要根据需要添加填充即可

#标签{
高度:自动;
浮动:左;
填充顶部:10px;
垫底:10px;
左侧填充:50px;
背景图像:url(“https://cdn2.iconfinder.com/data/icons/simple-microphone-icon/512/Location_Icon-128.png");
背景位置:左上;
背景尺寸:45px 40px;
背景重复:无重复;
}
#检查{
高度:40px;
浮动:对;
}
#关键词拳击手{
溢出:隐藏;
填充:0px 2.5px;
}
#关键词{
宽度:98.75%;
高度:36px;
边框:1px实心#C0C0;
}

检查可用性
检查

这应该可以做到,只需根据需要添加填充即可

#标签{
高度:自动;
浮动:左;
填充顶部:10px;
垫底:10px;
左侧填充:50px;
背景图像:url(“https://cdn2.iconfinder.com/data/icons/simple-microphone-icon/512/Location_Icon-128.png");
背景位置:左上;
背景尺寸:45px 40px;
背景重复:无重复;
}
#检查{
高度:40px;
浮动:对;
}
#关键词拳击手{
溢出:隐藏;
填充:0px 2.5px;
}
#关键词{
宽度:98.75%;
高度:36px;
边框:1px实心#C0C0;
}

检查可用性
检查
试试看

试一试


请在下面更改css

.ikon {
  float: left;
  margin-top: 20px;
  /*position: relative;
  top: 50px;*/
}

.block, .sidebar .box-reviews {
  clear: both;
  float: left;
  margin: 0 0 10px;
  padding: 10px 20px 20px;
  position: relative;
  width: 96%;
}

.short-description .std ul { margin: 0; }

.check_delivery .block-subtitle {
   display: inline-block;
   float: left;
   font-family: Museo,Helvetica,arial,san-serif;
   font-size: 15px;
   margin-top: 6px;
   padding-left: 10px;
   width: 26%;
}

.product-view .add-to-box {
  margin-top: 0;
  overflow: visible;
  position: relative;
}

.div_link-cart .block-cart-top {
  clear: none;
  float: right;
  margin: 0;
  padding: 8px 0 0;
  width: auto;
}

请在下面更改css

.ikon {
  float: left;
  margin-top: 20px;
  /*position: relative;
  top: 50px;*/
}

.block, .sidebar .box-reviews {
  clear: both;
  float: left;
  margin: 0 0 10px;
  padding: 10px 20px 20px;
  position: relative;
  width: 96%;
}

.short-description .std ul { margin: 0; }

.check_delivery .block-subtitle {
   display: inline-block;
   float: left;
   font-family: Museo,Helvetica,arial,san-serif;
   font-size: 15px;
   margin-top: 6px;
   padding-left: 10px;
   width: 26%;
}

.product-view .add-to-box {
  margin-top: 0;
  overflow: visible;
  position: relative;
}

.div_link-cart .block-cart-top {
  clear: none;
  float: right;
  margin: 0;
  padding: 8px 0 0;
  width: auto;
}

为以下两个类设置
位置:相对
,然后设置

margin:0px !important;
padding: 0px !important;
width : 100%;
以下是html代码:

.block.block-shipping-estimate {
    clear: both;
    margin: 0;
    padding: 0;
    position: relative;
}
.block, .sidebar .box-reviews {
    clear: both;
    float: left;
    margin:0px !important;
    padding: 0px !important;
    position: relative;
    width: 100%;
}

为以下两个类设置
位置:相对
,然后设置

margin:0px !important;
padding: 0px !important;
width : 100%;
以下是html代码:

.block.block-shipping-estimate {
    clear: both;
    margin: 0;
    padding: 0;
    position: relative;
}
.block, .sidebar .box-reviews {
    clear: both;
    float: left;
    margin:0px !important;
    padding: 0px !important;
    position: relative;
    width: 100%;
}

我尝试了你的代码,但它隐藏了“添加到购物车”和“立即购买”按钮:prnt.sc/aivwu0@Profile101从
产品视图中删除
溢出:隐藏的
。也在“检查可用性”文本上方添加到框中,有两行显示,请帮助我删除一行并显示为@Profile101 remove

@Profile101 last solution。移除
宽度:96%来自
.block、.sidebar.box评论
我尝试了你的代码,但它隐藏了“添加到购物车”和“立即购买”按钮:prnt.sc/aivwu0@Profile101从
产品视图中删除
溢出:隐藏的
。也在“检查可用性”文本上方添加到框中,有两行显示,请帮助我删除一行并显示为@Profile101 remove

@Profile101 last solution。移除
宽度:96%
.block、.sidebar.box查看
我试过了,现在“搜索栏”和“菜单”之间显示了更多的间隙,在它像这样显示之前:在顶部,在“搜索”框旁边,没有显示购物车按钮。在另一个链接中,它的显示也在上面“检查可用性”“文本,有两行显示,请帮助我删除一行并在顶部显示“购物车”文本,我删除了
宽度:96%来自
.block、.sidebar.box查看
。现在“Check Availability at”(检查可用性在)显示在2行中我尝试过了,现在“搜索栏”和“菜单”之间显示了更多的间隙,在它这样显示之前:在顶部,“search”(搜索)框旁边,没有显示购物车按钮。在另一个链接中,它的显示也在“Check Availability at”(检查可用性在)上方“文本,有两行显示,请帮助我删除一行并在顶部显示“购物车”文本,我删除了
宽度:96%来自
.block、.sidebar.box查看
。现在“Check availability at”显示在两行中