user1944535
user1944535

Reputation: 43

Google gmail notifier css

When sending message or discard an email, at the top there will be a yellow box with message "Your message has been discarded. Undo discard". I want exactly the same Google css style. Any example and advise is welcome. Thank you

Please refer image below with the links

Print screen

Upvotes: 3

Views: 703

Answers (2)

Jossef Harush Kadouri
Jossef Harush Kadouri

Reputation: 34207

Another example (straight from gmail css)

http://jsfiddle.net/VVbZZ/1/

css:

.notification-container {
    left: 0;
    top: 0;
    margin: 0;
    font-family: arial, sans-serif;
    font-weight: bold;
    visibility: hidden;
    z-index: 8;
    position: absolute;
    text-align: center;
    width: 100%;
    height: 100%;
}
.notification-message {
    position: relative;
    display: inline-block;
    visibility: visible;
    font-size: 80%;
    padding: 6px 10px;
    background-color: #f9edbe;
    border: 1px solid #f0c36d;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

html:

<div class="notification-container">
    <div class="notification-message"> 
       <span>Loading... <a href="damn.com">Click to learn more</a></span>
    </div>
</div>

result:

enter image description here

Upvotes: 4

Code Lღver
Code Lღver

Reputation: 15603

Use the below css:

.verticalBox {
  margin: 0 0;
  position: relative;
  top: 8px;
  z-index: 990;
  border-color: #f0c36d;
  background-color: #f9edbe;
  padding: 0 10px;
  border: 1px solid transparent;
  border-radius: 2px;
  -webkit-border-radius: 2px;
  -webkit-box-shadow: 0 2px 4px rgba(0,0,0,0.2);
  box-shadow: 0 2px 4px rgba(0,0,0,0.2);
  background: #f9edbe;
  border-color: #f9edbe;
  color: #222;
  padding: 0 7px;
  font-size: 80%;
  font-weight: bold; 
  text-align: center;
}

And use the following HTML:

<div class="verticalBox">This is testing</div>

This is similar to gmail message.

result:

enter image description here

JSFiddle

Upvotes: 1

Related Questions