CALL 425.830.8350 FOR CUSTOM WORDPRESS DESIGNS

Colorful boxes containing tips, info, links and even warnings are very helpful in providing a positive visitor experience in navigating your website. Message boxes are sometimes the best way to point towards a specific link, state the importance of a certain item in the page, or even warn the visitor of something they should know.

Creating these using CSS is a pretty simple proposition. All you need is the icons that would represent each type of box: warning, info, success and error (or, whatever type of ox you wish like ‘download’, etc).

The CSS

Here’s the CSS which is pretty straightforward by creating a class for each type.

The HTML

This part is simple. All you do is create a div using the class name of the type of box you wish to display then add your content.

That would look like this:

Eros odio pulvinar, arcu, dignissim dis, penatibus augue egestas rhoncus lectus etiam elementum elementum nunc eu vel magna penatibus elementum. Dapibus elit integer augue. Purus sociis phasellus magna, vel integer, nisi amet porttitor hac, lectus, dis integer cursus dolor vut. Nec integer integer sagittis in! Aliquam facilisis proin augue, magnis, non in facilisis scelerisque eros mus! Dictumst.
Eros odio pulvinar, arcu, dignissim dis, penatibus augue egestas rhoncus lectus etiam elementum elementum nunc eu vel magna penatibus elementum. Dapibus elit integer augue. Purus sociis phasellus magna, vel integer, nisi amet porttitor hac, lectus, dis integer cursus dolor vut. Nec integer integer sagittis in! Aliquam facilisis proin augue, magnis, non in facilisis scelerisque eros mus! Dictumst.
Eros odio pulvinar, arcu, dignissim dis, penatibus augue egestas rhoncus lectus etiam elementum elementum nunc eu vel magna penatibus elementum. Dapibus elit integer augue. Purus sociis phasellus magna, vel integer, nisi amet porttitor hac, lectus, dis integer cursus dolor vut. Nec integer integer sagittis in! Aliquam facilisis proin augue, magnis, non in facilisis scelerisque eros mus! Dictumst.
Eros odio pulvinar, arcu, dignissim dis, penatibus augue egestas rhoncus lectus etiam elementum elementum nunc eu vel magna penatibus elementum. Dapibus elit integer augue. Purus sociis phasellus magna, vel integer, nisi amet porttitor hac, lectus, dis integer cursus dolor vut. Nec integer integer sagittis in! Aliquam facilisis proin augue, magnis, non in facilisis scelerisque eros mus! Dictumst.

The Images

Below are the images I’ve used in my examples for you to download if you wish

Pin It on Pinterest

Share This