Since a lot of my posts have sections of commands or code in, I wanted an easy means of highlighting a block of text within a post without using the quote block which I want to reserve for actual quotes. I found Stephen Cronin’s post which seems to do what I want with a simple css edit. I’m using his settings for now while I play about with it a bit.
You simply find the .css file for your theme or style (I’m using the K2 theme so my .css is NOT the K2 style.css but the .css file in the styles/amindlost sub-directory of the K2 theme) and add the following entry to the bottom:
.textbox {padding: 2px 6px 4px 6px; color: #555555; background-color: #eeeeee; border: #dddddd 2px solid}
When you want to highlight a block simply type the text in, go to the HTML design tab instead of the Visual design tab and put <p class=”textbox”> in front and </p> at the end.
0 Responses to “WordPress: Highlighting Sections In Posts”
Leave a Reply