Title: Top bar doesn&#8217;t work css
Last modified: July 9, 2020

---

# Top bar doesn’t work css

 *  [emusxx](https://wordpress.org/support/users/emusxx/)
 * (@emusxx)
 * [5 years, 10 months ago](https://wordpress.org/support/topic/top-bar-doesnt-work-css/)
 * Hi,
 * I’ve tried to add something to my top bar and styling it via css. The problem
   is that the divs inside top bar doesn’t fit the content in height. It is a very
   weird behavior, because if I paste the same code inside the main container the
   divs behave correctly.
 * It is difficult to explain so I’ve created a page as a example where you can 
   see what I mean. In the top of the page you have the pre header content, which
   works bad, and below you have the same content but in “generate_inside_container”
   hook which works perfect. What is the problem here? I can’t figure it out… Many
   thanks.
 * The page I need help with: _[[log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Ftop-bar-doesnt-work-css%2F%3Foutput_format%3Dmd&locale=en_US)
   to see the link]_

Viewing 9 replies - 1 through 9 (of 9 total)

 *  [Leo](https://wordpress.org/support/users/leohsiang/)
 * (@leohsiang)
 * [5 years, 10 months ago](https://wordpress.org/support/topic/top-bar-doesnt-work-css/#post-13101610)
 * Hi there,
 * Sorry those two elements look the same to me?
    [https://www.screencast.com/t/mL29sd4Zt](https://www.screencast.com/t/mL29sd4Zt)
 * It’s not using the top bar either.
 * Am I missing something here?
 *  Thread Starter [emusxx](https://wordpress.org/support/users/emusxx/)
 * (@emusxx)
 * [5 years, 10 months ago](https://wordpress.org/support/topic/top-bar-doesnt-work-css/#post-13101970)
 * Hi!
 * Yes, they look the same, but if you inspect the first one you will see that the
   div doesn’t respect the height of its inner content. Easier to see, just hover
   the first one and then over the one below. You will see the diference.
 * Thanks!
 *  [Leo](https://wordpress.org/support/users/leohsiang/)
 * (@leohsiang)
 * [5 years, 10 months ago](https://wordpress.org/support/topic/top-bar-doesnt-work-css/#post-13102022)
 * Both of those are custom HTML and CSS added by you so GP doesn’t actually control
   it at all.
 * Neither of them are actually using the top bar widget area built in the theme.
 * You would need to go through your custom HTML and CSS to try to identify the 
   problem – You have close to 9000 lines of CSS so I cannot go through them for
   you.
 *  Thread Starter [emusxx](https://wordpress.org/support/users/emusxx/)
 * (@emusxx)
 * [5 years, 10 months ago](https://wordpress.org/support/topic/top-bar-doesnt-work-css/#post-13102343)
 * I’ve tried the same operarion with the top bar widget and the problem is exactly
   the same. Have a look now. Exactly same code of the bottom footer bar widget 
   but very different behavior…
 * I think it is not a problem of my style sheet.
 * Thanks.
 *  [Leo](https://wordpress.org/support/users/leohsiang/)
 * (@leohsiang)
 * [5 years, 10 months ago](https://wordpress.org/support/topic/top-bar-doesnt-work-css/#post-13102353)
 * Not sure if I understand.
 * The theme itself doesn’t add any hover effect to links like what you see on your
   site.
 * Can you activate the parent theme first and see if the issue still exist?
 *  Thread Starter [emusxx](https://wordpress.org/support/users/emusxx/)
 * (@emusxx)
 * [5 years, 10 months ago](https://wordpress.org/support/topic/top-bar-doesnt-work-css/#post-13102645)
 * It doesn’t has to do with the hover effect, it is a custom one. It was just an
   example to see it behaves different. If you inspect the div that contains the
   content in the top bar you’ll see that it does not fit the content. If you for
   example icrease the font size, the div doesn’t change its height, causing and
   error and making very difficult to style any possible content. Also, the hover
   effect sould behave in the same way as the it does in the footer.
 * The only reflexion I could reach to was that this problem only appears when you
   put the content before the header (as in this case). Same content after main 
   nav works perfectly well…
    -  This reply was modified 5 years, 10 months ago by [emusxx](https://wordpress.org/support/users/emusxx/).
 *  [Leo](https://wordpress.org/support/users/leohsiang/)
 * (@leohsiang)
 * [5 years, 10 months ago](https://wordpress.org/support/topic/top-bar-doesnt-work-css/#post-13102975)
 * Ok perhaps I’m a little confused what the issue is.
 * Can you first activate the parent theme so we can take a look without your custom
   CSS?
 *  Thread Starter [emusxx](https://wordpress.org/support/users/emusxx/)
 * (@emusxx)
 * [5 years, 10 months ago](https://wordpress.org/support/topic/top-bar-doesnt-work-css/#post-13104326)
 * You are right it is a problem of my CSS. Many thanks.
 *  [Leo](https://wordpress.org/support/users/leohsiang/)
 * (@leohsiang)
 * [5 years, 10 months ago](https://wordpress.org/support/topic/top-bar-doesnt-work-css/#post-13106191)
 * No problem 🙂

Viewing 9 replies - 1 through 9 (of 9 total)

The topic ‘Top bar doesn’t work css’ is closed to new replies.

 * ![](https://i0.wp.com/themes.svn.wordpress.org/generatepress/3.6.1/screenshot.
   png)
 * GeneratePress
 * [Support Threads](https://wordpress.org/support/theme/generatepress/)
 * [Active Topics](https://wordpress.org/support/theme/generatepress/active/)
 * [Unresolved Topics](https://wordpress.org/support/theme/generatepress/unresolved/)
 * [Reviews](https://wordpress.org/support/theme/generatepress/reviews/)

 * 9 replies
 * 2 participants
 * Last reply from: [Leo](https://wordpress.org/support/users/leohsiang/)
 * Last activity: [5 years, 10 months ago](https://wordpress.org/support/topic/top-bar-doesnt-work-css/#post-13106191)
 * Status: not resolved