Visual interest - Pullquotes...a pure CSS approach
It looks like others are noticing pullquotes,offset quoting box or call out boxes. I'm an advocate of a blog being a bit different from every other blog out there. A good design makes a statement. It will draw your visitors interest, and they will spend more time on your blog...reading your great content. A pullquote is just another way to add design to your blog.
There was a post over at Freshblog with another interesting hack for pullquotes. In reading that post, I followed a link to Aditya's Thought That Counts and found an amazingly simple CSS approach. The look is a little different in different browsers. In Firefox the corners are rounded. In IE the corners are square. I don't know how it appears in any other browsers.
To use this method, there are two steps involved.
1. Add this code to your template between the <style> tags:
.offset {2. Add this code in the post itself:
float:left;
margin:7px;
background-color:#7C81A1;
color:white;
padding:10px;
width:100px;
-moz-border-radius:10px;}
.offset em{color:yellow;font-style:normal;display:block;font-weight:bold}
.offset span:before, .offset span:after{content: '"'}
.left {float:left;margin-left:0px !important}
.right {float:right;margin-right:0px !important}
<div class="offset right"><em>Pullquote Title</em><span> Your most clever and witty quote.</span></div>The best part is you can tinker with this code until it fits in the design of your blog. You can change the background color,text color, title color, font weight and position of pullquote. Thanks to Aditya for this CSS pullquote!
If you are interested in seeing another method, check out this post...Visual Interest - Pullquotes.
9 Comments:
Hey Annie, added your button to my site and I do have one question for you- you'd mention how to centre my blog picture in IE, but I'd like to know how to get my picture aligned with the text in firefox. Just wondering if you could help me out with that.
Thanks for the link! I'll look your template and see what I can do about the header.
peace...
annie
I used GIMP and changed your header image. It was not centered. There was a lot of white space to the right of the image. I'm sending the revised image to you.
peace...
annie
u do have a very good site, annie, although i'm not using gimp, your tutorial is very clear...
keep on your good work
Thanks, Milo. I'm glad you like my site.
peace...
annie
just noticed that i have used this pull quote code instead of the one in your other post. I tried my best to change the width in individual posts with no success or do you have different suggestions for this code?
@rohit, (I posted this on the other post, but didn't know if you would see it.) Sorry. I misunderstood. I'm not quite sure about this. I don't even know if you can do it. I would try adding width: XXXpx; to this and see if it overrides the CSS (you may have to remove width: 145px; from the CSS style sheet also):
<span style="font-size:large;width: XXXpx">
Or...try adding a percentage instead of px: width: 35%; (or whatever width you want.)
I will have to play with it when I get a chance and see if any of these ideas work.
This is a great inspiring article. Your tips are extremely valuable. Looking forward to reading your next post.
an interesting thought - now that i think of it, most sites and blogs look quite similar and standardized. your's doesn't and i like it!