

- Trending Categories
Data Structure
Networking
RDBMS
Operating System
Java
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
How to create callout messages with CSS?
To create callout messages with CSS, the code is as follows −
Example
<!DOCTYPE html> <html> <head> <meta name="viewport" content="width=device-width, initial-scale=1"> <style> body {font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif} .callout { position: fixed; bottom: 35px; right: 20px; margin-left: 20px; max-width: 300px; } .calloutHeading { padding: 25px 15px; background: rgb(68, 93, 235); font-size: 30px; color: white; } .calloutMessage { padding: 15px; background-color: #ccc; color: black } .close { position: absolute; top: 5px; right: 15px; color: white; font-size: 30px; cursor: pointer; } .close:hover { color: lightgrey; } </style> </head> <body> <h1>Callout Message Example</h1> <h3>Product 2</h3> <h3>Product 3</h3> <h3>Product 4</h3> <div class="callout"> <div class="calloutHeading">Check our offers</div> <span class="close" onclick="this.parentElement.style.display='none';">×</span> <div class="calloutMessage"> <p>Before you leave this page don't forget to check our other offers <a href="#">Check Them</a></p> </div> </div> </body> </html>
Output
The above code will produce the following output −
- Related Questions & Answers
- How to create alert messages with CSS?
- How to create tooltips with CSS?
- How to create arrows with CSS?
- How to create fading effect with CSS
- How to create image filters with CSS
- How to create Icon Bar with CSS?
- How to create a pagination with CSS?
- How to create fading buttons with CSS?
- How to create loading buttons with CSS?
- How to create pill buttons with CSS?
- How to create notification buttons with CSS?
- How to create icon buttons with CSS?
- How to create empty circles with CSS?
- How to create responsive typography with CSS?
- How to create a Calendar with CSS?
Advertisements