# Crie um cabeçalho de navegação global responsivo (Linkando entre Discourse e WP)

**URL:** <https://meta.discourse.org/t/create-a-responsive-global-navigation-header-linking-between-discourse-and-wp/98650>\
**Category:** Product Support\
**Created:** [3 Outubro , 2018 16:43 UTC](https://meta.discourse.org/t/create-a-responsive-global-navigation-header-linking-between-discourse-and-wp/98650 "2018-10-03T16:43:31Z")\
**Posts on this page:** 1\
**Showing post:** 1

<div class="post-metadata">

**Author:** ![jord8on](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/jord8on/32/166809_2.png) [@jord8on](https://meta.discourse.org/u/jord8on)\
**Post date:** [3 Outubro , 2018 16:43 UTC](https://meta.discourse.org/t/create-a-responsive-global-navigation-header-linking-between-discourse-and-wp/98650/1 "2018-10-03T16:43:31Z")

</div>

**tl;dr**

1. I’ve been working on a global navigation bar that I want to sit above the Main Discourse Menu. I want to be able to use this same code to place this exact same menu atop my Wordpress Main Menu; seamless UX.
2. I need help getting my header to be fixed, above the discourse main menu
3. When I have my 5 links spaced at 20%, the last one wraps to the next line but when I have it set to 19.8% it doesn’t wrap. How can I optimize the spacing/width in my code?

* * *

I like the respective search tools and other parts of the main headers in both WP and Discourse so I’ve decided to keep those intact beneath my custom navbar. But I want to make it easy for my users to get between my LMS (via WP) and the community discussions in Discourse. I’ve designed my HTML/CSS to hide the text for each button, for mobile devices, making it feel more like an application.

I tried to follow the advice offered in a few forums here like the “[Best way to customize the header](https://meta.discourse.org/t/best-way-to-customize-the-header/13368/5)” topic, but I can’t figure out why my nav bar seems to be sitting behind the main discourse nav bar.

I also want the navbar to be sticky so that it remains at the top of the screen, so that when a user scrolls down, they will always see this navbar at the top of their screen.

Here’s a GIF showing what’s happening when I refresh my screen…  
[Here’s my live site](https://community.jewelbound.com) (a big WIP right now 😉)

 ![2018-10-03_10-19-17](https://global.discourse-cdn.com/meta/original/3X/9/9/99c04a6fc7e09dc1d0faa492940c9ebb4d7e5717.gif)

Here’s my current HTML/CSS that I’ve placed within the “Customize” admin ui…

HTML:

```
<div class="navbar">
    <a class="rt-border" href="https://jewelbound.com"><i class="fa fa-fw fa-home"></i><span> Home</span></a> 
    <a class="rt-border" href="https://community.jewelbound.com"><i class="fa fa-fw fa-comments"></i> <span>Community</span></a> 
    <a class="rt-border" href="https://jewelbound.com/courses"><i class="fa fa-fw fa-edit"></i><span> Courses</span></a> 
    <a class="rt-border" href="#"><i class="fa fa-fw fa-star"></i> <span>Resources</span></a>
    <a href="#"><i class="fa fa-fw fa-calendar"></i><span> Events</span></a>
</div>

```

CSS:

```
/* Style the navigation bar */
.navbar {
  margin: 0;
  width: 100%;
  position: fixed;
  line-height: 50px;
  background-color: #B7234C;  
}

/* Navbar links */
.navbar a {
  float: left;
  text-align: center;
  color: white;
  text-decoration: none;
  font-size: 1.1em;
  width: 19.8%;
}

.rt-border {
  border-right: 2px solid #d6295a;
}

/* Navbar links on mouse-over */
.navbar a:hover {
  background-color: #961d3f;
}

/* Add responsiveness - will automatically display the navbar vertically instead of horizontally on screens less than the number of pixels defined here */
@media screen and (max-width: 940px) {
  
  .navbar{
    display: flex;
  }
  .navbar span{
    display: none;
  }
}

```

---

_[View the full topic](https://meta.discourse.org/t/create-a-responsive-global-navigation-header-linking-between-discourse-and-wp/98650)._
