Skip to content

January 6, 2010

5

CSS Styles: Favorite Colored Text Boxes, Callouts, Sidebars, and Quotes

This entry is part 2 of 5 in the series CSS Text-Box Styles For Serious Writers

Fancy Boxes for Callouts and Sidebars

 

Next up are some fancy boxes for callouts, sidebars, and quotes.

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Quisque sit amet leo felis, sed tincidunt libero. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; Aliquam porta placerat magna a aliquam.

This is the CALLOUT CLASS. It’s a full-width callout . . . Click the bold title below to copy the code. Don’t forget to include the period (.) before the class name. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Quisque sit amet leo felis, sed tincidunt libero. Vestibulum ante ipsum.

 

CALLOUT Text Box : Click Here For The Code»

 

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Quisque sit amet leo felis, sed tincidunt libero. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; Aliquam porta placerat magna a aliquam.

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Quisque sit amet leo felis, sed tincidunt libero. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; Aliquam porta placerat magna a aliquam.

Just use a few words here because the letters are big and the space is small!

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Quisque sit amet leo felis, sed tincidunt libero. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; Aliquam porta placerat magna a aliquam. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Quisque sit amet leo felis, sed tincidunt libero. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; Aliquam porta placerat magna a aliquam. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Quisque sit amet leo felis, sed tincidunt libero. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; Aliquam porta placerat magna a aliquam.

This is the CALLOUT_LEFT CLASS. Click the bold title below to copy the code. Don’t forget to include the period (.) before the class name. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Quisque sit amet leo felis, sed tincidunt libero. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; Aliquam porta placerat magna a aliquam.

 

CALLOUT_LEFT Text Box : Click Here For The Code»

 

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Quisque sit amet leo felis, sed tincidunt libero. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; Aliquam porta placerat magna a aliquam. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Quisque sit amet leo felis, sed tincidunt libero. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; Aliquam porta placerat magna a aliquam.

Just use a few words here because the letters are big and the space is small!

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Quisque sit amet leo felis, sed tincidunt libero. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; Aliquam porta placerat magna a aliquam. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Quisque sit amet leo felis, sed tincidunt libero. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; Aliquam porta placerat magna a aliquam.

This is the CALLOUT_RIGHT CLASS. Click the bold title below to copy the code. Don’t forget to include the period (.) before the class name. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Quisque sit amet leo felis, sed tincidunt libero. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; Aliquam porta placerat magna a aliquam.

CALLOUT_RIGHT Text Box : Click Here For The Code»

 

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Quisque sit amet leo felis, sed tincidunt libero. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; Aliquam porta placerat magna a aliquam. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Quisque sit amet leo felis, sed tincidunt libero. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; Aliquam porta placerat magna a aliquam.

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Quisque sit amet leo felis, sed tincidunt libero. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; Aliquam porta placerat magna a aliquam.

Title is created with H3 heading + INSET Class

This is the INSET CLASS. Note the difference between this box and the Callout boxes above. Click the bold title below to copy the code. Don’t forget to include the period (.) before the class name. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Quisque sit amet leo felis, sed tincidunt libero. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; Aliquam porta placerat magna a aliquam.

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Quisque sit amet leo felis, sed tincidunt libero. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; Aliquam porta placerat magna a aliquam.

INSET Text Box : Click Here For The Code»

 

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Quisque sit amet leo felis, sed tincidunt libero. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; Aliquam porta placerat magna a aliquam.

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Quisque sit amet leo felis, sed tincidunt libero. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; Aliquam porta placerat magna a aliquam.

 

Placing Your Quotations

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Quisque sit amet leo felis, sed tincidunt libero. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; Aliquam porta placerat magna a aliquam.

This is the xQUOTE CLASS. Click the bold title below to copy the code. Don’t forget to include the period (.) before the class name. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Quisque sit amet leo felis, sed tincidunt libero. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; Aliquam porta placerat magna a aliquam.

 

xQUOTE Text Box : Click Here For The Code»

 

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Quisque sit amet leo felis, sed tincidunt libero. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; Aliquam porta placerat magna a aliquam.

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Quisque sit amet leo felis, sed tincidunt libero. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; Aliquam porta placerat magna a aliquam.

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Quisque sit amet leo felis, sed tincidunt libero.

This is the xQUOTE_LEFT CLASS. Click the bold title below to copy the code. Don’t forget to include the period (.) before the class name. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Quisque sit amet leo felis, sed tincidunt libero. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; Aliquam porta placerat magna a aliquam.

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Quisque sit amet leo felis, sed tincidunt libero. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; Aliquam porta placerat magna a aliquam.

 

xQUOTE_LEFT Text Box : Click Here For The Code»

 

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Quisque sit amet leo felis, sed tincidunt libero. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; Aliquam porta placerat magna a aliquam.

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Quisque sit amet leo felis, sed tincidunt libero. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; Aliquam porta placerat magna a aliquam.

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Quisque sit amet leo felis, sed tincidunt libero.

This is the xQUOTE_RIGHT CLASS. Click the bold title below to copy the code. Don’t forget to include the period (.) before the class name. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Quisque sit amet leo felis, sed tincidunt libero. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; Aliquam porta placerat magna a aliquam.

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Quisque sit amet leo felis, sed tincidunt libero. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; Aliquam porta placerat magna a aliquam.

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Quisque sit amet leo felis, sed tincidunt libero. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; Aliquam porta placerat magna a aliquam.

xQUOTE_RIGHT Text Box : Click Here For The Code»

 

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Quisque sit amet leo felis, sed tincidunt libero. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; Aliquam porta placerat magna a aliquam.

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Quisque sit amet leo felis, sed tincidunt libero. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; Aliquam porta placerat magna a aliquam.

Dropcap Usually you would only use the first letter as the dropcap. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Quisque sit amet leo felis, sed tincidunt libero. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; Aliquam porta placerat magna a aliquam. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Quisque sit amet leo felis, sed tincidunt libero. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; Aliquam porta placerat magna a aliquam.

 

Above is the DROPCAP CLASS. Click the bold title below to copy the code. Don’t forget to include the period (.) before the class name. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Quisque sit amet leo felis, sed tincidunt libero. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; Aliquam porta placerat magna a aliquam.

How do you get the dropcap effect? Add a “class” to the SPAN designators.. Then, place the capital letter between SPAN designators. See the image below (click to enlarge).

 

DROPCAP Style : Click Here For The Code»

 

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Quisque sit amet leo felis, sed tincidunt libero. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; Aliquam porta placerat magna a aliquam.

 

 

Something Different and Fun: Text Changes Color When Selected

Are you quotable? Do people highlight and select what you’ve written? How do you know? That’s not a trick question! Whether you know or not, the idea here is to bring a little extra enjoyment to those who quote you, or copy+paste pieces of info from your website (hopefully to quote you later).

Here’s a nice “select text” enhancement from CSS-Tricks.1 You can set text to be highlighted in different colors when it is selected. For browsers that don’t support it, nothing is different. Try it yourself by selecting text in any of the three paragraphs below. Neat, eh? (If you’re using IE, you won’t see it! Go grab Firefox, Google Chrome, or Opera.)

 

Select this text. It becomes RED! Select this text. It becomes RED! Select this text. It becomes RED! Select this text. It becomes RED! Select this text. It becomes RED! Select this text. It becomes RED! Select this text. It becomes RED!

 

Select this text. It becomes blue! Select this text. It becomes blue! Select this text. It becomes blue! Select this text. It becomes blue! Select this text. It becomes blue! Select this text. It becomes blue! Select this text. It becomes blue! Select this text. It becomes blue! Select this text. It becomes blue! Select this text. It becomes blue!

 

Select this text. It becomes yellow! Select this text. It becomes yellow! Select this text. It becomes yellow! Select this text. It becomes yellow! Select this text. It becomes yellow! Select this text. It becomes yellow! Select this text. It becomes yellow! Select this text. It becomes yellow! Select this text. It becomes yellow! Select this text. It becomes yellow!

 

(If you’re using IE, you won’t see it! Go grab Firefox, Google Chrome, or Opera.)

 

How might this be useful? I’m sure you could find a use for it. But if not, it would be a pleasant surprise for someone selecting text on your site to copy to his notes or to quote you! (So long as the browser supports it.)

Here’s the code …

 

Change Selected Text Color : Click Here For The Code»

 

 

Bookmark this page or feel free to copy+paste these instructions somewhere. There are more articles in this series. Use the Table of Contents at the top to view what interests you.

 

In case you need it, the next section illustrates how to actually use the styles showcased here.

 



 

How To Use These Styles In Your Posts?

Once you have the code you need, and you have copied it into either your existing stylesheet or your MyCSS stylesheet, it is easy to use it while you are writing. You’ll have to get a little bit technical! All that really means is, while you are writing, switch over from the visual editor to the HTML editor (see the image below).

 


Now just add the “class” designator you want to use. For example, if you want to use the Warning Textbox, the corresponding style’s name is “warning”. Thus, the “class” name you’ll use is also “warning”. (It’s easier than it sounds.) See the image below for a better understanding. Click the image for a larger view.



Make sure you save (update) your changes, then switch back to your visual editor. Now when you view the page you were editing, you’ll see your new textbox in place. (If you don’t see your new box, just refresh the page using the F5 key.)

 

For your convenience, all the styles in this series are available to download.
Click below to grab the entire CSS stylesheet with these codes already included. Then copy+paste it to your current stylesheet or add it to your MyCSS stylesheet. Also get the icons, unzip them on your server, and change the CSS file to reflect the proper location.


CSS Styles for Textboxes
(ver. 1.0 / 3.35 kB)
CSS Text-Box Styles For Serious Writers is a collection of my favorites textboxes, sidebars, callouts, quotes for pretty-fying text in WordPress articles, reports, reviews, and blog posts. (This is the ZIPPed version.)

Plain text file: CSS Styles for Textboxes (Plain Text CSS File) (ver. 1.0 / 11.89 kB)


xTypo Icons for CSS Textbox Styles
(ver. current / 37.85 kB)
xTypo Icons to accompany the CSS Text-Box Styles For Serious Writers series. (ZIPPED)

 

 

Real-Life Examples

Want some real-life examples? You can see these various styles in action around this site. Clicking any link opens a pop-out window you can close when finishing viewing.

example of quote style    Textbox Example for the Warning Textbox   






Footnotes

  1. Thanks to Chris Coyier of CSS-Tricks, for the article Over-riding The Default Text Selection Color With CSS,” which shows how you can set text to be highlighted in different colors when it is selected. According to the article and comments: For browsers that don’t support it, nothing is different, meaning users see whatever they always see. Works in Firefox, Safari, and possibly Opera but doesn’t seem to work in Internet Explorer (surprise!).  [↩ go back]


Series Navigation«CSS Styles For Pretty-fying Text in Your WordPress BlogNext Article in Series»




Please Share by clicking favorite social network below:
  • Add to favorites
  • Twitter
  • Facebook
  • Digg
  • StumbleUpon
  • Print
  • PDF
  • Google Bookmarks
  • LinkedIn
  • Ping.fm
  • FriendFeed
  • del.icio.us

Post to Twitter Post to Digg Digg This Post Post to Facebook Post to Ping.fm Post to StumbleUpon

Copy the following code to your stylesheet
You can change the name from “callout” to whatever you prefer

## COPY CODE BELOW THIS LINE ##

.callout
{
border-bottom: 2px solid #CCC;
border-top: 2px solid #CCC;
color: #CCC;
font-size: 1.4em !important;
margin: 10px auto;
padding: 10px;
text-align: justify;
}

## COPY CODE ABOVE THIS LINE ##

Click the title again to close this box

Source: Where did I find this code?

Powered by Hackadelic Sliding Notes 1.6.4

Copy the following code to your stylesheet
You can change the name from “callout_left” to whatever you prefer

## COPY CODE BELOW THIS LINE ##

.callout_left
{
float: left;
width: 34%;
padding: 5px 1em 0px 0.9em;
margin: 8px; 14px; 8px; 0px;
border-bottom: 2px solid #CCC;
border-top: 2px solid #CCC;
color: #CCC;
font-size: 1.4em !important;
text-align: justify;
}

## COPY CODE ABOVE THIS LINE ##

Click the title again to close this box

Source: Where did I find this code?

Powered by Hackadelic Sliding Notes 1.6.4

Copy the following code to your stylesheet
You can change the name from “callout_right” to whatever you prefer

## COPY CODE BELOW THIS LINE ##

.callout_right
{
float: right;
width: 34%;
padding: 5px 1em 0px 0.9em;
margin: 8px; 0px; 8px; 14px;
border-bottom: 2px solid #CCC;
border-top: 2px solid #CCC;
color: #CCC;
font-size: 1.4em !important;
text-align: justify;
}

## COPY CODE ABOVE THIS LINE ##

Click the title again to close this box

Source: Where did I find this code?

Powered by Hackadelic Sliding Notes 1.6.4

Copy the following code to your stylesheet
You can change the name from “INSET” to whatever you prefer

## COPY CODE BELOW THIS LINE ##

.inset
{
float: right;
width: 200px;
border: 1px solid #ccc;
padding: 5px 1em 0px 0.9em;
margin: 0px 0px 5px 1em;
color: #888;
background-color: #eee;
clear: both;
}

.inset h3
{
font-size: 1.2em;
}

## COPY CODE ABOVE THIS LINE ##

Click the title again to close this box

Source: Where did I find this code?

Powered by Hackadelic Sliding Notes 1.6.4

Copy the following code to your stylesheet
You can change the name from “xquote” to whatever you prefer

## COPY CODE BELOW THIS LINE ##

.xquote
{
display: block;
margin-left: auto;
margin-right: auto;
width: 400px;
background: url(http://www.localbusinesscoachonline.com/_images/xtypo/icon/quote1.gif) top left no-repeat;
padding:10px 20px 10px 60px;
border-top: none;
border-bottom: none;
background: url(http://www.localbusinesscoachonline.com/_images/xtypo/icon/quote2.gif) bottom right no-repeat;
padding:10px 30px 15px 0px;
font-size:120%;
line-height:130%;
color:#999999;
font-family: Georgia, “Times New Roman”, Times, serif;
font-style:italic;
}

## COPY CODE ABOVE THIS LINE ##

Click the title again to close this box

Source: Where did I find this code?

Powered by Hackadelic Sliding Notes 1.6.4

Copy the following code to your stylesheet
You can change the name from “xquote_left” to whatever you prefer

## COPY CODE BELOW THIS LINE ##

.xquote_left

{
float:left;
width: 200px;
margin: 15px 10px;
background:#FFFFFF url(http://www.localbusinesscoachonline.com/_images/xtypo/icon/quote1.gif) top left no-repeat;
padding:10px 20px 10px 60px;
border-top: 2px dotted #cccccc;
border-bottom: 2px dotted #cccccc;
background: url(http://www.localbusinesscoachonline.com/_images/xtypo/icon/quote2.gif) bottom right no-repeat;
padding:10px 30px 15px 0px;
font-weight:normal;
font-size:120%;
line-height:120%;
color:#222;
font-family: Georgia, “Times New Roman”, Times, serif;
font-style:italic;
}

## COPY CODE ABOVE THIS LINE ##

Click the title again to close this box

Source: Where did I find this code?

Powered by Hackadelic Sliding Notes 1.6.4

Copy the following code to your stylesheet
You can change the name from “xquote_right” to whatever you prefer

## COPY CODE BELOW THIS LINE ##

.xquote_right {
float:right;
width: 200px;
margin: 15px 10px;
background:#FFFFFF url(http://www.localbusinesscoachonline.com/_images/xtypo/icon/quote1.gif) top left no-repeat;
padding:10px 20px 10px 60px;
border-top: 2px dotted #cccccc;
border-bottom: 2px dotted #cccccc;
background: url(http://www.localbusinesscoachonline.com/_images/xtypo/icon/quote2.gif) bottom right no-repeat;
padding:10px 30px 15px 0px;font-size:110%;
font-weight:normal;
font-size:120%;
line-height:120%;
color:#222;
font-family: Georgia, “Times New Roman”, Times, serif;
font-style:italic;
}

## COPY CODE ABOVE THIS LINE ##

Click the title again to close this box

Source: Where did I find this code?

Powered by Hackadelic Sliding Notes 1.6.4

Copy the following code to your stylesheet
You can change the name from “dropcap” whatever you prefer

## COPY CODE BELOW THIS LINE ##

.dropcap{
float: left;
text-transform:uppercase;
line-height:80%;
padding:0px 8px 4px 0px;
display: block;
color:#333333;
font-size: 70px;
font-family: Georgia, Times New Roman, Trebuchet MS;
}

## COPY CODE ABOVE THIS LINE ##

Click the title again to close this box

Source: Where did I find this code?

Powered by Hackadelic Sliding Notes 1.6.4

Copy the following code to your stylesheet
You can change the colors from “red, blue, yellow” to whatever you prefer. Just find the corresponding HEX code.

## COPY CODE BELOW THIS LINE ##

p.red::selection {
background: #ffb7b7;
}
p.red::-moz-selection {
background: #ffb7b7;
}
p.blue::selection {
background: #a8d1ff;
}
p.blue::-moz-selection {
background: #a8d1ff;
}
p.yellow::selection {
background: #fff2a8;
}
p.yellow::-moz-selection {
background: #fff2a8;
}

## COPY CODE ABOVE THIS LINE ##

Click the title again to close this box

Source: Where did I find this code? See the footnotes.

Powered by Hackadelic Sliding Notes 1.6.4


You Might Also Be Interested In . . .

  1. CSS Styles Achieved With The Special Text Boxes WordPress Plugin The very first time I saw beautiful colored textboxes created with just CSS was while I perusing a Joomla! site....
  2. CSS Styles For Pretty-fying Text in Your WordPress Blog When presenting information online, you often want to do more with it than just italicize some text, or make a...
  3. CSS Styles From The Guangzhou Theme You rarely find the CSS code to create eye-catching text boxes included in the stylesheet that comes with your theme...
  4. CSS Styles Inspired By The YAML Framework I first learned how to create simple colored borders around textboxes using nothing but CSS while I was studying the...

Pages: 1 2

5 Comments Post a comment
  1. Guest
    Aug 31 2010

    Great synopsis of commenting and how to very well written and all that link love you just poured out, great post, if this was a forum you would have a sticky on this.

    Reply

Trackbacks & Pingbacks

  1. CSS Styles Inspired By The YAML Framework | CoachNotes
  2. CSS Styles From The Guangzhou Theme | CoachNotes
  3. CSS Styles Achieved With The Special Text Boxes WordPress Plugin | CoachNotes

Share your thoughts, post a comment.

(required)
(required)

Note: HTML is allowed. Your email address will never be published.

Subscribe to comments

CommentLuv Enabled

This site uses KeywordLuv. Enter YourName@YourKeywords in the Name field to take advantage.