简体   繁体   English

如何在导航栏下放置文字?

[英]How to put my text under my navigation bar?

Okay so I have a nav bar for my website and I have never ran into this issue. 好的,我的网站上设有导航栏,并且从未遇到过此问题。 All my text goes right behind my nav bar and not under. 我所有的文字都放在导航栏的后面,而不是下方。 It could be because my navbar is made to auto adjust for mobile screens. 这可能是因为我的导航栏是针对移动屏幕自动调整的。

<body>
             <nav>
                 <h1 class="brand"><a href="#">CHS Robotics</a></h1>
                 <ul>
                     <li><a href="#">Club Info</a></li>
                     <li><a href="#">The Team</a></li>
                     <li><a href="#">Positions</a></li>
                     <li><a href="#">News</a></li>
                     <li><a href="#">Donate</a></li>
                     <li><a href="#">Sign up</a></li>
                     <li><a href="#">Login</a></li>
                  </ul>
                  <div style="clear: both"></div>
             </nav>
                  <div class="responsive-bar">
                  <h3 class="brand"><a href="#">CHS Robotics</a></h3>
                  <h4 class="menu">Menu</h4>
                  <div style="clear: both"></div>
                  <script src="https://code.jquery.com/jquery-3.2.1.min.js"></script>
                  <script type="text/javascript">
                         $(document).ready(function(){
                            $(".menu").click(function(){
                                $("nav").slideToggle(500);
                            })


                         }) 
               <h1 class="about">About CHS Robotics</h1>

More info: Cyrusmusic101.github.io 更多信息:Cyrusmusic101.github.io

I suggest you clear your cache, since there's nothing wrong with the code and it seems perfectly fine when I access the link. 我建议您清除缓存,因为代码没有任何问题,并且当我访问链接时,它看起来非常好。 (Also, if something were wrong it would probably be the CSS, so it'd be useful to also post it). (此外,如果出现错误,则可能是CSS,因此也将其发布会很有用)。

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

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