Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7828765
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 2, 20262026-06-02T10:28:35+00:00 2026-06-02T10:28:35+00:00

I have implemented devise into my rails app. When a flash message/Flash notice is

  • 0

I have implemented devise into my rails app. When a flash message/Flash notice is rendered it appears on the page as just text I.E. Your session expired, please sign in again to continue.

This appears at the top of my page over the top of the page.

What i would like to do is customise this with some CSS, add border, change the style of text etc, ideally i would like the notice to be closed with a x in the top corner rather than refreshing the page for the notice to disappear.

Has anyone done this or can possibly point me in the right direction

All help appreciated

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-02T10:28:37+00:00Added an answer on June 2, 2026 at 10:28 am

    Add this, or something similar to your CSS file:

    .flash {
      text-align: center;
      width: 100%;
      padding: 10px 0 10px 0;
      margin-top: 1em;
      color: #333333;
      border: 1px solid black; 
    }
    
    /*
     Flash message styles
    */
    .notice {
      background: #fefad9; 
    }
    

    Other flash classes are: .success, .alert, .error. Might be some more that I forgotten. But that should hopefully get you in the right direction.

    Don’t forget to add:

    <% flash.each do |key, value| %>
      <%= content_tag(:div, value, :class => "flash #{key}") %>
    <% end %> 
    

    To your header or application.html.erb.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have successfully implemented login with Facebook using Devise and OmniAuth (built into Devise).
I have implemented the code in Devise call backs in my application controller. First
I have implemented an ASP.NET http handler. It appears to me that there is
I have implemented Facebook connect on my iPhone App to login users to my
Ok so I implemented iAds into my current app. Problem is how do I
I have to read an html as a text file and I have implemented
I use Devise (1.4.8) for my User model and have been trying to implement
I have android device with root and i try to implement some small app.
I have implemented a function to validate .edu domains. This is how I am
I have implemented basic syntax highlighting by properly setting the NSTextStorage delegate of my

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.