首页 > 解决方案 > 页面部分中心需要徽标,不包括方形空间中的左侧边栏

问题描述

网站:https : //wells-demo.squarespace.com/ 页面中心需要徽标,不包括所有格式移动设备、桌面等方格 WELLS 模板中的左侧边栏(标题)。我想弄清楚但没有结果。以下是我的代码

$(document).ready(function(){

 $('#headerWrapper #header ').after('<div id="logo1"  data-content-field="site-title"><h1 class="logo image" data-shrink-original-size="23" style="letter-spacing: 0.0869565em;"><a href="/"><img src="//static1.squarespace.com/static/5adfd10929711421a9b29d21/t/5adfdbac562fa79909bad158/1524908392416/?format=750w" alt="L ETO BRIDAL" width="130"  height=50"></a></h1></div>');
});
#logo{display:none;}
  #headerWrapper{top:4px!important}
  #logo1 h1  a img {
       height:70px!important;
    
      
  }
 #logo1 {
    left: 300%;
    position: absolute;
    text-align: center !important;
    top: 10px !important;
    transform: translateX(-50%);

在此处输入图像描述

标签: htmlcssheadersquarespace

解决方案


根据您当前的 CSS,应该这样做:

#logo {
  width: 100%;
  text-align: center;
}
@media (min-width: 801px) {
  #logo {
    position: fixed;
    width: calc(100% - 340px);
    top: 0;
    margin-left: 240px;
    box-sizing: border-box;
    background-color: #ffffff85;
    padding: .5rem 0;
    border-bottom: 1px solid #fff;
  }
}

注意:在当前形式下,您的问题对未来的访问者并没有真正有用。


推荐阅读