<?xml version="1.0"?>
<rss version="2.0" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:media="http://search.yahoo.com/mrss/" xmlns:yt="http://gdata.youtube.com/schemas/2007" xmlns:atom="http://www.w3.org/2005/Atom">
   <channel>
      <title>CSS Globe</title>
      <description>Pipes Output</description>
      <link>http://pipes.yahoo.com/pipes/pipe.info?_id=8062db6998371bc007a01bca51ba9cad</link>
      <atom:link rel="next" href="http://pipes.yahoo.com/pipes/pipe.run?_id=8062db6998371bc007a01bca51ba9cad&amp;_render=rss&amp;page=2"/>
      <pubDate>Thu, 01 Oct 2015 12:11:46 +0000</pubDate>
      <generator>http://pipes.yahoo.com/pipes/</generator>
      <item>
         <title>Easy Percentage Grid System with HTML5</title>
         <link>http://feedproxy.google.com/~r/cssglobe/~3/dH1-HyhYivo/</link>
         <description>Web grid systems help front end coders to layout a document faster. In this article I am presenting a &lt;strong&gt;percentage based grid system&lt;/strong&gt; that is included in the &lt;a rel=&quot;nofollow&quot; target=&quot;_blank&quot; href=&quot;http://easyframework.com/&quot;&gt;Easy framework's&lt;/a&gt; CSS.</description>
         <guid isPermaLink="false"></guid>
         <pubDate>Tue, 22 Mar 2011 10:04:59 +0000</pubDate>
         <content:encoded><![CDATA[<p>Web grid systems help front end coders to layout a document faster. In this article I am presenting a <strong>percentage based grid system</strong> that is included in the <a rel="nofollow" target="_blank" href="http://easyframework.com/">Easy framework&#8217;s</a> CSS. </p>
<p>The main characteristics of this grid system is that all the columns have <strong>percentage based width</strong> so they adapt to the container element. It means that with using this system you will not have to define a width of each column by hand, you can simply throw it inside any container and the column widths and column gutters will be automatically set. </p>
<p><a rel="nofollow" target="_blank" href="http://cssglobe.com/lab/percentage_grid/index.html"><img src="http://cssglobe.com/lab/percentage_grid/img.jpg"/></a></p>
<p>This system supports up to 6 equal width columns, so you can choose anywhere from 2 to 6 columns in the set. In each column set you can have double, triple, quadruple or even quintuple columns. The column gutters are set to 2 percent for each column set, so in case you have different column sets in one container you will have equal column gutters. </p>
<h3>Naming the columns and column containers</h3>
<p>Grid system often compromise the semantics. Unfortunately that is something we have to live with if we want to use this kind of approach. <br />
Important thing about Easy Percentage Grid System is that column containers must have the base class name <strong><em>cols</em></strong> (as in columns &#8211; <strong>plural</strong>) while each column must have a class name <em><strong>col</strong></em> (column &#8211; <strong>singular</strong>). By using this base classes alone the grid system can properly display two equal columns. So this code</p>
<pre>&lt;div class=&quot;cols&quot;&gt;
    &lt;div class=&quot;col first&quot;&gt;&lt;/div&gt;
    &lt;div class=&quot;col&quot;&gt;&lt;/div&gt;
&lt;/div&gt;</pre>
<p>can be used for creating 2 equal columns. Note the class name <strong><em>first</em></strong>. I am using it (along with :first-child pseudo selector) to erase the left margin for the first column. </p>
<p>If you want to create more than 2 column set you need to add a class name <em><strong>colsX</strong></em> to the container where <em><strong>X</strong></em> represents the number of columns in the set. Here&#8217;s a sample:</p>
<pre>&lt;div class=&quot;cols cols4&quot;&gt;
    &lt;div class=&quot;col first&quot;&gt;&lt;/div&gt;
    &lt;div class=&quot;col&quot;&gt;&lt;/div&gt;
    &lt;div class=&quot;col&quot;&gt;&lt;/div&gt;
    &lt;div class=&quot;col&quot;&gt;&lt;/div&gt;
&lt;/div&gt;</pre>
<p>If you need to include a column with multiple width (double or triple width column) you can add a class name <em><strong>colX</strong></em> where <em><strong>X</strong></em> is the number that defines how wide the column is. Again note the <strong>singular</strong> here! Here&#8217;s an example of 5 columns set where second column is double the width of the default ones.</p>
<pre>&lt;div class=&quot;cols cols5&quot;&gt;
    &lt;div class=&quot;col first&quot;&gt;&lt;/div&gt;
    &lt;div class=&quot;col col2&quot;&gt;&lt;/div&gt;
    &lt;div class=&quot;col&quot;&gt;&lt;/div&gt;
    &lt;div class=&quot;col&quot;&gt;&lt;/div&gt;
&lt;/div&gt;</pre>
<h3>Demos</h3>
<p>Take a look at the demos to see how it all looks like.</p>
<ul>
<li><a rel="nofollow" target="_blank" href="http://cssglobe.com/lab/percentage_grid/index.html">2, 3 and 4 columns demo &#8211; fixed width</a></li>
<li><a rel="nofollow" target="_blank" href="http://cssglobe.com/lab/percentage_grid/cols5.html">5 columns demo &#8211; fixed width</a></li>
<li><a rel="nofollow" target="_blank" href="http://cssglobe.com/lab/percentage_grid/cols6.html">6 columns demo &#8211; fixed width</a></li>
<li><a rel="nofollow" target="_blank" href="http://cssglobe.com/lab/percentage_grid/index_fluid.html">2, 3 and 4 columns demo &#8211; fluid width</a></li>
<li><a rel="nofollow" target="_blank" href="http://cssglobe.com/lab/percentage_grid/cols5_fluid.html">5 columns demo &#8211; fluid width</a></li>
<li><a rel="nofollow" target="_blank" href="http://cssglobe.com/lab/percentage_grid/cols6_fluid.html">6 columns demo &#8211; fluid width</a></li>
</ul>
<p>So, to recap, Easy Percentage Grid System features:</p>
<ul>
<li><strong>place inside any fluid or fixed width container</strong>, without having to worry about each column width</li>
<li>supports up to 6 equal columns </li>
<li> supports multiple width columns (double width, triple width etc.)</li>
<li> column gutters have the same width for each column set</li>
<li> basic, solid CSS styling for HTML elements included</li>
</ul>
<p class="imp">
	<a rel="nofollow" target="_blank" href="http://cssglobe.com/lab/percentage_grid/easy_grid.zip" title="Download">Download the Easy Percentage Grid System</a>
</p>
<h3><strong>Edit:</strong> Column Padding</h3>
<p>It is possible to add side paddings to columns <strong>expressed in percentages</strong> too. The principle would be, add padding you desire to the &#8220;global&#8221; column definition (let&#8217;s say we want 1% side padding):</p>
<pre>.col, .col2, .col3, .col4, .col5{
    float:left;
    display:inline;	
    margin-left:2%;
    padding:0 1%;
    background:#f1f1f1; /* only for demo purposes - remove this line */
    }</pre>
<p>What we need to do is <strong>decrease</strong> the width of each column by <strong>double that percentage</strong>. Left padding 1% and right padding 1% makes 2% decrease in column width. So instead of 49% width for default column, <strong>it will now be 47%</strong>. You need to manually adjust the width for each column, but it&#8217;s not that big edit. I prepared a 1% side padding demo for you.</p>
<p><a rel="nofollow" target="_blank" href="http://cssglobe.com/lab/percentage_grid/index_padding.html">Take a look at the fixed width container demo with 1% side padding</a></p>
<img src="http://feeds.feedburner.com/~r/cssglobe/~4/dH1-HyhYivo" height="1" width="1" alt=""/>]]></content:encoded>
         <category>Articles</category>
      </item>
      <item>
         <title>Easy Paginate jQuery plugin for pagination</title>
         <link>http://feedproxy.google.com/~r/cssglobe/~3/KtgTVX2xR-Y/</link>
         <description>This plugin allows you to browse easily through the list of items with pagination controls. It is very easy to implement and very lightweight so it might come in handy to use in your own projects.</description>
         <guid isPermaLink="false"></guid>
         <pubDate>Wed, 09 Mar 2011 11:16:27 +0000</pubDate>
         <content:encoded><![CDATA[<p>Today I am presenting a simple jQuery plugin I made. This plugin allows you to browse easily through the list of items with pagination controls. It is very easy to implement and very lightweight so it might come in handy to use in your own projects. It&#8217;s main purpose is to view certain number of list items at once, but it can also be set up to view one item by one. </p>
<p><a rel="nofollow" target="_blank" href="http://cssglobe.com/lab/easypaginate/02.html" title="View Easy Paginate Demo"><img src="http://cssglobe.com/lab/easypaginate/img.jpg"/></a></p>
<p class="imp">
	<a rel="nofollow" target="_blank" href="http://cssglobe.com/lab/easypaginate/01.html" title="View Easy Paginate Demo">Simple demo</a><br />
    <a rel="nofollow" target="_blank" href="http://cssglobe.com/lab/easypaginate/02.html" title="View Easy Paginate Demo">Styled demo</a><br />
    <a rel="nofollow" target="_blank" href="http://cssglobe.com/lab/easypaginate/03.html" title="View Easy Paginate Demo">Auto pagination</a><br />
    <a rel="nofollow" target="_blank" href="http://cssglobe.com/lab/easypaginate/easypaginate.zip" title="Download Easy Paginate">Download the plugin</a>
</p>
<h3>How does it work?</h3>
<p>The plugin takes a list of items, calculates a number of child elements of a certain object, divides it by step parameter (which can be easily adjusted) and generates &quot;control buttons&quot;. Controls are inserted immediately after the selected object in a form of ordered list. </p>
<p>For target object I recommend using unordered list, although plugin will work with any other type of element that contains any type of child elements. If you want to have it set up that way, child elements can be of a different type!</p>
<p>To apply this plugin you will of course need to link to jQuery library and the plugin js file:</p>
<pre>&lt;script type=&quot;text/javascript&quot; src=&quot;https://ajax.googleapis.com/ajax/libs/jquery/1.4.4/jquery.min.js&quot;&gt;&lt;/script&gt;
  &lt;script type=&quot;text/javascript&quot; src=&quot;js/easypaginate.js&quot;&gt;&lt;/script&gt;</pre>
<p>You will need to initiate the plugin:</p>
<pre>&lt;script type=&quot;text/javascript&quot;&gt;
  
  jQuery(function($){ 
  $('ul#items').easyPaginate();
  }); 
  
&lt;/script&gt;</pre>
<p>This is the source code for the target object I am using in my example:</p>
<pre>&lt;ul id=&quot;items&quot;&gt;
  &lt;li&gt;Page 1&lt;/li&gt;
  &lt;li&gt;Page 2&lt;/li&gt;
  &lt;li&gt;Page 3&lt;/li&gt;
  &lt;li&gt;Page 4&lt;/li&gt;
  &lt;li&gt;Page 5&lt;/li&gt;
  &lt;li&gt;Page 6&lt;/li&gt;
  &lt;li&gt;Page 7&lt;/li&gt;
  &lt;li&gt;Page 8&lt;/li&gt;
  &lt;li&gt;Page 9&lt;/li&gt;
  &lt;li&gt;Page 10&lt;/li&gt;
  &lt;li&gt;Page 11&lt;/li&gt;
  &lt;li&gt;Page 12&lt;/li&gt;
  &lt;li&gt;Page 13&lt;/li&gt;
  &lt;li&gt;Page 14&lt;/li&gt;
&lt;/ul&gt;</pre>
<p>This is the generated source code for control buttons (inserted immediately after the target element):</p>
<pre>&lt;ol id=&quot;pagination&quot;&gt;
  &lt;li class=&quot;prev&quot;&gt;Previous&lt;/li&gt;
  &lt;li class=&quot;current&quot; data-index=&quot;1&quot;&gt;1&lt;/li&gt;
  &lt;li data-index=&quot;2&quot;&gt;2&lt;/li&gt;
  &lt;li data-index=&quot;3&quot;&gt;3&lt;/li&gt;
  &lt;li data-index=&quot;4&quot;&gt;4&lt;/li&gt;
  &lt;li class=&quot;next&quot;&gt;Next&lt;/li&gt;
&lt;/ol&gt;</pre>
<h3>Options</h3>
<p>There are several options you can modify. First and most important is the step parameter. Step parameter defines how many child items will be visible at a time. It is also used in calculating of number of pages. By default this parameter is set to 4. To use your own step value, change the step parameter:</p>
<pre>jQuery(function($){
  
  $('ul#items').easyPaginate({
  step:3
  });
  
}); </pre>
<p>Here&#8217;s the full list of available options:</p>
<h4>step</h4>
<p><strong>Default value:</strong> 4<br />
Defines a number of items visible on each &quot;page&quot;. </p>
<h4>delay</h4>
<p><strong>Default value:</strong> 100<br />
Items on each &quot;page&quot; fade in one by one. This parameter controls the pause between each item&#8217;s appearance so we can create &quot;wave&quot; effect. It is defined in milliseconds. </p>
<h4>numeric</h4>
<p><strong>Default value:</strong> true<br />
Boolean. If set to true then the numeric pagination buttons will show. </p>
<h4>nextprev</h4>
<p><strong>Default value:</strong> true<br />
Boolean. If set to true then the next and previous pagination buttons will show. </p>
<h4>auto</h4>
<p><strong>Default value:</strong> false<br />
  Boolean. If set to true then the plugin will automatically rotate the &quot;pages&quot;
</p>
<h4>pause</h4>
<p><strong>Default value:</strong> 4000<br />
  If set to auto pagination, this parameter controls the length of the pause in milliseconds between each &quot;page turn&quot;.
</p>
<h4>clickstop</h4>
<p><strong>Default value:</strong> true<br />
If set to auto pagination, this parameter controls whether the pages will continue to automatically rotate. If you want to continue the rotation set this parameter to false. </p>
<h4>controls</h4>
<p><strong>Default value:</strong> &#8216;pagination&#8217;<br />
As mentioned, the plugin generates an ordered list for the purpose of navigating through &quot;pages&quot;. This parameter defines the list&#8217;s ID.</p>
<h4>current</h4>
<p><strong>Default value:</strong> &#8216;current&#8217;<br />
This parameter defines a class name of a current &quot;page&quot; in the numeric navigation. It is used for styling purposes. </p>
<p>If you want to create multiple paginations on the same page, have in mind that this plugin uses IDs to target control buttons so you need to define control id parameter for each pagination.</p>
<p>Enjoy! <img src="http://cssglobe.com/wp-includes/images/smilies/icon_wink.gif" alt=";)" class="wp-smiley"/> </p>
<img src="http://feeds.feedburner.com/~r/cssglobe/~4/KtgTVX2xR-Y" height="1" width="1" alt=""/>]]></content:encoded>
         <category>Articles</category>
      </item>
      <item>
         <title>jQuery plugin Easy Image Zoom</title>
         <link>http://feedproxy.google.com/~r/cssglobe/~3/UMNS-Xs2LqE/</link>
         <description>I have been working on a little script for a client of mine, that required product image magnification. The task was to create a script that will allow users to see large details of the product while moving cursor over medium sized image. During the process I decided to create a jQuery plugin and share it with you guys!</description>
         <guid isPermaLink="false"></guid>
         <pubDate>Mon, 21 Feb 2011 11:29:09 +0000</pubDate>
         <content:encoded><![CDATA[<p>I have been working on a little script for a client of mine, that required product image magnification. The task was to create a script that will allow users to see large details of the product while moving cursor over medium sized image. During the process I decided to create a jQuery plugin and share it with you guys!</p>
<p>Just as with all my script I try to keep things as lightweight as possible, and most important, as customizable as possible. I hope you&#8217;ll find this very easy to apply to your own websites. </p>
<p><img src="http://cssglobe.com/lab/easyzoom/img.jpg"/></p>
<p class="imp">
	<a rel="nofollow" target="_blank" href="http://cssglobe.com/lab/easyzoom/easyzoom.html" title="View Easy Zoom Demo">Take a look at the demo</a> or<br />
    <a rel="nofollow" target="_blank" href="http://cssglobe.com/lab/easyzoom/easyzoom.zip" title="Download Easy Zoom">Download the plugin</a>
</p>
<h3>Introduction</h3>
<p>First I suggest you <a rel="nofollow" target="_blank" href="http://cssglobe.com/lab/easyzoom/easyzoom.html">check out the demo</a> to see what the plugin is all about. Then come back here and continue reading this article <img src="http://cssglobe.com/wp-includes/images/smilies/icon_smile.gif" alt=":)" class="wp-smiley"/>  </p>
<h3>Markup</h3>
<p>I usually start this section of my articles with the same sentence: &quot;the markup couldn&#8217;t be simpler&quot; <img src="http://cssglobe.com/wp-includes/images/smilies/icon_smile.gif" alt=":)" class="wp-smiley"/>  The main idea behind this and other plugins I write is &#8211; keeping the markup as simple as possible. No unnecessary elements and bloated HTML. Also markup (for all of my plugins) makes content accessible even with JavaScript turned off, which is important. </p>
<p>All you need for this plugin to work is anchor element containing the small image linking to the large image, but this structure is required:</p>
<pre>&lt;a href=&quot;large.jpg&quot;&gt;&lt;img src=&quot;small.jpg&quot; alt=&quot;Small image&quot; /&gt;&lt;/a&gt;</pre>
<p>The script (and CSS) takes care fo the rest. </p>
<h3>Options</h3>
<p>This plugin is customizable with several options and simple CSS definitions. In terms of CSS all you need to do is define the newly created image zoom element&#8217;s size, position and appearance. In my demo I am using this definition:</p>
<pre>#easy_zoom{
	width:600px;
	height:400px;	
	border:5px solid #eee;
	background:#fff;
	color:#333;
	position:absolute;
	top:15px;
	left:400px;
	overflow:hidden;
	-moz-box-shadow:0 0 10px #555;
	-webkit-box-shadow:0 0 10px #555;
	box-shadow:0 0 10px #555;
	/* vertical and horizontal alignment used for preloader text */
	line-height:400px;
	text-align:center;
	}</pre>
<p>You will notice the <em>line-height</em> property&#8230; I am using if for vertical alignment of the message text that is displayed while the detailed image is loading. Of course you can use your own positioning methods, your own text, insert extra markup if you want to and add your own CSS to style the preloader. Perhaps some preloader gif as a preloader image? I&#8217;ll leave that to you, what I am showing here is a bare-bone example that you can easily customize. </p>
<p>Let&#8217;s take a look at the plugin options. Here is a list of them with default values and descriptions:</p>
<h4>id </h4>
<p><strong>Default value:</strong> &quot;easy_zoom&quot;<br />
The ID of the newly created image zoom element. Of course you can use your own, but make sure you update the CSS accordingly.</p>
<h4>parent</h4>
<p><strong>Default value:</strong> &quot;body&quot;<br />
  This defines the DOM element where newly created image zoom element will be inserted. You can insert it anywhere you like in the DOM by editing this option.</p>
<h4>append</h4>
<p><strong>Default value:</strong> &quot;true&quot;<br />
If set to true (by default) the newly created element will be inserted as a last child of the parent element. If this option is set to false then the newly created element will be inserted as a first child of the parent element. </p>
<h4>preload</h4>
<p><strong>Default value:</strong> &quot;Loading&#8230;&quot;<br />
A message that appears before the large image is loaded. You can use this option to write your own preload messages and insert any HTML you want. If you want to use the preloader gifs, I suggest you go with background images.</p>
<h4>error</h4>
<p><strong>Default value:</strong> &quot;There has been a problem with loading the image.&quot;<br />
In case the large image is not found or can&#8217;t be loaded, this error message will appear. You can use this option for custom error messages. </p>
<p>Here&#8217;s a sample code for using some custom options:</p>
<pre>jQuery(function($){
	
	$('a.zoom').easyZoom({
		id: 'imagezoom',
		preload: '&lt;p class="preloader"&gt;Loading the image&lt;/p&gt;'
		parent: '#container'
	});

});</pre>
<p>In one of the next articles here on CSS Globe I will offer a one page portfolio template that uses this image preview, so stay tuned! </p>
<img src="http://feeds.feedburner.com/~r/cssglobe/~4/UMNS-Xs2LqE" height="1" width="1" alt=""/>]]></content:encoded>
         <category>Articles</category>
      </item>
      <item>
         <title>The Anatomy of a Perfect Login Page</title>
         <link>http://feedproxy.google.com/~r/cssglobe/~3/enZ_0xRX8QY/</link>
         <description>In this article I am going to analyze what a perfect login page or login form should have. Also you are able to download the pure CSS3 login form for free.</description>
         <guid isPermaLink="false"></guid>
         <pubDate>Wed, 16 Feb 2011 10:07:27 +0000</pubDate>
         <content:encoded><![CDATA[<p>In this article I am going to analyze what a perfect login page or login form should have. Also you are able to <a rel="nofollow" target="_blank" href="http://cssglobe.com/lab/login/login.zip">download</a> the <strong>pure CSS3 login form</strong> for free. </p>
<p>Login forms are very simple in terms of the required elements. When it comes to forms, it doesn&#8217;t get simpler than that. But some of the elements that could be valuable to your users (or potential members) are often neglected. </p>
<p>Let&#8217;s take a look at what I think are necessary elements.</p>
<p><a rel="nofollow" target="_blank" href="http://cssglobe.com/lab/login/01.html" title="View login page demo"><img src="http://cssglobe.com/lab/login/login.jpg" alt="login page"/></a></p>
<p class="imp"><a rel="nofollow" target="_blank" href="http://cssglobe.com/lab/login/01.html" title="View CSS3 login form demo page">Take a look at the login page</a> or<br />
<a rel="nofollow" target="_blank" href="http://cssglobe.com/lab/login/login.zip" title="Download the login page demo">Download the demo</a></p>
<h3>1. The title </h3>
<p>I believe that each form should have a prominent title that briefly explains what the form is about. If you use login page, like in my example, it is important to mention the name of your website here, so the accidental visitors know where they are.</p>
<h3>2. Non members</h3>
<p>Non-member visitors may stumble upon your login page one way or another. Why not think of them and offer them a direct link to the registration page. It will save them some time and you increase your chance of more new member signing up.</p>
<h3>3. Input fields and labels</h3>
<p>Although login forms usually contain two input fields, it is important that they&#8217;re styled nicely so the labels are readable, and there is no. One thing that I often notice on the various websites is the lack of clickable labels. You should use FOR attribute on labels &#8220;connect&#8221; them with appropriate input field. It is such a small effort when coding and it can make a huge difference in terms if usability. </p>
<h3>4. Forgot password link</h3>
<p>This is also very important link. Many users have numerous accounts and passwords and they often can&#8217;t remember which one they used on your site. The best placement for this link is near the password field itself. </p>
<h3>5. Submit button</h3>
<p>This should, of course, be the most prominent thing in the form. For best results (by results I mean best user experience) it should always look like a button. </p>
<h3>6. Remember me</h3>
<p>Very useful feature that your returning users will appreciate. If your application supports it, include this option and your members will be thankful. <br />
One thing that I believe that is very important is wrapping the checkbox and the text inside the same label. Checkboxes are small and therefor hard to click on. If you wrap entire text inside the label, you enlarge the clickable area and that way making the life easier for your users.</p>
<h3>7. Back link</h3>
<p>If you have full login pages, then you MUST allow users to change their mind about logging in and provide a link back to your home page. </p>
<h3>Validation</h3>
<p><a rel="nofollow" target="_blank" href="http://cssglobe.com/lab/login/01.html" title="View login page demo"><img src="http://cssglobe.com/lab/login/validation.jpg" alt="login page"/></a></p>
<p>Although the form shouldn&#8217;t rely on JavaScript validation alone, I believe that JavaScript based validation scripts are important. They provide instant filtering of the valid data, allowing users to immediately correct their info and also making sure that the valid data is sent to the server-side.</p>
<h3>Demo</h3>
<p>I have prepared a <a rel="nofollow" target="_blank" href="http://cssglobe.com/lab/login/01.html">demo page</a> for you to <a rel="nofollow" target="_blank" href="http://cssglobe.com/lab/login/login.zip">download</a> (for free). The login page is contains a <strong>pure CSS3 styled form</strong> and a simple validation script, ideal for <strong>learning purposes</strong>. Hope you&#8217;ll enjoy it!</p>
<img src="http://feeds.feedburner.com/~r/cssglobe/~4/enZ_0xRX8QY" height="1" width="1" alt=""/>]]></content:encoded>
         <category>Articles</category>
      </item>
      <item>
         <title>Drawing Calendar Icon With CSS3</title>
         <link>http://feedproxy.google.com/~r/cssglobe/~3/UzSDGK-nPzs/</link>
         <description>In this article I am going to use some of the CSS tricks to create a calendar icon you can use for your blog posts or something similar. It is important to notify that there are no images used here and the markup couldn't be simpler than it is.</description>
         <guid isPermaLink="false"></guid>
         <pubDate>Mon, 07 Feb 2011 16:48:48 +0000</pubDate>
         <content:encoded><![CDATA[<p>In this article I am going to use some of the CSS tricks to create a calendar icon you can use for your blog posts or something similar. It is important to notify that there are no images used here and the markup couldn&#8217;t be simpler than it is.</p>
<p>The final result looks like the image below.</p>
<p><img src="http://cssglobe.com/lab/calendar/img.jpg"/></p>
<p class="imp"><a rel="nofollow" target="_blank" href="http://cssglobe.com/lab/calendar/01.html" title="View Pure CSS Calendar Icon Demo">Take a look at the demo</a></p>
<h3>HTML</h3>
<p>As mentioned the HTML I am using for making this calendar icon to work is very simple:</p>
<pre>&lt;p class=&quot;calendar&quot;&gt;7 &lt;em&gt;February&lt;/em&gt;&lt;/p&gt;</pre>
<p>We have a wrapping paragraph, although you may go with the DIV (or HTML5&#8242;s new element &#8211; TIME). Inside the wrapping element you need one extra element that contains a month&#8217;s name.</p>
<h3>The principle</h3>
<p>Now, I have 2 elements to work with, plus I will create 2 pseudo element for each of the real elements which will give me total of 6 elements I can use to draw shapes and position them properly. Pseudo elements will be used for the calendar&#8217;s spiral (actually those are some kind of rings, not sure what is the correct English word for it&#8230; sorry about that). </p>
<p>If you take a look at the image below the idea behind this will be more clear. </p>
<p><img src="http://cssglobe.com/lab/calendar/scheme.gif"/></p>
<p>First we style the container element. You will notice that I used box-shadow, border-radius and CSS gradients. Not all browsers will render all of these properties, but at least it will degrade nicely. <br />
  Note that the fixed height is not defined, you control the overall height with line-height properties in both container and nested em element.
</p>
<pre>.calendar{
	margin:.25em 10px 10px 0;
	padding-top:5px;
	float:left;
	width:80px;
	background:#ededef;
	background: -webkit-gradient(linear, left top, left bottom, from(#ededef), to(#ccc)); 
	background: -moz-linear-gradient(top,  #ededef,  #ccc); 
	font:bold 30px/60px Arial Black, Arial, Helvetica, sans-serif;
	text-align:center;
	color:#000;
	text-shadow:#fff 0 1px 0;	
	-moz-border-radius:3px;
	-webkit-border-radius:3px;
	border-radius:3px;	
	position:relative;
	-moz-box-shadow:0 2px 2px #888;
	-webkit-box-shadow:0 2px 2px #888;
	box-shadow:0 2px 2px #888;
	}</pre>
<p>Em element is also styled, it contains the month&#8217;s name.</p>
<pre>.calendar em{
	display:block;
	font:normal bold 11px/30px Arial, Helvetica, sans-serif;
	color:#fff;
	text-shadow:#00365a 0 -1px 0;	
	background:#04599a;
	background:-webkit-gradient(linear, left top, left bottom, from(#04599a), to(#00365a)); 
	background:-moz-linear-gradient(top,  #04599a,  #00365a); 
	-moz-border-radius-bottomright:3px;
	-webkit-border-bottom-right-radius:3px;	
	border-bottom-right-radius:3px;
	-moz-border-radius-bottomleft:3px;
	-webkit-border-bottom-left-radius:3px;	
	border-bottom-left-radius:3px;	
	border-top:1px solid #00365a;
	}</pre>
<p>Now I am styling the pseudo elements. Container&#8217;s pseudo elements (:before and :after) are used to create thos circles, &quot;holes in te paper&quot;.</p>
<pre>.calendar:before, .calendar:after{
	content:'';
	float:left;
	position:absolute;
	top:5px;	
	width:8px;
	height:8px;
	background:#111;
	z-index:1;
	-moz-border-radius:10px;
	-webkit-border-radius:10px;
	border-radius:10px;
	-moz-box-shadow:0 1px 1px #fff;
	-webkit-box-shadow:0 1px 1px #fff;
	box-shadow:0 1px 1px #fff;
	}
.calendar:before{left:11px;}	
.calendar:after{right:11px;}</pre>
<p>&#8230;and em&#8217;s pseudo elements are used to create the rings:</p>
<pre>.calendar em:before, .calendar em:after{
	content:'';
	float:left;
	position:absolute;
	top:-5px;	
	width:4px;
	height:14px;
	background:#dadada;
	background:-webkit-gradient(linear, left top, left bottom, from(#f1f1f1), to(#aaa)); 
	background:-moz-linear-gradient(top,  #f1f1f1,  #aaa); 
	z-index:2;
	-moz-border-radius:2px;
	-webkit-border-radius:2px;
	border-radius:2px;
	}
.calendar em:before{left:13px;}	
.calendar em:after{right:13px;}	</pre>
<p>There are 2 demos you can check out:</p>
<ul>
<li><a rel="nofollow" target="_blank" href="http://cssglobe.com/lab/calendar/01.html" title="View Pure CSS Calendar Icon Demo">Large CSS Calendar Icon</a></li>
<li><a rel="nofollow" target="_blank" href="http://cssglobe.com/lab/calendar/02.html" title="View Pure CSS Calendar Icon Demo">Small CSS Calendar Icon</a></li>
</ul>
<p>It is important to say that if you&#8217;re going to customize the width there will be some tweaking needed, mainly for the placement of the pseudo elements.</p>
<p>That is it! Enjoy! <img src="http://cssglobe.com/wp-includes/images/smilies/icon_smile.gif" alt=":)" class="wp-smiley"/> </p>
<img src="http://feeds.feedburner.com/~r/cssglobe/~4/UzSDGK-nPzs" height="1" width="1" alt=""/>]]></content:encoded>
         <category>Articles</category>
      </item>
      <item>
         <title>Styling Full Width Tabs with CSS3</title>
         <link>http://feedproxy.google.com/~r/cssglobe/~3/izTF5CFVe8s/</link>
         <description>In this article I will demonstrate how to create full width &quot;browser-like&quot; tabs using pure CSS3 and some HTML5 markup.</description>
         <guid isPermaLink="false"></guid>
         <pubDate>Thu, 27 Jan 2011 20:12:24 +0000</pubDate>
         <content:encoded><![CDATA[<p>In this article I will demonstrate how to create full width &quot;browser-like&quot; tabs using pure CSS3 and some HTML5 markup. This article includes whole lot of new CSS properties such as box and text shadows, border radius and CSS gradients. That means a lot of vendor prefixes in the code :). </p>
<p><a rel="nofollow" target="_blank" href="http://cssglobe.com/lab/css3_tabs/01.html" title="View CSS3 full width tabs"><img src="http://cssglobe.com/lab/css3_tabs/img.jpg" alt="CSS3 tabs"/></a></p>
<p>Of course, not all browsers support these properties, so we need to make sure that everything degrades nicely. I mean as nice as a it could be, right?</p>
<p>It degrades from this (Safari)</p>
<p><img src="http://cssglobe.com/lab/css3_tabs/safari.jpg" alt="Tabs in Safari"/></p>
<p>to this (IE8)</p>
<p><img src="http://cssglobe.com/lab/css3_tabs/IE.jpg" alt="Tabs in IE8"/></p>
<h3>Markup</h3>
<p>First let&#8217;s take a look at the markup. In this example I am using HTML5 elements.<br />
Head of the document looks like this:</p>
<pre>&lt;!DOCTYPE html&gt;
&lt;html lang=&quot;en&quot;&gt;
&lt;head&gt;
&lt;meta charset=&quot;utf-8&quot; /&gt;
&lt;title&gt;Tabbed Layout&lt;/title&gt;
&lt;link rel=&quot;stylesheet&quot; href=&quot;css/screen.css&quot; type=&quot;text/css&quot; media=&quot;screen&quot; /&gt;
&lt;!--[if IE]&gt; &lt;script src=&quot;http://html5shiv.googlecode.com/svn/trunk/html5.js&quot;&gt;&lt;/script&gt; &lt;![endif]--&gt;
&lt;script type=&quot;text/javascript&quot; src=&quot;https://ajax.googleapis.com/ajax/libs/jquery/1.4.4/jquery.min.js&quot;&gt;&lt;/script&gt;
&lt;script type=&quot;text/javascript&quot; src=&quot;js/tabbed.layout.js&quot;&gt;&lt;/script&gt;
&lt;/head&gt;</pre>
<p>We are using <a rel="nofollow" target="_blank" href="http://ejohn.org/blog/html5-shiv/">John Resig&#8217;s HTML5 Shiv</a> to make sure we can properly render HTML5 elements in all browsers, and I am including a Easy Framework&#8217;s tab script just to add behavior to the tabs. </p>
<p>Next in the markup structure is the header&#8230;</p>
<pre>&lt;header&gt;
&lt;h1&gt;Some cool goes title&lt;/h1&gt;
&lt;/header&gt;
</pre>
<p>&#8230;and then we go to the nav element. This element contains actual clickable tabs:</p>
<pre>&lt;nav&gt; 
    &lt;ul&gt;
        &lt;li&gt;&lt;a href=&quot;#tab1&quot;&gt;Tab 1&lt;/a&gt;&lt;/li&gt;
        &lt;li&gt;&lt;a href=&quot;#tab2&quot;&gt;Tab 2&lt;/a&gt;&lt;/li&gt;
        &lt;li&gt;&lt;a href=&quot;#tab3&quot;&gt;Tab 3&lt;/a&gt;&lt;/li&gt;
        &lt;li&gt;&lt;a href=&quot;#tab4&quot;&gt;Tab 4&lt;/a&gt;&lt;/li&gt; 
    &lt;/ul&gt;
&lt;/nav&gt;</pre>
<p>We link the tabs to the section elements further down in the markup structure:</p>
<pre>&lt;section class=&quot;tab&quot; id=&quot;tab1&quot;&gt;
&lt;p&gt;Section number 1&lt;/p&gt;
&lt;/section&gt;

&lt;section class=&quot;tab&quot; id=&quot;tab2&quot;&gt;
&lt;p&gt;Section number 2&lt;/p&gt;
&lt;/section&gt;

&lt;section class=&quot;tab&quot; id=&quot;tab3&quot;&gt;
&lt;p&gt;Section number 3&lt;/p&gt;
&lt;/section&gt;

&lt;section class=&quot;tab&quot; id=&quot;tab4&quot;&gt;
&lt;p&gt;Section number 4&lt;/p&gt;
&lt;/section&gt;</pre>
<p>As far as the necessary markup goes, this is it. Pretty simple!</p>
<h3>CSS3 Magic</h3>
<p>First let&#8217;s edit the header. Header has fixed height and we added a subtle CSS gradient to it, from darker to lighter:</p>
<pre>header{
    height:32px;
    overflow:hidden;
    background:#e1e1e1;
    background:-webkit-gradient(linear, left top, left bottom, from(#d1d1d1), to(#e1e1e1));
    background:-moz-linear-gradient(top,  #d1d1d1,  #e1e1e1);
    padding:0 5px;
    }</pre>
<p>Nav element has fixed height as well, list items inside are floated to the left and have the same width. We are also adding CSS gradients along with bottom border radius and box shadow. (vendor prefixes galore)</p>
<pre>nav li{
    list-style:none;
    float:left;
    height:24px;
    line-height:24px;
    -moz-box-shadow:0 0 3px #888;
    -webkit-box-shadow:0 0 3px #888;
    box-shadow:0 0 3px #888;
    -webkit-border-bottom-right-radius:3px;
    -webkit-border-bottom-left-radius:3px;
    -moz-border-radius-bottomright:3px;
    -moz-border-radius-bottomleft:3px;
    border-bottom-right-radius:3px;
    border-bottom-left-radius:3px;
    margin:0 2px;
    width:200px;
    overflow:hidden;
    position:relative;
    background:#ccc;
    background:-webkit-gradient(linear, left top, left bottom, from(#ccc), to(#aaa));
    background:-moz-linear-gradient(top,  #ccc,  #aaa);
    }</pre>
<p>Selected tab should blend into header so the colors must match. &quot;Ending&quot; color of the header gradient must be &quot;starting&quot; color of the selected tab. Also make sure that you define matching regular background colors for browser that don&#8217;t support CSS gradients. </p>
<pre>nav li.selected{
  background:#e1e1e1;
  background:-webkit-gradient(linear, left top, left bottom, from(#e1e1e1), to(#d1d1d1));
  background:-moz-linear-gradient(top,  #e1e1e1,  #d1d1d1);
  }</pre>
<h3>Styling the anchor&#8217;s inner shadow</h3>
<p>Now here&#8217;s a little trick. I guess you are familiar with box-shadow property and how it works. What we can define is horizontal offset, vertical offset blur and a color. Another cool option that allows us to have inner shadows is the inset attribute.<br />
  Here is our problem&#8230; on non selected tabs, we need to have only top shadow, no shadows from the side. That is not doable with the usual settings</p>
<p>What we&#8217;ll do is:</p>
<ul>
<li>add inner shadow to anchor element with vertical offset only</li>
<li>make a nested anchor element wider than the parent LI element</li>
<li>position anchor absolutely inside the LI element</li>
<li>set overflow to hidden on LI element</li>
</ul>
<p>That way we will simply hide the side inner shadow and have only top shadow visible. This is small detail, but without it the entire tab would not look natural (as if the header drops a shadow on it).</p>
<p>Take a look at the graphic to (hopefully <img src="http://cssglobe.com/wp-includes/images/smilies/icon_smile.gif" alt=":)" class="wp-smiley"/>  ) understand it better. </p>
<p><img src="http://cssglobe.com/lab/css3_tabs/scheme.gif" alt="Hiding side shadows"/></p>
<p>Here&#8217;s the CSS for the anchor element:</p>
<pre>nav li a, nav li a:visited, nav li a:hover{
  list-style:none;
  display:block;
  position:absolute;
  top:0;
  left:-2px;
  height:24px;
  line-height:24px;
  width:204px; 
  text-align:center;
  color:#333; 
  font-size:11px;
  text-shadow:#e8e8e8 0 1px 0;
  -moz-box-shadow:inset 0 1px 1px #888;
  -webkit-box-shadow:inset 0 1px 1px #888;
  box-shadow:inset 0 1px 1px #888;
  } </pre>
<p>Selected anchor doesn&#8217;t have an inner shadow:</p>
<pre>nav li.selected a{
  -moz-box-shadow:none;
  -webkit-box-shadow:none;
  box-shadow:none; 
  } </pre>
<h3>JavaScript</h3>
<p>Last but not least, I added a simple tab script, because without it, tabs&#8230; well&#8230; wouldn&#8217;t make that much sense. This script is taken directly from my Easy front-end framework code. </p>
<pre>tabs = function(options) {
    
    var defaults = {  
        selector: '.tabs',
        selectedClass: 'selected'
    };  
    
    if(typeof options == 'string') defaults.selector = options;
    var options = $.extend(defaults, options); 

    return $(options.selector).each(function(){
                                
        var obj = this;	
        var targets = Array();

        function show(i){
            $.each(targets,function(index,value){
                $(value).hide();
            })
            $(targets[i]).fadeIn('fast');
            $(obj).children().removeClass(options.selectedClass);
            selected = $(obj).children().get(i);
            $(selected).addClass(options.selectedClass);
        };

        $('a',this).each(function(i){	
            targets.push($(this).attr('href'));
            $(this).click(function(e){
                e.preventDefault();
                show(i);
            });
        });
        
        show(0);

    });			
}
// initialize the function
tabs('nav ul');</pre>
<p>Note that we are passing a selector as a parameter to the function. This selector must be a unordered (or ordered) list of the tab navigation. </p>
<p class="imp"><a rel="nofollow" target="_blank" href="http://cssglobe.com/lab/css3_tabs/01.html" title="View CSS3 full width tabs">Take a look at the demo</a> or <a rel="nofollow" target="_blank" href="http://cssglobe.com/lab/css3_tabs/css3_tabs.zip" title="Download CSS3 full width tabs">Download files</a></p>
<p>That is it! In my next article I will take this one step further and create a full screen tabbed layout so stay tuned!</p>
<img src="http://feeds.feedburner.com/~r/cssglobe/~4/izTF5CFVe8s" height="1" width="1" alt=""/>]]></content:encoded>
         <category>Articles</category>
      </item>
      <item>
         <title>jQuery plugin Easy Notification</title>
         <link>http://feedproxy.google.com/~r/cssglobe/~3/TWAo4k9W6w0/</link>
         <description>There are cases and scenarios when you want to deliver a message to your website users and make sure that they will read it or at least notice it. This jQuery plugin will make that task easy for you.</description>
         <guid isPermaLink="false"></guid>
         <pubDate>Sun, 23 Jan 2011 20:04:08 +0000</pubDate>
         <content:encoded><![CDATA[<p>There are cases and scenarios when you want to deliver a message to your website users and make sure that they will read it or at least notice it. This jQuery plugin will make that task easy for you. In my efforts to code plugins that are easy to use I created a plugin for various notifications. I named it easyNotification as it will soon become part of my <a rel="nofollow" target="_blank" href="http://easyframework.com">Easy front-end framework</a>. </p>
<p><img src="http://cssglobe.com/lab/easynotification/img.jpg"/></p>
<p class="imp"><a rel="nofollow" target="_blank" href="http://cssglobe.com/lab/easynotification/easynotification.zip" title="Download plugin">Download this plugin for FREE</a></p>
<h3>How does it work</h3>
<p>This plugin will create and insert a simple piece of HTML code that contains a message you want to send to your visitors. Visitors have an option of closing notification once they read it. You can control the content and appearance of the notification by adjusting plugin options and CSS.</p>
<p>This is the HTML code that the plugin renders:</p>
<pre>&lt;div id=&quot;easyNotification&quot;&gt;
	Notification!
	&lt;span class=&quot;close&quot;&gt;Close&lt;/span&gt;
&lt;/div&gt;</pre>
<h3>Features</h3>
<ul>
<li>Insert the notification anywhere in the DOM </li>
<li>Show notification on event (click, page load) or programatically by simply calling it from your script</li>
<li> Cookie based notifications enable you to show the message to your visitors once so you don&#8217;t annoy them with repeating messages</li>
<li> Extremely simple markup makes it very customizable</li>
</ul>
<h3>Options</h3>
<p>Plugin comes with the default options, here is a list with explanation and a default values:</p>
<table>
<tr>
<th>Option</th>
<th>Default Value</th>
<th>Description</th>
</tr>
<tr>
<td valign="top">id</td>
<td valign="top">&#8216;easyNotification&#8217;</td>
<td valign="top">ID assinged to a newly created element.</td>
</tr>
<tr>
<td valign="top">text</td>
<td valign="top">&#8216;Notification&#8217;</td>
<td valign="top">Text or HTML code you want to display in your notification.</td>
</tr>
<tr>
<td valign="top">parent</td>
<td valign="top">&#8216;body&#8217;</td>
<td valign="top">Used to control the placement of the notification in the DOM. This selector defines parent element of the newly created notification element.</td>
</tr>
<tr>
<td valign="top">prepend</td>
<td valign="top">true</td>
<td valign="top">True or false, this option controls whether the newly created notification element will be prepended or appended to parent element.</td>
</tr>
<tr>
<td valign="top">sibling</td>
<td valign="top">&#8221;</td>
<td valign="top">To provide even more control over the placement of the notification element, this option defines a sibling. By default this option is blank. If defined the parent option will be ignored.</td>
</tr>
<tr>
<td valign="top">before</td>
<td valign="top">true</td>
<td valign="top">True or false, this option controls whether the newly created notification element will be placed before or after the sibling element.</td>
</tr>
<tr>
<td valign="top">closeClassName</td>
<td valign="top">&#8216;close&#8217;</td>
<td valign="top">Value of a class attribute assigned to closing span element.</td>
</tr>
<tr>
<td valign="top">closeText</td>
<td valign="top">&#8216;Close&#8217;</td>
<td valign="top">Inner text of the closing span element.</td>
</tr>
<tr>
<td valign="top">cookieEnable</td>
<td valign="top">false</td>
<td valign="top">True or false, this option controls if the cookie based notification will be enabled.</td>
</tr>
<tr>
<td valign="top">cookieName</td>
<td valign="top">&#8216;notification&#8217;</td>
<td valign="top">Name of the cookie created when the notification appears for the first time. Using different cookie names for different notifications enable multiple cookie based notifications.</td>
</tr>
<tr>
<td valign="top">cookieValue</td>
<td valign="top">&#8217;12345&#8242;</td>
<td valign="top">Options used if you want to set any specific value to the cookie, although script only checks if the cookies exists.</td>
</tr>
<tr>
<td valign="top">cookieDays</td>
<td valign="top">30</td>
<td valign="top">Cookie duration in days.</td>
</tr>
<tr>
<td valign="top">delay</td>
<td valign="top">0</td>
<td valign="top">Delay in milliseconds before notification is showed. By default is set to 0 which means the notification will show immediately.</td>
</tr>
<tr>
<td valign="top">autoClose</td>
<td valign="top">false</td>
<td valign="top">True or false, this option enables self closing notifications.</td>
</tr>
<tr>
<td valign="top">duration</td>
<td valign="top">5000</td>
<td valign="top">Duration of notification element (if autoClose option is enabled) in milliseconds before it closes automatically.</td>
</tr>
<tr>
<td valign="top">callback</td>
<td valign="top">function(){}</td>
<td valign="top">Callback function option when notification is closed. </td>
</tr>
</table>
<p>Option syntax is standard when it comes to jQuery plugins:</p>
<pre>$.easyNotification({
	text: 'Your custom text',
	parent: '#someElement'
});</pre>
<p>but this plugin enables the simplest possible usage if you want to use default values and only insert your own text:</p>
<pre>$.easyNotification('Your custom text here');</pre>
<h3>Demos</h3>
<p>There are 3 demos available:</p>
<ul>
<li><a rel="nofollow" target="_blank" href="http://cssglobe.com/lab/easynotification/01.html">Notification shows on a page load</a></li>
<li><a rel="nofollow" target="_blank" href="http://cssglobe.com/lab/easynotification/02.html">Notification shows on click</a></li>
<li><a rel="nofollow" target="_blank" href="http://cssglobe.com/lab/easynotification/03.html">Cookie based notification, shows only on first page load</a></li>
</ul>
<img src="http://feeds.feedburner.com/~r/cssglobe/~4/TWAo4k9W6w0" height="1" width="1" alt=""/>]]></content:encoded>
         <category>Articles</category>
      </item>
      <item>
         <title>Pure CSS3 Post Tags</title>
         <link>http://feedproxy.google.com/~r/cssglobe/~3/8lIAs2J5u8E/</link>
         <description>This is a rather simple pure CSS trick you can use to style your blog post tags, usually placed at the bottom of the posts.</description>
         <guid isPermaLink="false"></guid>
         <pubDate>Wed, 05 Jan 2011 16:50:44 +0000</pubDate>
         <content:encoded><![CDATA[<p>This is a rather simple pure CSS trick you can use to style your blog post tags, usually placed at the bottom of the posts. </p>
<p>Pure CSS post tags uses at least 2 CSS tricks such as <strong>CSS triangles</strong> and <strong>CSS circles</strong>.</p>
<p><img src="http://cssglobe.com/lab/css3_tags/img.jpg"/></p>
<p class="imp"><a rel="nofollow" target="_blank" href="http://cssglobe.com/lab/css3_tags/01.html" title="View Pure CSS Post Tags Demo">Take a look at the demo</a></p>
<p>For CSS triangles you need to manipulate borders of an element that has zero height and width. </p>
<p>CSS circle is simpler. All you need is a square element with rounded corners set to at least half the size of the element. The border radius will then merge into a circle. </p>
<h3>HTML</h3>
<p>I usually markup tags with unordered list. So the markup is fairly simple:</p>
<pre>&lt;ul class=&quot;tags&quot;&gt;
	&lt;li&gt;&lt;a href=&quot;#&quot;&gt;tag&lt;/a&gt;&lt;/li&gt;
	&lt;li&gt;&lt;a href=&quot;#&quot;&gt;tag name&lt;/a&gt;&lt;/li&gt;

&lt;/ul&gt;</pre>
<p>I will add :before and :after pseudo elements and style them to achieve the styling I wanted</p>
<p><img src="http://cssglobe.com/lab/css3_tags/scheme.gif"/></p>
<h3>CSS</h3>
<p>I am placing the tags list at the bottom of the post element  with adjusting ULs absolute position</p>
<pre>.tags{
	margin:0;
	padding:0;
	position:absolute;
	right:24px;
	bottom:-12px;
	list-style:none;
	}</pre>
<p>Height (and line-height) of the list item LI and anchor A is set.</p>
<pre>.tags li, .tags a{
	float:left;
	height:24px;
	line-height:24px;
	position:relative;
	font-size:11px;
	}</pre>
<p>Next to style is the anchor element. We&#8217;re adding margins and paddings and some rounded corners on the right hand side.</p>
<pre>.tags a{
	margin-left:20px;
	padding:0 10px 0 12px;
	background:#0089e0;
	color:#fff;
	text-decoration:none;
	-moz-border-radius-bottomright:4px;
	-webkit-border-bottom-right-radius:4px;	
	border-bottom-right-radius:4px;
	-moz-border-radius-topright:4px;
	-webkit-border-top-right-radius:4px;	
	border-top-right-radius:4px;	
	} </pre>
<p>To achieve the pointed edge we are adding a <em>:before</em> pseudo-element. The element has the width and height set to zero, that way we are only using it&#8217;s borders. To &quot;draw&quot; an arrow pointing left we are showing only the right border. </p>
<pre>.tags a:before{
	content:"";
	float:left;
	position:absolute;
	top:0;
	left:-12px;
	width:0;
	height:0;
	border-color:transparent #0089e0 transparent transparent;
	border-style:solid;
	border-width:12px 12px 12px 0;		
	}</pre>
<p>The last element to add is the :after pseudo-element. This will act as that rounded hole. What we&#8217;re doing here is creating an empty square, and we&#8217;re rounding it&#8217;s edges so we create a circle (and of course we position it with <em>position: absolute</em>).</p>
<pre>.tags a:after{
	content:"";
	position:absolute;
	top:10px;
	left:0;
	float:left;
	width:4px;
	height:4px;
	-moz-border-radius:2px;
	-webkit-border-radius:2px;
	border-radius:2px;
	background:#fff;
	-moz-box-shadow:-1px -1px 2px #004977;
	-webkit-box-shadow:-1px -1px 2px #004977;
	box-shadow:-1px -1px 2px #004977;
	}</pre>
<p>We&#8217;re also adding a :hover state for the anchor:</p>
<pre>.tags a:hover{background:#555;}	

.tags a:hover:before{border-color:transparent #555 transparent transparent;}</pre>
<p>That is it! Enjoy! <img src="http://cssglobe.com/wp-includes/images/smilies/icon_smile.gif" alt=":)" class="wp-smiley"/> </p>
<img src="http://feeds.feedburner.com/~r/cssglobe/~4/8lIAs2J5u8E" height="1" width="1" alt=""/>]]></content:encoded>
         <category>Articles</category>
      </item>
      <item>
         <title>Angled content mask with CSS</title>
         <link>http://feedproxy.google.com/~r/cssglobe/~3/7EH7zcc6u6Q/</link>
         <description>In this article I will show you how to do create angled CSS content &quot;mask&quot;.  The idea is pretty simple and it uses CSS transform property (rotation to be more precise).</description>
         <guid isPermaLink="false"></guid>
         <pubDate>Tue, 28 Dec 2010 11:19:44 +0000</pubDate>
         <content:encoded><![CDATA[<p>In this article I will show you how to do create angled CSS content &quot;mask&quot;.  The idea is pretty simple and it uses CSS transform property (rotation to be more precise). Of course this effect will be fully functional only in browsers currently supporting CSS rotation.</p>
<p>In last article I talked about my position on vendor prefixes. In this article I am using properties that currently contain vendor prefixes. Funny, isn&#8217;t it? Although I would still prefer to have prefix-free properties, that is not stopping me (and it shouldn&#8217;t stop you) from using the new properties goodness.</p>
<p>Let&#8217;s get to the business. Look at the image bellow to see what I am trying to achieve.</p>
<p><img src="http://cssglobe.com/lab/angled/screenshot.jpg" alt="screenshot"/></p>
<p class="imp"><a rel="nofollow" target="_blank" href="http://cssglobe.com/lab/angled/01.html" title="View angled CSS content mask demo page">Take a look at the demo</a> or<br />
<a rel="nofollow" target="_blank" href="http://cssglobe.com/lab/angled/angled.zip" title="Download bundle">Download files</a></p>
<p>The idea, as mentioned, is quite simple. We have 3 nested elements. Top level acts as a container of a certain size that fits into design, i.e site header. Second element will be rotated X degrees (clockwise)  and third element is rotated -X degrees (anti-clockwise) so it evens up horizontally. Take a look at the image bellow to get a better idea.</p>
<p><img src="http://cssglobe.com/lab/angled/angled.gif" alt="scheme"/></p>
<p>The markup looks like this:</p>
<pre>&lt;div class=&quot;box&quot;&gt;
	&lt;div class=&quot;inner&quot;&gt;
		&lt;div class=&quot;content&quot;&gt;&lt;img src=&quot;img.jpg&quot; alt=&quot;my bike&quot; /&gt;&lt;/div&gt;
	&lt;/div&gt;
&lt;/div&gt;</pre>
<h3>The CSS goodness</h3>
<p>Important thing here is to set <em>overflow</em> property to hidden on all 3 elements (ok you can skip that for the 3rd element). First element is not rotated and it has fixed width and height. Second element is rotated clockwise and third element is rotated anti-clockwise by the same degree amount. The placement of the elements should then be further adjusted by element&#8217;s margins and of course you are free to style it as pleased (background images, borders etc.) On the demo page I am providing a bare-bone example you can then restyle as pleased.</p>
<pre>/* angled box styles */

.box{
	width:700px;
	height:300px;
	background:#ccc;	
	overflow:hidden;
	margin:1em 0;
	}
.box .inner{
	-moz-transform:rotate(20deg);
	-webkit-transform:rotate(20deg);
	-o-transform:rotate(20deg);
	width:300px;
	height:450px;
	margin-top:-70px;
	margin-right:100px;
	overflow:hidden;
	background:#aaa;
	float:right;
	border:3px solid #fff;
	}
.box .inner .content{
	-moz-transform:rotate(-20deg);
	-webkit-transform:rotate(-20deg);
	-o-transform:rotate(-20deg);
	width:500px;
	height:320px;
	margin-top:60px;
	margin-left:-80px;
	overflow:hidden;
	background:#f1f1f1;	
	}</pre>
<p>This trick is works best if applied to images (background images), but any content can be masked like this. <br />
  Also please note that it will take some <strong>tweaking  the margins</strong> to get the best result. What you need to have in mind that the content should be nicely presented in browsers that don&#8217;t support CSS rotation, just as in my example. </p>
<img src="http://feeds.feedburner.com/~r/cssglobe/~4/7EH7zcc6u6Q" height="1" width="1" alt=""/>]]></content:encoded>
         <category>Articles</category>
      </item>
      <item>
         <title>Vendor prefixes and web standards</title>
         <link>http://feedproxy.google.com/~r/cssglobe/~3/fSRnjyW3WxA/</link>
         <description>In it's original idea, standards should be a unique set of rules and coding recommendations applicable to all platforms, devices, browsers... Vendor prefixes couldn't be further away from that.</description>
         <guid isPermaLink="false"></guid>
         <pubDate>Tue, 21 Dec 2010 09:59:00 +0000</pubDate>
         <content:encoded><![CDATA[<p>When I started with the web development I was somewhat obsessed with web standards. The idea of having one set of rules  or recommendations on how to develop a web page seemed like the only way to go in my professional life. The one thing that really annoyed me back then (besides various IE fixes and hacks) was browser inconsistent JavaScript support. I was in a place where I had to tweak and adjust every script I made and test it over and over again. Then <a rel="nofollow" target="_blank" href="http://jquery.com">this great thing</a> came along  so I am not worried about that anymore. The inconsistencies are still there, I just have a marvelous piece of code that does the worrying for me. </p>
<p>Most of the CSS properties however were cross browser supported all along. Sure, there are some misinterpretations and missing support for pseudo element here and there (especially with old mastodons browsers) but the situations wasn&#8217;t nearly as complicated as with JavaScript. </p>
<p>Then the web began to change. New technologies were introduced, new buzzes&#8230; Browser developers started to experiment in supporting cool CSS properties that not only could change the appearance of an element, they could also control the behavior. <br />
  As a web developer I couldn&#8217;t be more excited about these new properties. If nothing, it brought us choices. We don&#8217;t have to use them, but if we want to, we can.</p>
<h3>Vendor prefixes</h3>
<p>But there is one thing that is far from ideal&#8230;<br />
In it&#8217;s original idea, standards should be a unique set of rules and coding recommendations applicable to all platforms, devices, browsers&#8230; Vendor prefixes couldn&#8217;t be <strong>further away from that</strong>. Applying a vendor prefix you target specific browser, so if you want to target another one, you either can&#8217;t or have to use another line of code with another &#8220;vendor prefixed&#8221; CSS property.</p>
<p>Take a look at this example</p>
<pre>.box{
	-moz-box-shadow: 10px 10px 5px #000;
	-webkit-box-shadow: 10px 10px 5px #000;
	box-shadow: 10px 10px 5px #880008;
}</pre>
<p>We all talk about IE hacks, how we hate it, how these are not complying to web standards, how they&#8217;re not valid&#8230; I am asking you, how is the example above <strong>different from these hacks? </strong></p>
<p>I am aware that prefixes were used by browsers to try on new experimental properties. I salute that, <strong>without  these great efforts we wouldn&#8217;t have progress</strong>. But do we have to keep the vendor prefixes for CSS properties that are not so experimental any more? Why don&#8217;t we have support for non prefixed properties now that some of the things are out of the experimental phase and more or less accepted?</p>
<p>Why are developers forced to write multiple lines of CSS for the same thing and when will it all be standardized? </p>
<p>In my opinion, <strong>vendor prefixes are unnecessary</strong>. If browsers want&#8217;s to experiment with new properties, what keeps them from doing so and use the &#8220;regular&#8221; naming conventions? It could even <strong>speed up the process of cross-browsers acceptance</strong>.</p>
<p>Let us know what do you think, I would really like to hear more thoughts on this one. </p>
<img src="http://feeds.feedburner.com/~r/cssglobe/~4/fSRnjyW3WxA" height="1" width="1" alt=""/>]]></content:encoded>
         <category>Articles</category>
      </item>
   </channel>
</rss>
<!-- fe1.yql.bf1.yahoo.com compressed/chunked Thu Oct  1 12:11:39 UTC 2015 -->
