Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/html/78.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_Wordpress_Image_Styling - Fatal编程技术网

Html 如何在徽标旁边浮动图像?

Html 如何在徽标旁边浮动图像?,html,css,wordpress,image,styling,Html,Css,Wordpress,Image,Styling,我正在使用Wordpress 5.2.2和Newspress扩展主题作为父级 我恢复了外观-->Newspress选项中主题的默认设置,试图修复一些不相关的内容,并丢失了浮动广告的自定义html/内联css,一个左一个右夹住徽标。哎呀。我试图根据我对html/css非常有限的知识来猜测替换代码,它不仅呈现在徽标上,还呈现在顶部菜单上。我知道这个改变可以在这个部分完成,因为我只是想把它恢复到以前开发人员的状态。非常感谢您的帮助 外观-->新闻稿选项-->常规选项-->标题区域内的自定义代码(所有页

我正在使用Wordpress 5.2.2和Newspress扩展主题作为父级

我恢复了外观-->Newspress选项中主题的默认设置,试图修复一些不相关的内容,并丢失了浮动广告的自定义html/内联css,一个左一个右夹住徽标。哎呀。我试图根据我对html/css非常有限的知识来猜测替换代码,它不仅呈现在徽标上,还呈现在顶部菜单上。我知道这个改变可以在这个部分完成,因为我只是想把它恢复到以前开发人员的状态。非常感谢您的帮助

外观-->新闻稿选项-->常规选项-->标题区域内的自定义代码(所有页面)



您的广告位于容器分区之外。目前它们实际上位于站点元标记之上。CSS是一个强大的工具,但它不应该被用来过度纠正或掩盖不正确的HTML结构。你需要把你的广告塞进他们各自的部门

这是HTML的外观,特别是标题div:

<div id="header">
        <div id="header-content">

    <!-- Site Titele and Description Goes Here -->
    <div class="topadlft"><a href="https://www.flalottery.com/" target="_blank" rel="noreferrer noopener"><img src="http://ebonynewstoday.com/wp-content/uploads/2017/10/FLO_16975_Education-Print-Ad-Ebony-News-Today_10.625x10.445-GLOBE-C.jpg" alt="fla lottery"></a><a href="#" target="_blank"><img src="http://ebonynewstoday.com/wp-content/themes/newspress-extend/images/ad3.png"></a></div> 
    <a href="https://ebonynewstoday.com/"><img class="site-logo" src="http://ebonynewstoday.com/wp-content/uploads/2017/04/Ebony_LOGOHorizontal_Color.gif"><h1 class="site-title-hidden">Ebony News Today</h1></a>

    <h2 class="site-title-hidden">"The Heartbeat of Our Community"</h2>        
    <div class="topadrt"><a href="https://www.southeasternhonda.com/" target="_blank" rel="noreferrer noopener"><img src="http://ebonynewstoday.com/wp-content/uploads/2017/10/SEH_EbonyNewsAd_OCT2017-1.jpg" alt="southeastern honda"></a><a href="#" target="_blank"><img src="http://ebonynewstoday.com/wp-content/themes/newspress-extend/images/ad3.png"></a></div> 

    </div><!-- header-content -->
    <div class="heading-date">Friday, October 4, 2019</div>  
    </div>

“我们社区的心跳”
2019年10月4日,星期五
您还需要关闭CSS文件中“topadlft”和“topadrt”类的“display:none;”选择器。同时从每个广告图像中删除内联样式。您将希望包含广告的div类在这里完成繁重的工作。内联样式只会导致进一步的复杂性

一旦你解决了上述问题,你应该得到如下结果:


不太熟悉WordPress的设置,但是代码应该放在
部分的内部,而不是
部分>可能有一个等效的区域来输入这样的代码。你可能想“夹心”你的标志代码。此外,您在第一个链接中缺少开头的
,这可能会导致超链接“出血”到其余内容上。好的,我在部分中添加了“并输入”,但在保存和刷新时完全相同(奇怪)。以前,无论是什么语法,把它们放在标志的任何一边,都是在我在下面使用的同一节中,所以我想有一种方法可以将它与标志内联。。。
<div id="header">
        <div id="header-content">

    <!-- Site Titele and Description Goes Here -->
    <div class="topadlft"><a href="https://www.flalottery.com/" target="_blank" rel="noreferrer noopener"><img src="http://ebonynewstoday.com/wp-content/uploads/2017/10/FLO_16975_Education-Print-Ad-Ebony-News-Today_10.625x10.445-GLOBE-C.jpg" alt="fla lottery"></a><a href="#" target="_blank"><img src="http://ebonynewstoday.com/wp-content/themes/newspress-extend/images/ad3.png"></a></div> 
    <a href="https://ebonynewstoday.com/"><img class="site-logo" src="http://ebonynewstoday.com/wp-content/uploads/2017/04/Ebony_LOGOHorizontal_Color.gif"><h1 class="site-title-hidden">Ebony News Today</h1></a>

    <h2 class="site-title-hidden">"The Heartbeat of Our Community"</h2>        
    <div class="topadrt"><a href="https://www.southeasternhonda.com/" target="_blank" rel="noreferrer noopener"><img src="http://ebonynewstoday.com/wp-content/uploads/2017/10/SEH_EbonyNewsAd_OCT2017-1.jpg" alt="southeastern honda"></a><a href="#" target="_blank"><img src="http://ebonynewstoday.com/wp-content/themes/newspress-extend/images/ad3.png"></a></div> 

    </div><!-- header-content -->
    <div class="heading-date">Friday, October 4, 2019</div>  
    </div>