简体   繁体   English

如何使导航栏全宽并将选项卡置于中间?

[英]How to make the navigational bar full width and bring tabs to middle?

My website is this www.bangkokvisitors.com I'm new to css and HTML.我的网站是 www.bangkokvisitors.com 我是 css 和 HTML 的新手。 I used a child theme and edited the style.css.我使用了一个子主题并编辑了 style.css。 But the output doesn't look like the way I want.但输出看起来不像我想要的方式。

I added these to css我将这些添加到 css

.menu{
height: 42px;
}

.menu li{
position:relative;
float:left;
left:33%;
margin-top:0px;
}

this seems work for me.这似乎对我有用。 But the margin doesn't change after i save the code and reload the webpage.但是在我保存代码并重新加载网页后,边距不会改变。 Help me with this please请帮我解决这个问题

You have to add your header tag after body tag.您必须在正文标签之后添加标题标签。 You also need to change some class in it.您还需要更改其中的一些类。

<header multilinks-noscroll="true" id="header" class="blog-header">
    <div multilinks-noscroll="true" class="blog-title container"><a multilinks-noscroll="true" href="http://bangkokvisitors.com/" title="bangkokvisitors.com" rel="home">bangkokvisitors.com</a></div>
    <div multilinks-noscroll="true" class="blog-description container">To shop, to hangout and to explore the city of Angels | <a multilinks-noscroll="true" href="http://bangkokvisitors.com/feed/" title="Subscribe to the RSS Feed of this site" id="rss">RSS</a></div>
    <nav multilinks-noscroll="true" id="blog-menu" class="menu">

        <!--YOUR MENU CODE GOES HERE-->

    </nav>
</header> 

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM