Cotton Rohrscheib

The Cotton Club Blog & Podcast

  • Home
  • Bio
    • Resume
  • Blog
    • Faith & Family
    • Marketing & Tech
    • Farm & Business
    • Entertainment
    • Health & Wellness
    • Urban Farming
    • Weekend Projects
  • Media
    • Newsletter
    • Photo Galleries
    • Instagram Feed
    • Video Archives
    • Podcasts
    • Music Playlists
  • Books
  • Connect
    • Rohrscheib Capital
    • Disclaimer
    • Privacy Policy
You are here: Home / Marketing & Tech / Adding Color Content Boxes via CSS

Adding Color Content Boxes via CSS

September 26, 2012 by Cotton Rohrscheib Leave a Comment

When it comes to my/our industry, one of the coolest things to me has always been that you can usually sit down and find tutorials online to build or do just about anything you can imagine, and these tools are usually shared openly by other developers.

A prime example of this was last week when I shared one of Brian Gardner’s posts from Studiopress on how to add some CSS3 buttons to a website project w/ just a few lines of code. I ran into another post this evening from the same folks at Studiopress about adding color content boxes to a site by adding some additional lines to your CSS. This can come into handy on a wide variety of projects so I figured I would again reshare some of their amazing content here for those of you that subscribe to my feed, and honestly so I can easily locate it when I want to drop it in somewhere as well…

To get started, you just need to open up your wordpress theme and find your style.css file, this is where you will want to add the following lines of code:

/* Content Boxes
------------------------------------------------------------ */

.content-box-blue,
.content-box-gray,
.content-box-green,
.content-box-purple,
.content-box-red,
.content-box-yellow {
    margin: 0 0 25px;
    overflow: hidden;
    padding: 20px;
}

.content-box-blue {
    background-color: #d8ecf7;
    border: 1px solid #afcde3;
}

.content-box-gray {
    background-color: #e2e2e2;
    border: 1px solid #bdbdbd;
}

.content-box-green {
    background-color: #d9edc2;
    border: 1px solid #b2ce96;
}

.content-box-purple {
    background-color: #e2e2f9;
    border: 1px solid #bebde9;
}

.content-box-red {
    background-color: #f9dbdb;
    border: 1px solid #e9b3b3;
}

.content-box-yellow {
    background-color: #fef5c4;
    border: 1px solid #fadf98;
}

Next, just add this line of code into your page or post (in html mode) and voila… colored boxes.

<div class="content-box-blue">Enter content box text here.</div>

 

Enter content box text here.

Share this post on:

  • Click to share on Facebook (Opens in new window) Facebook
  • Click to share on X (Opens in new window) X
  • Click to share on LinkedIn (Opens in new window) LinkedIn
  • Click to share on Pinterest (Opens in new window) Pinterest

Related

About Cotton Rohrscheib

The Cotton Club is a monthly podcast hosted by me, Cotton Rohrscheib. I'm a 52 year old entrepreneur w/ ADHD, OCD (and now AARP) that refuses to grow up as I grow old. I have collaborated and invested in hundreds of projects throughout my career in multiple industries such as; technology, healthcare, and agriculture. I also have 25 years experience in the marketing industry as a co-founder of an award-winning advertising agency. I will undoubtedly cover a wide variety of topics on my podcast while sharing some really crazy stories and situations that I've been fortunate to witness firsthand. I also have a book coming out in 2025 titled, "Mistakes were Made"

Please Drop Your Questions or CommentsCancel reply

Let’s Connect

  • Email
  • Facebook
  • Instagram
  • LinkedIn
  • Twitter

Recent Updates

  • EP:032 – Cotton Rohrscheib & Diana DeHart
  • Challenges & Opportunities Going into 2025
  • Find us at the 2025 Arkansas Women in Agriculture Conference in Hot Springs, Arkansas
  • Be Sure to Checkout FBN’s Farmers First™  Crop Nutrition & Adjuvant Lineup for 2025
  • What we all need in Dark Times…

Blog Categories

  • Blog (419)
  • Entertainment (376)
  • Faith & Family (147)
  • Farm & Business (288)
  • Health & Wellness (33)
  • Marketing & Tech (584)
  • Podcasts (31)
  • Urban Farming (20)
  • Weekend Projects (1)

Listen & Subscribe

Blog Archives

Join the Cotton Club!

 

Content Copyright: 2001-2025
Cotton Rohrscheib | Rohrscheib Capital

 

Loading Comments...
 

You must be logged in to post a comment.