All threads / Style a drop down menu with css

Ask A Question

Notifications

You’re not receiving notifications from this thread.

Style a drop down menu with css

jm castel asked in CSS

I watched the tuto on making notifications but i can't set the css to display the notifs properly.

Could someone show me an exemple of his css ?

Thanks

I was using Bootstrap to get the notification links in the header. No extra CSS needed for basic links like that.

In fact I was talking about styling the drop down menu, not the way of putting it into the nav bar.
I was trying to have the same as go rail with the red background around the notification' s number but fore somme reason when I click the bell, the red background doesn't disappear

Hey JM,

I also added some code to remove that bell after you mark the messages as read. Once that AJAX call completes, the JS success callback just removes that div from the navigation. And that number is just the typical bootstrap CSS for the badge. You can inspect the HTML on the page to see what that looks like!

Join the discussion

Want to stay up-to-date with Ruby on Rails?

Join 33,399+ developers who get early access to new tutorials, screencasts, articles, and more.

    We care about the protection of your data. Read our Privacy Policy.

    logo Created with Sketch.

    Ruby on Rails tutorials, guides, and screencasts for web developers learning Ruby, Rails, Javascript, Turbolinks, Stimulus.js, Vue.js, and more. Icons by Icons8

    © 2020 GoRails, LLC. All rights reserved.