Reputation: 43
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
Upvotes: 3
Views: 703
Reputation: 34207
Another example (straight from gmail css)
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:
Upvotes: 4
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:
Upvotes: 1