我想在导航栏上分隔“TR”和“EN”部分。这是有问题的:
本网站中的 TR 和 EN 标签靠得太近了。我想这样安排:
在第一个网站 (en.ahmetvarlik.com) 中,我在“导航栏”部分添加了不同的代码。我也给了这个部分 font-size, text-align ,但是我不能给 margins 和 text-color 。谁能帮我?
代码:第一个网站 (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'><!-- Navigation tabs start -->
<div id='navibar'>
<script language="javascript" type="text/javascript">
document.write ("<a href=" + window.location.protocol + "//" + "www.ahmetvarlik.com" + window.location.pathname + "> TR </a>");
</script>
<script language="javascript" type="text/javascript">
document.write ("<a href=" + window.location.protocol + "//" + "en.ahmetvarlik.com" + window.location.pathname + "> EN </a>");
</script>
<div>
<!-- Navigation tabs end --></div></div></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'><!-- Navigation tabs start -->
<div id='navibar'>
<a href="http://www.ahmetvarlik.com/" class="navitabs" title=>TR</a>
<a href="SOON!" class="navitabs" title=>EN</a>
<div>
<!-- Navigation tabs end --></div></div></b:widget-setting>
</b:widget-settings>
<b:includable id='main'>
<!-- only display title if it's non-empty -->
<b:if cond='data:title != ""'>
<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 -->
最佳答案
当我尝试在您的 div 和链接上设置边距时,它按预期工作,我看不出有什么问题。
关于css - 在 Blogger 上添加边距,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/50934823/