<?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>Maverick Web Creations &#187; Cascading Style Sheets</title>
	<atom:link href="http://www.maverickwebcreations.com/tag/cascading-style-sheets/feed" rel="self" type="application/rss+xml" />
	<link>http://www.maverickwebcreations.com</link>
	<description></description>
	<lastBuildDate>Fri, 03 Feb 2012 05:37:11 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<xhtml:meta xmlns:xhtml="http://www.w3.org/1999/xhtml" name="robots" content="noindex" />
		<item>
		<title>How to Customize the Google Friend Connect WordPress Plugin&#8217;s CSS &amp; Make It XHTML Compliant</title>
		<link>http://www.maverickwebcreations.com/2009/03/18/how-to-customize-the-google-friend-connect-wordpress-plugins-css-make-it-xhtml-compliant.html</link>
		<comments>http://www.maverickwebcreations.com/2009/03/18/how-to-customize-the-google-friend-connect-wordpress-plugins-css-make-it-xhtml-compliant.html#comments</comments>
		<pubDate>Wed, 18 Mar 2009 13:57:40 +0000</pubDate>
		<dc:creator>admin_mwc</dc:creator>
				<category><![CDATA[Wordpress Help]]></category>
		<category><![CDATA[Cascading Style Sheets]]></category>
		<category><![CDATA[Friend Connect]]></category>
		<category><![CDATA[Google]]></category>
		<category><![CDATA[WordPress]]></category>
		<category><![CDATA[XHTML]]></category>
		<guid isPermaLink="false">http://www.maverickwebcreations.com/?p=574</guid>
		<description><![CDATA[<p>This is a follow up to my previous post on <a href="http://www.maverickwebcreations.com/2009/03/17/how-to-install-the-google-friend-connect-wordpress-plugin.html">how to install the Google Friend Connect WordPress plugin</a>. This plugin by Google is really rough on the edges and it requires some tweaks for people concerned with the XHTML code and CSS design.</p>
<p><strong>Fixing the Google Friend Connect </strong>&#8230; <a href="http://www.maverickwebcreations.com/2009/03/18/how-to-customize-the-google-friend-connect-wordpress-plugins-css-make-it-xhtml-compliant.html" class="read_more">Read more...</a></p>]]></description>
			<content:encoded><![CDATA[<p><img src="http://www.maverickwebcreations.com/wp-content/uploads/2009/03/google_friend_connect_diagram-299x300.gif" alt="How to Customize the Google Friend Connect WordPress Plugins CSS & Make It XHTML Compliant" title="Google Friend Connect" width="299" height="300" class="alignright size-medium wp-image-577" />This is a follow up to my previous post on <a href="http://www.maverickwebcreations.com/2009/03/17/how-to-install-the-google-friend-connect-wordpress-plugin.html">how to install the Google Friend Connect WordPress plugin</a>. This plugin by Google is really rough on the edges and it requires some tweaks for people concerned with the XHTML code and CSS design.</p>
<p><strong>Fixing the Google Friend Connect WordPress Plugin&#8217;s XHTML Errors</strong></p>
<p>The Google Friend Connect WordPress Plugin has a few XHTML errors.</p>
<ul>
<li>It uses the &lt;br&gt; tag, which has been depreciated and the &lt;br /&gt; tag should be used instead.</li>
<li>It uses the &lt;b&gt; tag, which is depreciated and the &lt;strong&gt; tag should be used instead.</li>
<li>There is an unnecessary &lt;br&gt; tag in the fc_wp_comment_form() function. This may cause your comment form to look weird.</li>
<li>1 of the img tags does not have the closing />.
</ul>
<p>To fix these errors, you need to make the following changes.</p>
<p>Original code:</p>
<pre class="brush: php; title: ; notranslate">
'&lt;img align=&quot;left&quot; src=&quot;' +  viewer.getField(&quot;thumbnailUrl&quot;) + '&quot;&gt;' +
'&lt;b&gt;Hello ' +  viewer.getField(&quot;displayName&quot;) + '!&lt;/b&gt;&lt;br&gt;' +
'&lt;a href=&quot;#&quot; onclick=&quot;google.friendconnect.requestSettings()&quot;&gt;Settings&lt;/a&gt;&lt;br&gt;' +
'&lt;a href=&quot;#&quot; onclick=&quot;google.friendconnect.requestInvite()&quot;&gt;Invite&lt;/a&gt;&lt;br&gt;' +
'&lt;div id=&quot;loadprof&quot;&gt;&lt;/div&gt;';
</pre>
<pre class="brush: php; title: ; notranslate">
// The fc_wp_comment_form function
// This just creates a div tag that will be replaced by the javascript code
// when the page gets loaded
function fc_wp_comment_form() {
 ?&gt;
   &lt;br&gt;
   &lt;div id=&quot;profile&quot;&gt;
   &lt;/div&gt;
 &lt;?
}
</pre>
<p>Edited code:</p>
<pre class="brush: php; title: ; notranslate">
'&lt;img align=&quot;left&quot; src=&quot;' +  viewer.getField(&quot;thumbnailUrl&quot;) + '&quot; /&gt;' +
'&lt;strong&gt;Hello ' +  viewer.getField(&quot;displayName&quot;) + '!&lt;/strong&gt;&lt;br /&gt;' +
'&lt;a href=&quot;#&quot; onclick=&quot;google.friendconnect.requestSettings()&quot;&gt;Settings&lt;/a&gt;&lt;br /&gt;' +
'&lt;a href=&quot;#&quot; onclick=&quot;google.friendconnect.requestInvite()&quot;&gt;Invite&lt;/a&gt;&lt;br /&gt;' +
'&lt;div id=&quot;loadprof&quot;&gt;&lt;/div&gt;';
</pre>
<pre class="brush: php; title: ; notranslate">
// The fc_wp_comment_form function
// This just creates a div tag that will be replaced by the javascript code
// when the page gets loaded
function fc_wp_comment_form() {
 ?&gt;
   &lt;div id=&quot;profile&quot;&gt;
   &lt;/div&gt;
 &lt;?
}
</pre>
<ol>
<li>Replace all &lt;br&gt; tags with &lt;br /&gt;.</li>
<li>Replace all  &lt;b&gt; tags with &lt;strong&gt;.</li>
<li>Remove the  &lt;br&gt; tag in the fc_wp_comment_form() function on line 49.</li>
<li>Add a back slash to the &lt;img&gt; tag on line 150.</li>
</ol>
<p><strong>Editing the CSS of Google Friend Connect WordPress Plugin&#8217;s Sign In Box</strong></p>
<p>Original code:</p>
<pre class="brush: css; title: ; notranslate">
#profile {
font-size:13px;
margin: 20px 40px;
border: 1px solid blue;
padding: 15px;
background-color: #E5ECF9;
}
</pre>
<p>Edited code:</p>
<pre class="brush: css; title: ; notranslate">
#profile {
font-size:12px;
margin: 0px;
padding: 0px;
}
</pre>
<p>This really depends on how you want the sign in box to look like. I hate the blue border and how it was aligned to the centre of the page. So I removed the border and margin/padding space.</p>
<p>You might also encounter CSS problems with the code below:</p>
<p>Original code:</p>
<pre class="brush: css; title: ; notranslate">
&lt;style type=&quot;text/css&quot;&gt;
body {font-family: Arial, Helvetica, sans-serif; font-weight:normal;}
h2 {color: #3366CC; font-size: 18px; font-weight: normal}
h3 {font-size: 13px; font-weight: normal}
h4 {color: grey; font-size: 11px; font-weight: normal}
</pre>
<p>Google adds this code to your WordPress site whether you like it or not. This to me, is very sloppy coding from Google. They could have added classes instead of forcing all h2, h3, h4 tags to look the way they want it to. Lucky for me, I use CSS classes to control how my h2, h3 and h4 tags so I am not affected by this code. However, if you use a general h2, h3, h4 without any classes or IDs, then good luck!</p>
<p>Edited code:</p>
<pre class="brush: css; title: ; notranslate">
&lt;style type=&quot;text/css&quot;&gt;
body {font-family: Arial, Helvetica, sans-serif; font-weight:normal;}
h2 {color: #3366CC; font-size: 18px; font-weight: normal}
h3 {font-size: 13px; font-weight: normal}
h4 {color: grey; font-size: 11px; font-weight: normal}
</pre>
<p>I found that it was okay for me to remove the body code and it did not affect the sign in box.</p>
<p>Hopefully we will see some improvements to Google&#8217;s plugin in the future. It is still rather buggy at the moment.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.maverickwebcreations.com/2009/03/18/how-to-customize-the-google-friend-connect-wordpress-plugins-css-make-it-xhtml-compliant.html/feed</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>How to Add Tabber to Your WordPress Theme</title>
		<link>http://www.maverickwebcreations.com/2008/10/31/how-to-add-tabber-to-your-wordpress-theme.html</link>
		<comments>http://www.maverickwebcreations.com/2008/10/31/how-to-add-tabber-to-your-wordpress-theme.html#comments</comments>
		<pubDate>Fri, 31 Oct 2008 00:00:51 +0000</pubDate>
		<dc:creator>admin_mwc</dc:creator>
				<category><![CDATA[Wordpress Help]]></category>
		<category><![CDATA[Cascading Style Sheets]]></category>
		<category><![CDATA[HTML]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[mootabs]]></category>
		<category><![CDATA[Web design]]></category>
		<category><![CDATA[WordPress]]></category>
		<guid isPermaLink="false">http://www.maverickwebcreations.com/?p=376</guid>
		<description><![CDATA[<p>This post is quite similar to my previous post on <a href="http://www.maverickwebcreations.com/2008/10/20/how-to-add-mootabs-to-your-wordpress-theme.html">how to add MooTabs to WordPress</a>. I recently tested Tabber on my <a href="http://www.vincentrich.com">internet marketing blog</a> and I find that it is better than MooTabs because it is compact in file size, easier to install and customize.</p>
<p>The default Tabber &#8230; <a href="http://www.maverickwebcreations.com/2008/10/31/how-to-add-tabber-to-your-wordpress-theme.html" class="read_more">Read more...</a></p>]]></description>
			<content:encoded><![CDATA[<p>This post is quite similar to my previous post on <a href="http://www.maverickwebcreations.com/2008/10/20/how-to-add-mootabs-to-your-wordpress-theme.html">how to add MooTabs to WordPress</a>. I recently tested Tabber on my <a href="http://www.vincentrich.com">internet marketing blog</a> and I find that it is better than MooTabs because it is compact in file size, easier to install and customize.</p>
<p>The default Tabber look and feel is acceptable. I did not need to make a lot of changes to make it look good on my web site. Compared to MooTabs, Tabber requires a lot less work to customize.</p>
<p><strong>Step 1: Download Tabber</strong></p>
<p>Go to Tabber&#8217;s web site and <a href="http://www.barelyfitz.com/projects/tabber/">download the latest version of Tabber</a>.</p>
<p><strong>Step 2: Upload Tabber to Your WordPress Theme’s Folder</strong></p>
<p>I like to store my Javascript files in a folder called “js”. For my CSS files, I like to store them in a folder called “css”. Let’s assume my template folder is called “cooltemplate”, you should upload the Tabber files in the following manner:</p>
<p>1. /wp-content/themes/cooltemplate/css &#8211; Upload example.css here. Alternatively, copy and paste all the contents of example.css into your theme&#8217;s style.css.<br />
2. /wp-content/themes/cooltemplate/js &#8211; Upload tabber.js here.</p>
<p><strong>Step 3: Add Tabber References to Your WordPress Theme’s header.php</strong></p>
<p>Add the following code to your theme&#8217;s header.php file in between the head tags.</p>
<pre class="brush: xml; title: ; notranslate">
&lt;script type=&quot;text/javascript&quot; src=&quot;%3C?php%20echo%20bloginfo%28%27template_directory%27%29;%20?%3E/js/tabber.js&quot;&gt;&lt;/script&gt;
&lt;script type=&quot;text/javascript&quot;&gt;document.write('&lt;style type=&quot;text/css&quot;&gt;.tabber { display: none; }&lt;\/style&gt;');&lt;/script&gt;
</pre>
<p>If you only display Tabber on the blog pages, do this to prevent the loading of the Tabber files on non-blog pages.</p>
<pre class="brush: php; title: ; notranslate">
&lt;script type=&quot;text/javascript&quot; src=&quot;%3C?php%20echo%20bloginfo%28%27template_directory%27%29;%20?%3E/js/tabber.js&quot;&gt;&lt;/script&gt;
&lt;script type=&quot;text/javascript&quot;&gt;document.write('&lt;style type=&quot;text/css&quot;&gt;.tabber { display: none; }&lt;\/style&gt;');&lt;/script&gt;
</pre>
<p><strong>Step 4: Add Tabber Code into Your WordPress Theme’s sidebar.php</strong></p>
<pre class="brush: xml; title: ; notranslate">
&lt;div class=&quot;tabber&quot;&gt;
     &lt;div class=&quot;tabbertab&quot;&gt;
	  &lt;h2&gt;Tab 1&lt;/h2&gt;
	  &lt;p&gt;Tab 1 content.&lt;/p&gt;
     &lt;/div&gt;
     &lt;div class=&quot;tabbertab&quot;&gt;
	  &lt;h2&gt;Tab 2&lt;/h2&gt;
	  &lt;p&gt;Tab 2 content.&lt;/p&gt;
     &lt;/div&gt;
     &lt;div class=&quot;tabbertab&quot;&gt;
	  &lt;h2&gt;Tab 3&lt;/h2&gt;
	  &lt;p&gt;Tab 3 content.&lt;/p&gt;
     &lt;/div&gt;
&lt;/div&gt;
</pre>
<p>This is the default code of the Tabber. The text between the h2 tags will be displayed as the titles of each tab. You don&#8217;t have to display the content of each tab in the between the p tags. I did it with the HTML list tags.</p>
<pre class="brush: php; title: ; notranslate">
&lt;div class=&quot;tabber&quot;&gt;
	&lt;div class=&quot;tabbertab&quot;&gt;
		&lt;h2&gt;Recent&lt;/h2&gt;
	&lt;/div&gt;
	&lt;div class=&quot;tabbertab&quot;&gt;
		&lt;h2&gt;Popular&lt;/h2&gt;
	&lt;/div&gt;
	&lt;div class=&quot;tabbertab&quot;&gt;
		&lt;h2&gt;Most Commented&lt;/h2&gt;
		&lt;ul&gt;&lt;/ul&gt;
	&lt;/div&gt;
&lt;/div&gt;
</pre>
<p>The Tabber is a great place to insert all the comments and post lists. I personally use it to display the <a href="http://rmarsh.com/plugins/recent-posts/">recent posts</a>, <a href="http://rmarsh.com/plugins/popular-posts-plugin/">popular posts</a>, most commented posts, recent comments and <a href="http://rmarsh.com/plugins/recent-comments/">top commenters</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.maverickwebcreations.com/2008/10/31/how-to-add-tabber-to-your-wordpress-theme.html/feed</wfw:commentRss>
		<slash:comments>17</slash:comments>
		</item>
		<item>
		<title>WordPress CSS</title>
		<link>http://www.maverickwebcreations.com/2008/09/10/wordpress-css.html</link>
		<comments>http://www.maverickwebcreations.com/2008/09/10/wordpress-css.html#comments</comments>
		<pubDate>Wed, 10 Sep 2008 02:56:45 +0000</pubDate>
		<dc:creator>admin_mwc</dc:creator>
				<category><![CDATA[Wordpress Help]]></category>
		<category><![CDATA[Cascading Style Sheets]]></category>
		<category><![CDATA[CSS]]></category>
		<category><![CDATA[css alignment]]></category>
		<category><![CDATA[Style sheet]]></category>
		<category><![CDATA[Templates]]></category>
		<category><![CDATA[Themes]]></category>
		<category><![CDATA[WordPress]]></category>
		<category><![CDATA[wordpress alignment]]></category>
		<guid isPermaLink="false">http://www.maverickwebcreations.com/?p=115</guid>
		<description><![CDATA[<p>I was wrong about the WordPress CSS stuff being hidden. I actually found the <a href="http://codex.wordpress.org/CSS">official WordPress documentation</a> on the <a href="http://www.maverickwebcreations.com/blog/wordpress-help">WordPress picture alignment</a>.</p>
<p>Apart from the code I mention, WordPress recommends adding this to your style.css too:&#8230; <a href="http://www.maverickwebcreations.com/2008/09/10/wordpress-css.html" class="read_more">Read more...</a></p>]]></description>
			<content:encoded><![CDATA[<p>I was wrong about the WordPress CSS stuff being hidden. I actually found the <a href="http://codex.wordpress.org/CSS">official WordPress documentation</a> on the <a href="http://www.maverickwebcreations.com/blog/wordpress-help">WordPress picture alignment</a>.</p>
<p>Apart from the code I mention, WordPress recommends adding this to your style.css too:</p>
<pre class="brush: css; title: ; notranslate">
.wp-caption {
border: 1px solid #ddd;
text-align: center;
background-color: #f3f3f3;
padding-top: 4px;
margin: 10px;
/* optional rounded corners for browsers that support it */
-moz-border-radius: 3px;
-khtml-border-radius: 3px;
-webkit-border-radius: 3px;
border-radius: 3px;
}
.wp-caption img {
margin: 0;
padding: 0;
border: 0 none;
}
.wp-caption p.wp-caption-text {
font-size: 11px;
line-height: 17px;
padding: 0 4px 5px;
margin: 0;
}
</pre>
]]></content:encoded>
			<wfw:commentRss>http://www.maverickwebcreations.com/2008/09/10/wordpress-css.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>WordPress Picture Alignment Secrets</title>
		<link>http://www.maverickwebcreations.com/2008/08/14/wordpress-picture-alignment-secrets.html</link>
		<comments>http://www.maverickwebcreations.com/2008/08/14/wordpress-picture-alignment-secrets.html#comments</comments>
		<pubDate>Thu, 14 Aug 2008 14:51:06 +0000</pubDate>
		<dc:creator>admin_mwc</dc:creator>
				<category><![CDATA[Web Development]]></category>
		<category><![CDATA[Wordpress Help]]></category>
		<category><![CDATA[Cascading Style Sheets]]></category>
		<category><![CDATA[CSS]]></category>
		<category><![CDATA[css alignment]]></category>
		<category><![CDATA[Style sheet]]></category>
		<category><![CDATA[Templates]]></category>
		<category><![CDATA[Themes]]></category>
		<category><![CDATA[WordPress]]></category>
		<category><![CDATA[wordpress alignment]]></category>
		<guid isPermaLink="false">http://www.maverickwebcreations.com/?p=93</guid>
		<description><![CDATA[<p><a href="http://www.maverickwebcreations.com/wp-content/uploads/2008/08/dscn7853.jpg"></a>This picture is aligned to the left of my content. Usually we display pictures to the left or right and have our sentences wrap around it. Try to make your paragraphs longer or reduce the size of the picture to make it look good when wrapped around the text.<a href="http://www.maverickwebcreations.com/wp-content/uploads/2008/08/dscn7853.jpg"></a></p>
<p>If &#8230; <a href="http://www.maverickwebcreations.com/2008/08/14/wordpress-picture-alignment-secrets.html" class="read_more">Read more...</a></p>]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.maverickwebcreations.com/wp-content/uploads/2008/08/dscn7853.jpg"><img class="alignleft size-thumbnail wp-image-94" title="dscn7853" src="http://www.maverickwebcreations.com/wp-content/uploads/2008/08/dscn7853-150x150.jpg" alt="WordPress Picture Alignment Secrets" width="105" height="105" /></a>This picture is aligned to the left of my content. Usually we display pictures to the left or right and have our sentences wrap around it. Try to make your paragraphs longer or reduce the size of the picture to make it look good when wrapped around the text.<a href="http://www.maverickwebcreations.com/wp-content/uploads/2008/08/dscn7853.jpg"><img class="alignright size-thumbnail wp-image-94" title="dscn7853" src="http://www.maverickwebcreations.com/wp-content/uploads/2008/08/dscn7853-150x150.jpg" alt="WordPress Picture Alignment Secrets" width="150" height="150" /></a></p>
<p>If not it might mess up the layout of your post. What I am trying to do right now is typing in filler text to illustrate my point. The good thing about WordPress&#8217; built-in media upload function is that it has 3 sizes for you to choose &#8211; thumbnail, medium and full size. The picture on the left is the thumbnail-sized picture, which I further reduced in size to match the content of this post.</p>
<p>This picture is now aligned to the right of my content. The trick in aligning pictures is to have enough space to the left or right. In this case, I have enough space right above this paragraph to squeeze in a picture on the right. I used the thumbnail-sized picture and left the size untouched.</p>
<p>This picture is now aligned to the centre of the page. There isn&#8217;t any room to display text on the left or right if you choose to display your pictures in the centre. The picture below is the medium-sized picture that WordPress generated for me.</p>
<p><a href="http://www.maverickwebcreations.com/wp-content/uploads/2008/08/dscn7853.jpg"><img class="aligncenter size-medium wp-image-94" title="dscn7853" src="http://www.maverickwebcreations.com/wp-content/uploads/2008/08/dscn7853-300x225.jpg" alt="WordPress Picture Alignment Secrets" width="300" height="225" /></a></p>
<p>If you did something similar in your WordPress blog and it did not align like my pictures above, you must have forgotten to add some WordPress CSS code into your CSS style sheet. WordPress didn&#8217;t tell you that, did they?</p>
<p>Add this code to the style.css of your WordPress template to enable these WordPress alignment features in your blog:</p>
<pre class="brush: css; title: ; notranslate">
/* IMAGES */
img.alignleft
{
float: left;
}
img.alignright
{
float: right;
}
img.aligncenter
{
display: block;
margin: 0px auto 0px auto;
}
</pre>
<p>That&#8217;s it! Once you have this block of CSS code in your style sheet, you should be able to align your pictures in WordPress properly.</p>
<p><strong>The WordPress Align Center Bug?</strong></p>
<p>I find this &#8220;bug&#8221; rather interesting. Maybe it isn&#8217;t a flaw in WordPress but it was way this way. Okay, here&#8217;s the thing about this align centre feature&#8230;</p>
<p>When you try to align your picture to the centre the <strong>first time</strong>, WordPress adds some HTML code that looks like this:</p>
<pre class="brush: xml; title: ; notranslate">&lt;img src=&quot;http://whatever.com/picture.jpg&quot; class=&quot;aligncenter&quot; /&gt;</pre>
<p>If you try to align your picture to the centre for the <strong>second time</strong>, WordPress adds more HTML code and it looks something like:</p>
<pre class="brush: xml; title: ; notranslate">&lt;p style=&quot;text-align: center;&quot;&gt;&lt;img src=&quot;http://whatever.com/picture.jpg&quot; class=&quot;aligncenter&quot; /&gt;&lt;/p&gt;</pre>
<p>Notice the extra P HTML tag that is added to your HTML code. Strange isn&#8217;t? Well, if you have added the block of code above, you don&#8217;t have to worry about centre aligning 2 times just to get your picture to align to the centre of the page. It sounds silly but that was what I did before I knew what WordPress actually adds to the HTML code when you try to centre align stuff.</p>
<p>P.S. This picture is really nice &#8220;Kodak&#8221; moment of 3 of my 4 cats. The cat lying down with the back facing the front is Mini. The kitten on the left is Coco and the other kitty on the right is Moca. All my cats have names with 4 letters and I try to give them a cool and &#8220;yummy&#8221; name.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.maverickwebcreations.com/2008/08/14/wordpress-picture-alignment-secrets.html/feed</wfw:commentRss>
		<slash:comments>7</slash:comments>
		</item>
	</channel>
</rss>

