<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>BlogPiG.com - Free AutoBlog Plugins &#187; close blockquotes</title>
	<atom:link href="http://blogpig.com/tag/close-blockquotes/feed/" rel="self" type="application/rss+xml" />
	<link>http://blogpig.com</link>
	<description>Free Passive Income Generation &#38; AutoBlog Tools</description>
	<lastBuildDate>Fri, 17 Feb 2012 17:05:08 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3-RC1</generator>
		<item>
		<title>How To Close WordPress Blockquotes</title>
		<link>http://blogpig.com/news/how-to-close-wordpress-blockquotes/</link>
		<comments>http://blogpig.com/news/how-to-close-wordpress-blockquotes/#comments</comments>
		<pubDate>Tue, 03 Nov 2009 12:59:49 +0000</pubDate>
		<dc:creator>Gary</dc:creator>
				<category><![CDATA[News]]></category>
		<category><![CDATA[blockquote]]></category>
		<category><![CDATA[blockquotes]]></category>
		<category><![CDATA[close blockquotes]]></category>
		<category><![CDATA[close quote]]></category>
		<category><![CDATA[How To]]></category>
		<category><![CDATA[wordpress]]></category>

		<guid isPermaLink="false">http://blogpig.com/?p=794</guid>
		<description><![CDATA[This is little off the beaten track from my normal posts so gloss over this one if it&#8217;s not really relevant to you. I&#8217;m posting this because I&#8217;ve made a new commitment to give a bit more back to the &#8216;web&#8217; in general, basically if I find some information or a technique I use in ...]]></description>
			<content:encoded><![CDATA[<p><img style=' float: right; padding: 4px; margin: 0 0 2px 7px;'  class="alignright size-full wp-image-795" title="Close WordPress  blockquotes" src="http://blogpig.com/images/close-quote.png" alt="Close WordPress  blockquotes" width="150" height="150" />This is little off the beaten track from my normal posts so gloss over this one if it&#8217;s not really relevant to you.</p>
<p>I&#8217;m posting this because I&#8217;ve made a new commitment to give a bit more back to the &#8216;web&#8217; in general, basically if I find some information or a technique I use in my business or here on BlogPiG.com I&#8217;ll post about it for others to find.</p>
<p>As it happens this is a technique I actually put together myself :)</p>
<h2>The Problem</h2>
<p>Most WordPress templates use a quote background image to enclose the blockquote content. The problem is that you CSS only allows one background image per element so you can only have an open quote image. I always thought this looked a little odd as you should really close the quotes too.</p>
<p>I found a couple of proposed solutions out on the web, the most interesting involved enclosing the the contents of the blockquote inside an additional DIV and styling that with another background image containing a close quote positioned to the bottom right.</p>
<p>This would indeed work but having to remember to add the additional DIV inside WordPress blockquotes would be a pain and it means you&#8217;d have to leave the WYSIWYG editor and switch to the HTML editor, an issue for some people perhaps.</p>
<p>In short it wasn&#8217;t elegant enough&#8230;</p>
<h2>The Solution</h2>
<p>I finally realised that WP already enclosed the contents of the blockquote inside another element, namely a paragraph &#8216;p&#8217; tag. With this knowledge I could simply style the &#8216;blockquote p&#8217; CSS to contain the close quote mark image and position it using margin and padding. Et voila!</p>
<blockquote><p>WordPress blockquotes with a neat close tag automatically added each time I use them.</p>
</blockquote>
<p>I centre my block and the text inside the paragraph but you should be able to style it exactly as you need with a bit of tweaking.</p>
<h2>The CSS</h2>
<pre class="brush: css; title: ; notranslate">
/* Start blockquote */
blockquote p
{
width:100%;
color:#E6751F;
font-family:&quot;Helvetica Neue&quot;, Helvetica, Arial, Sans-Serif;
font-size: 16px;
font-style: normal;
font-weight: bold;
background-image:url('images/ClosePostQuote.png');
background-position:right bottom;
background-repeat:no-repeat;
text-align:center;
margin:0px 0px 0px 0px;
padding:0px 30px 15px 0px;
}

blockquote
{
width:75%;
margin-left:auto;
margin-right:auto;
padding:20px 0px 0px 35px;
background-image:url('images/PostQuote.png');
background-position:left top;
background-repeat:no-repeat;
position:relative;
left:-15px;
}
/* Finish blockquote */
</pre>
<h2>Some Notes</h2>
<p>I had to include the 0px margin in the p style or it doesn&#8217;t work, I have no idea why this is.</p>
<p>Add a contrasting background colour to both your &#8216;blockquote&#8217; and &#8216;blockquote p&#8217; styles temporarily whilst you adjust your padding. It makes it much easier to see what is going on.</p>
<p>If you&#8217;re centering the blockquote using margin left/right auto then don&#8217;t forget to offset it&#8217;s postion by the same amount as you right pad the paragraph. In my case the paragraph was right padded 15px so I positioned the block with a relative left -15px. This seems to maintain the centering nicely</p>
<blockquote><p>I&#8217;ve checked this using Firefox, Chrome &amp; IE browsers and all seems well. I&#8217;ve also tried it with lengthy multi-line quotes as well as single line and that appears to work without problems too (i.e this quote)</p>
</blockquote>
<p>Please leave feedback in the comments if you use it successfully or improve it or maybe find it just doesn&#8217;t work for you.</p>
<p>Tags:  <a href="http://blogpig.com/tag/wordpress/"   rel='tag'>wordpress</a>, <a href="http://blogpig.com/tag/blockquote/"   rel='tag'>blockquote</a>, <a href="http://blogpig.com/tag/close-blockquotes/"   rel='tag'>close blockquotes</a>, <a href="http://blogpig.com/tag/how-to/"   rel='tag'>How To</a>, <a href="http://blogpig.com/tag/blockquotes/"   rel='tag'>blockquotes</a>, <a href="http://blogpig.com/tag/close-quote/"   rel='tag'>close quote</a> <BR/></p>
]]></content:encoded>
			<wfw:commentRss>http://blogpig.com/news/how-to-close-wordpress-blockquotes/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
	</channel>
</rss>

