我想在标题中添加一个语言按钮。我该如何插入?

时间:2018-01-11 13:06:23

标签: html squarespace

经过大量的反复试验,我终于以网站的风格为我的Squarespace网站创建了一个语言按钮。

相关网站:https://www.happylifeclinic.org,该按钮当前位于标题图片下方的降价区块中。我想把它放在'联系人'按钮的正确位置,我不能,为了我的生活,弄清楚如何以及在何处输入HTML代码(我正在使用GitHub桌面和编辑HTML与崇高3)。

如果我遗漏了请告诉我。

2 个答案:

答案 0 :(得分:0)

您需要将整个代码块sqs-block转移到HTML中的标题部分。我尝试从检查员做以下工作,它工作正常:

<nav id="mainNavigation" data-content-field="navigation-mainNav">
   <div class="collection active homepage">
      <a href="/">
      Acasa
      </a>
   </div>
   <div class="collection">
      <a href="/ro/despre-noi/">
      Despre Noi
      </a>
   </div>
   <div class="folder">
      <div class="folder-toggle" data-href="/ro/folder/servicii/">Servicii</div>
      <div class="subnav">
         <div class="collection">
            <a href="/ro/corporate/">
            Corporate
            </a>
         </div>
         <div class="collection">
            <a href="/ro/adulti/">
            Adulti
            </a>
         </div>
         <div class="collection">
            <a href="/ro/copii-si-adolescenti/">
            Copii si Adolescenti
            </a>
         </div>
         <div class="collection">
            <a href="/ro/cuplu-si-familie/">
            Cuplu si Familie
            </a>
         </div>
         <div class="collection">
            <a href="/ro/lgbtq/">
            LGBTQ
            </a>
         </div>
      </div>
   </div>
   <div class="collection">
      <a href="/ro/contact/">
      Contact
      </a>
   </div>
   <div class="sqs-block markdown-block sqs-block-markdown" data-block-type="44" id="block-yui_3_17_2_2_1515674166386_21002">
      <div class="sqs-block-content" id="yui_3_17_2_1_1515676082589_298">
         <div data-preserve-html-node="true" class="dropdown" id="yui_3_17_2_1_1515676082589_297">
            <button data-preserve-html-node="true" onclick="myFunction()" class="dropbtn" id="yui_3_17_2_1_1515676082589_296">Language</button>
            <div data-preserve-html-node="true" id="myDropdown" class="dropdown-content">
               <a data-preserve-html-node="true" id="navEng" href="/en/index" class="language"><img data-preserve-html-node="true" id="imgNavEng" src="http://www.roemheld.de/IT/Data/Images/Address/Grossbritanien.gif" alt="ENG" class="img-thumbnail icon-small"></a>
               <a data-preserve-html-node="true" id="navEng" href="/ro/index" class="language"><img data-preserve-html-node="true" id="imgNavEng" src="https://static1.squarespace.com/static/59f333cc49fc2b47eddb3379/t/5a44df2e08522979a70abfa9/1514463022027/ro.png" alt="ENG" class="img-thumbnail icon-small"></a>
               <a data-preserve-html-node="true" id="navEng" href="/de/index" class="language"><img data-preserve-html-node="true" id="imgNavEng" src="https://static1.squarespace.com/static/59f333cc49fc2b47eddb3379/t/5a44dee6ec212d2c0937ff25/1514462950503/de.png" alt="ENG" class="img-thumbnail icon-small"></a>
               <a data-preserve-html-node="true" id="navEng" href="/it/index" class="language"><img data-preserve-html-node="true" id="imgNavEng" src="https://static1.squarespace.com/static/59f333cc49fc2b47eddb3379/t/5a47dcde9140b7ea14e11002/1514659038936/it.png" alt="ENG" class="img-thumbnail icon-small"></a>
            </div>
         </div>
      </div>
   </div>
</nav>

您肯定需要使用CSS,然后使用其下拉选项让它看起来正确。

答案 1 :(得分:0)

客户端不再需要下拉列表了,但我确实找到了解决方案。