gpt4 book ai didi

html - 我想删除元素 html/css 之间的空白

转载 作者:行者123 更新时间:2023-11-28 08:50:56 25 4
gpt4 key购买 nike

我使用 wordpress 开发这个网站,客户要求自定义栏(www.orbit.yetu.co.tz)但是一旦我插入图像并为其创建一个 div,它会自动在自身和之间生成一个空白导航栏。

    <body <?php body_class($body_classes); ?>>

<!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
<!-- Main Container -->
<!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
<div class="main-container">

<!-- This is a custom bar added by me -->
<div id="main-topbar">
<img src="http://orbit.yetu.co.tz/wp-content/uploads/2014/12/top-bar-new.jpg" alt="Orbit Securities" style="margin-left:auto;margin-right:auto;width:1180px;height:90px">
</div>
<!--This is the end of the top bar -->

<!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
<!-- Top Bar - Set "white" or "dark" below -->
<!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
<div class="header <?php echo $basix_options['top_bar_style'] ?><?php if ($basix_options['fixed_header'] != FALSE) { ?> sticky<?php } ?>">
<div class="topbar content-width">

<!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
<!-- Logo -->
<!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->

我做错了什么?

最佳答案

添加display: inline-block<img>

关于html - 我想删除元素 html/css 之间的空白,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/27342998/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com