【问题标题】:Adding Margins on Blogger在 Blogger 上添加边距
【发布时间】:2018-06-19 18:29:25
【问题描述】:

我想在导航栏上分隔“TR”和“EN”部分。这是一个有问题的:

http://en.ahmetvarlik.com/

此网站中的 TR 和 EN 选项卡彼此靠得太近。我想这样安排:

Sample Align

在第一个网站 (en.ahmetvarlik.com) 中,我在“导航栏”部分添加了不同的代码。我也给了这个部分 font-size, text-align ,但我不能给出边距和文本颜色。 谁能帮我?

代码: 第一个网站 (en.ahmetvarlik.com):

a.navitabs, a.navitabs:link, a.navitabs:visited {display:inline-block !important; width:20x; height:25px; margin: 0 10px 0 10px; margin-top:0px; margin-bottom:10px; text-align:center; text-decoration:none; font-family:verdana; font-size:11px; color: #616161 !important; line-height:25px; overflow:hidden; float:none;}

a.navitabs:hover {color: #000000;}
#navibar {width:200px; margin:0 auto; text-align:center; color: #616161 !important; font-family:verdana; font-size:11px; float:none;}


<b:widget id='HTML3' locked='false' title='' type='HTML'>
 <b:widget-settings>
   <b:widget-setting name='content'>&lt;!-- Navigation tabs start --&gt;
&lt;div id=&#39;navibar&#39;&gt;
&lt;script language=&quot;javascript&quot; type=&quot;text/javascript&quot;&gt;
document.write (&quot;&lt;a href=&quot; + window.location.protocol + &quot;//&quot; + &quot;www.ahmetvarlik.com&quot; + window.location.pathname + &quot;&gt;  TR  &lt;/a&gt;&quot;); 
&lt;/script&gt;
&lt;script language=&quot;javascript&quot; type=&quot;text/javascript&quot;&gt; 
document.write (&quot;&lt;a href=&quot; + window.location.protocol + &quot;//&quot; + &quot;en.ahmetvarlik.com&quot; + window.location.pathname + &quot;&gt;  EN  &lt;/a&gt;&quot;); 
&lt;/script&gt;
&lt;div&gt;
&lt;!-- Navigation tabs end --&gt;&lt;/div&gt;&lt;/div&gt;</b:widget-setting>

示例图片代码:

a.navitabs, a.navitabs:link, a.navitabs:visited {display:inline-block !important; width:20x; height:25px; margin: 0 10px 0 10px; margin-top:0px; margin-bottom:10px; text-align:center; text-decoration:none; font-family:verdana; font-size:11px; color: #616161; line-height:25px; overflow:hidden; float:none;}

a.navitabs:hover {color: #000000;}
#navibar {width:200px; margin:0 auto; text-align:center;}

<!--Navigation page element starts -->
<div id='navibar-wrapper'> 
<b:section class='navibar_section' id='navibar_section' showaddelement='yes'>


<b:widget id='HTML3' locked='false' title='' type='HTML'>
 <b:widget-settings>
   <b:widget-setting name='content'>&lt;!-- Navigation tabs start --&gt;
&lt;div id=&#39;navibar&#39;&gt;
&lt;a href=&quot;http://www.ahmetvarlik.com/&quot; class=&quot;navitabs&quot; title=&gt;TR&lt;/a&gt;
&lt;a href=&quot;SOON!&quot; class=&quot;navitabs&quot; title=&gt;EN&lt;/a&gt;
&lt;div&gt;
&lt;!-- Navigation tabs end --&gt;&lt;/div&gt;&lt;/div&gt;</b:widget-setting>
 </b:widget-settings>
 <b:includable id='main'>
<!-- only display title if it's non-empty -->
<b:if cond='data:title != &quot;&quot;'>
<h2 class='title'><data:title/></h2>
</b:if>
<div class='widget-content'>
<data:content/>
</div>



<b:include name='quickedit'/>
</b:includable>
</b:widget>
</b:section> 
</div> 
<div style='clear: both;'/>
<!--Navigation page element ends -->

【问题讨论】:

  • 请添加您目前尝试过的代码。
  • 我编辑了我的问题。

标签: css templates blogger


【解决方案1】:

当我尝试在您的 div 和链接上设置边距时,它按预期工作,我认为那里没有问题。

【讨论】:

    【解决方案2】:

    问题解决了!

    我刚刚添加了:

    #navibar a { color: #616161 !important; margin: 0 10px 0 10px;}
    

    但是#navibar a:hover { color: #000000;} 不起作用。

    【讨论】:

      猜你喜欢
      • 2013-12-06
      • 2013-05-20
      • 2013-10-25
      • 2020-07-19
      • 2020-09-11
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2013-02-01
      相关资源
      最近更新 更多