<?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>Lecciones Prácticas &#187; Informática &#8211; web</title>
	<atom:link href="http://www.leccionespracticas.com/informatica-web/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.leccionespracticas.com</link>
	<description>informática y bibliotecas 2.0</description>
	<lastBuildDate>Mon, 06 Feb 2012 13:36:36 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
<xhtml:meta xmlns:xhtml="http://www.w3.org/1999/xhtml" name="robots" content="noindex" />
		<item>
		<title>Al compartir posts en facebook no salen las imagenes (thumbnails) [SOLUCIONADO]</title>
		<link>http://www.leccionespracticas.com/informatica-web/wordpress/al-compartir-posts-en-facebook-no-salen-las-imagenes-thumbnails-solucionado/</link>
		<comments>http://www.leccionespracticas.com/informatica-web/wordpress/al-compartir-posts-en-facebook-no-salen-las-imagenes-thumbnails-solucionado/#comments</comments>
		<pubDate>Thu, 02 Feb 2012 11:19:10 +0000</pubDate>
		<dc:creator>Miguel</dc:creator>
				<category><![CDATA[wordpress]]></category>
		<category><![CDATA[facebook]]></category>
		<category><![CDATA[images]]></category>
		<category><![CDATA[plugin]]></category>
		<category><![CDATA[thumbnails]]></category>

		<guid isPermaLink="false">http://www.leccionespracticas.com/?p=1964</guid>
		<description><![CDATA[Algo común cuando se usa el theme Twenty eleven de wordpress es que las imagenes de los posts no salen automáticamente al compartirlos en facebook. Vaya, que al poner el link a un post en el estado de facebook, éste no es capaz de leer las imagenes y mostrar el thumbnail. Sin entrar en consideraciones [...]
Related posts:<ol>
<li><a href='http://www.leccionespracticas.com/informatica-web/anadir-boton-de-facebook-dinamico-para-la-pagina-actual-solucionado/' rel='bookmark' title='Añadir botón de facebook dinámico (para la página actual) [SOLUCIONADO]'>Añadir botón de facebook dinámico (para la página actual) [SOLUCIONADO]</a></li>
<li><a href='http://www.leccionespracticas.com/uncategorized/ver-imagenes-de-imageshack-evitar-ranitas-solucionado/' rel='bookmark' title='Ver imágenes de imageshack (evitar ranitas) [solucionado]'>Ver imágenes de imageshack (evitar ranitas) [solucionado]</a></li>
<li><a href='http://www.leccionespracticas.com/informatica-web/drupal-how-to-add-a-share-in-facebook-link-without-ie8-crashing/' rel='bookmark' title='Drupal: how to add a &#8220;share in facebook&#8221; link without IE8 crashing'>Drupal: how to add a &#8220;share in facebook&#8221; link without IE8 crashing</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p>Algo común cuando se usa el theme <a href="http://theme.wordpress.com/themes/twentyeleven/">Twenty eleven</a> de <a href="/informatica-web/wordpress/">wordpress</a> es que <b>las imagenes de los posts no salen automáticamente al compartirlos en facebook</b>. Vaya, que al poner el link a un post en el estado de facebook, éste no es capaz de leer las imagenes y mostrar el <b>thumbnail</b>.</p>
<p>Sin entrar en consideraciones técnicas, lo más simple es que instaléis el <a href="http://wordpress.org/extend/plugins/add-facebook-share-thumbnail-meta/">plugin Add Facebook Share Thumbnail Meta</a>, lo activéis y&#8230; problema resuelto, solucionado <img src='http://www.leccionespracticas.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>Si queréis leer más sobre este tema, podéis hacerlo, en inglés, <a href="http://ansonalex.com/troubleshooting/fix-articles-linked-on-facebook-dont-display-thumbnails-images/">aqui</a></p>
<p>Related posts:<ol>
<li><a href='http://www.leccionespracticas.com/informatica-web/anadir-boton-de-facebook-dinamico-para-la-pagina-actual-solucionado/' rel='bookmark' title='Añadir botón de facebook dinámico (para la página actual) [SOLUCIONADO]'>Añadir botón de facebook dinámico (para la página actual) [SOLUCIONADO]</a></li>
<li><a href='http://www.leccionespracticas.com/uncategorized/ver-imagenes-de-imageshack-evitar-ranitas-solucionado/' rel='bookmark' title='Ver imágenes de imageshack (evitar ranitas) [solucionado]'>Ver imágenes de imageshack (evitar ranitas) [solucionado]</a></li>
<li><a href='http://www.leccionespracticas.com/informatica-web/drupal-how-to-add-a-share-in-facebook-link-without-ie8-crashing/' rel='bookmark' title='Drupal: how to add a &#8220;share in facebook&#8221; link without IE8 crashing'>Drupal: how to add a &#8220;share in facebook&#8221; link without IE8 crashing</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://www.leccionespracticas.com/informatica-web/wordpress/al-compartir-posts-en-facebook-no-salen-las-imagenes-thumbnails-solucionado/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>WordPress: show excerpts in the category or tag view [SOLVED]</title>
		<link>http://www.leccionespracticas.com/informatica-web/wordpress/wordpress-show-excerpts-in-the-category-or-tag-view-solved/</link>
		<comments>http://www.leccionespracticas.com/informatica-web/wordpress/wordpress-show-excerpts-in-the-category-or-tag-view-solved/#comments</comments>
		<pubDate>Fri, 27 Jan 2012 07:25:41 +0000</pubDate>
		<dc:creator>Miguel</dc:creator>
				<category><![CDATA[wordpress]]></category>
		<category><![CDATA[archive]]></category>
		<category><![CDATA[category]]></category>
		<category><![CDATA[display]]></category>
		<category><![CDATA[excerpt]]></category>
		<category><![CDATA[is_category]]></category>
		<category><![CDATA[tag]]></category>
		<category><![CDATA[theme]]></category>

		<guid isPermaLink="false">http://www.leccionespracticas.com/?p=1951</guid>
		<description><![CDATA[&#8220;I just want to only display the excerpt instead of the entire text of the post in the category / tag archives, how to achieve this?&#8221;. This is a common question of wordpress users. Well, the fix is really simple. Go to your working theme directory and look for content.php (or sometimes archive.php). You should [...]
Related posts:<ol>
<li><a href='http://www.leccionespracticas.com/informatica-web/wordpress/wordpress-yoast-seo-wp_comfy-theme-category-titles/' rel='bookmark' title='WordPress Yoast SEO + wp_comfy theme + Category titles'>WordPress Yoast SEO + wp_comfy theme + Category titles</a></li>
<li><a href='http://www.leccionespracticas.com/informatica-web/wordpress/wordpress-remove-category-and-other-permalinks-changes/' rel='bookmark' title='WordPress: remove /category'>WordPress: remove /category</a></li>
<li><a href='http://www.leccionespracticas.com/informatica-web/wordpress-ordenar-archive-php-por-fecha-con-query_posts/' rel='bookmark' title='wordpress: Ordenar archive.php por fecha con query_posts'>wordpress: Ordenar archive.php por fecha con query_posts</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p>&#8220;I just want to only display the excerpt instead of the entire text of the post in the category / tag archives, how to achieve this?&#8221;. This is a common question of wordpress users.</p>
<p>Well, the fix is really simple. Go to your working theme directory and look for content.php (or sometimes archive.php). You should see something like:</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span>is_search<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span> the_excerpt<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #b1b100;">else</span> the_content<span style="color: #009900;">&#40;</span>__<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'Read the rest of this entry &amp;raquo;'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">''</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span></pre></div></div>

<p>Or it might just be:</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span> is_search<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#41;</span> <span style="color: #339933;">:</span> <span style="color: #666666; font-style: italic;">// Only display Excerpts for Search ?&gt;</span></pre></div></div>

<p>Just change that to include the cases of displaying category archive (or tag archive), as in:</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span> is_category<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">||</span> is_tag<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">||</span> is_date<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">||</span> is_search<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#41;</span> <span style="color: #339933;">:</span> <span style="color: #666666; font-style: italic;">// Only display Excerpts for Tag Archive, Date Archive, and Search ?&gt;</span></pre></div></div>

<p>Upload the file to your server and you&#8217;re ready to go <img src='http://www.leccionespracticas.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>Related posts:<ol>
<li><a href='http://www.leccionespracticas.com/informatica-web/wordpress/wordpress-yoast-seo-wp_comfy-theme-category-titles/' rel='bookmark' title='WordPress Yoast SEO + wp_comfy theme + Category titles'>WordPress Yoast SEO + wp_comfy theme + Category titles</a></li>
<li><a href='http://www.leccionespracticas.com/informatica-web/wordpress/wordpress-remove-category-and-other-permalinks-changes/' rel='bookmark' title='WordPress: remove /category'>WordPress: remove /category</a></li>
<li><a href='http://www.leccionespracticas.com/informatica-web/wordpress-ordenar-archive-php-por-fecha-con-query_posts/' rel='bookmark' title='wordpress: Ordenar archive.php por fecha con query_posts'>wordpress: Ordenar archive.php por fecha con query_posts</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://www.leccionespracticas.com/informatica-web/wordpress/wordpress-show-excerpts-in-the-category-or-tag-view-solved/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Compass (IV): 100% height using 960.gs grid [SOLVED]</title>
		<link>http://www.leccionespracticas.com/informatica-web/compass-iv-100-height-solved/</link>
		<comments>http://www.leccionespracticas.com/informatica-web/compass-iv-100-height-solved/#comments</comments>
		<pubDate>Thu, 01 Dec 2011 12:52:20 +0000</pubDate>
		<dc:creator>Miguel</dc:creator>
				<category><![CDATA[Informática - web]]></category>
		<category><![CDATA[100% height;]]></category>
		<category><![CDATA[compass]]></category>
		<category><![CDATA[css]]></category>
		<category><![CDATA[layout]]></category>

		<guid isPermaLink="false">http://www.leccionespracticas.com/?p=1930</guid>
		<description><![CDATA[Ayer os comenté la forma de conseguir un sticky footer usando el grid 960.gs en Compass Sin embargo el ejemplo de ayer no completaba la altura del div de contenido (#content) hasta el footer: El ejemplo de hoy es muy similar, pero el contenido se extiende hasta alcanzar el footer (height 100% del elemento contenedor): [...]
Related posts:<ol>
<li><a href='http://www.leccionespracticas.com/informatica-web/compass-iii-sticky-footer-how-to-solved/' rel='bookmark' title='Compass (III): Sticky footer how to [SOLVED] [RESUELTO]'>Compass (III): Sticky footer how to [SOLVED] [RESUELTO]</a></li>
<li><a href='http://www.leccionespracticas.com/informatica-web/compass-ii-grid-de-24-columnas-listo-para-trabajar/' rel='bookmark' title='Compass (II): Grid de 24 columnas listo para trabajar'>Compass (II): Grid de 24 columnas listo para trabajar</a></li>
<li><a href='http://www.leccionespracticas.com/informatica-web/compass-i-instalacion-y-primeros-pasos/' rel='bookmark' title='Compass (I): instalación, primeros pasos y ejemplos básicos'>Compass (I): instalación, primeros pasos y ejemplos básicos</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p>Ayer os comenté <a href="http://www.leccionespracticas.com/informatica-web/compass-iii-sticky-footer-how-to-solved/">la forma de conseguir un sticky footer usando el grid 960.gs</a> en <a href="http://www.leccionespracticas.com/?s=compass&#038;search=">Compass</a></p>
<p>Sin embargo <a href="http://www.leccionespracticas.com/informatica-web/compass-iii-sticky-footer-how-to-solved/">el ejemplo de ayer</a><strong> no completaba la altura del div de contenido (<em>#content</em>) hasta el <em>footer</em></strong>:<br />
<a href="http://imageshack.us/photo/my-images/198/compassstickyfooter.jpg/" title="Compass SASS sticky footer using 960.gs grid layout (solved)" target="_blank"><img width="550px" border="0" src="http://img198.imageshack.us/img198/4439/compassstickyfooter.jpg" ></a></p>
<p>El ejemplo de hoy es muy similar, pero <strong>el contenido se extiende hasta alcanzar el footer</strong> (<em>height 100%</em> del elemento contenedor):<br />
<a target='_blank' title='960.gs with compass 100% height' href='http://imageshack.us/photo/my-images/94/compassstickyfooter100h.jpg/'><img src='http://img94.imageshack.us/img94/994/compassstickyfooter100h.jpg' border='0' width="550px"/></a></p>
<p>Fichero de marcado:</p>

<div class="wp_syntax"><div class="code"><pre class="xml" style="font-family:monospace;"><span style="color: #00bbdd;">&lt;!DOCTYPE html PUBLIC &quot;-//W3C//DTD XHTML 1.0 Transitional//EN&quot; &quot;http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd&quot;&gt;</span>
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;html</span> <span style="color: #000066;">xmlns</span>=<span style="color: #ff0000;">&quot;http://www.w3.org/1999/xhtml&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;head<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;meta</span> <span style="color: #000066;">http-equiv</span>=<span style="color: #ff0000;">&quot;Content-Type&quot;</span> <span style="color: #000066;">content</span>=<span style="color: #ff0000;">&quot;text/html; charset=utf-8&quot;</span> <span style="color: #000000; font-weight: bold;">/&gt;</span></span>
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;link</span> <span style="color: #000066;">href</span>=<span style="color: #ff0000;">&quot;./stylesheets/grid.css&quot;</span> <span style="color: #000066;">media</span>=<span style="color: #ff0000;">&quot;screen, projection&quot;</span> <span style="color: #000066;">rel</span>=<span style="color: #ff0000;">&quot;stylesheet&quot;</span> <span style="color: #000066;">type</span>=<span style="color: #ff0000;">&quot;text/css&quot;</span> <span style="color: #000000; font-weight: bold;">/&gt;</span></span>
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;link</span> <span style="color: #000066;">href</span>=<span style="color: #ff0000;">&quot;./stylesheets/text.css&quot;</span> <span style="color: #000066;">media</span>=<span style="color: #ff0000;">&quot;screen, projection&quot;</span> <span style="color: #000066;">rel</span>=<span style="color: #ff0000;">&quot;stylesheet&quot;</span> <span style="color: #000066;">type</span>=<span style="color: #ff0000;">&quot;text/css&quot;</span> <span style="color: #000000; font-weight: bold;">/&gt;</span></span>
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;title<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>Compass 24 column grid tutorial by Miguel Martín<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/title<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/head<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;body<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
	<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;div</span> <span style="color: #000066;">id</span>=<span style="color: #ff0000;">&quot;wrapper2&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>
	    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;div</span> <span style="color: #000066;">id</span>=<span style="color: #ff0000;">&quot;segundo&quot;</span> <span style="color: #000066;">class</span>=<span style="color: #ff0000;">&quot;container_24&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>  
        	<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;div</span> <span style="color: #000066;">id</span>=<span style="color: #ff0000;">&quot;header&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>
        		<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;p<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>This is the header<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/p<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
        	<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/div<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
        	<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;div</span> <span style="color: #000066;">id</span>=<span style="color: #ff0000;">&quot;left-sidebar&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>
        		<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;p<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>This is left<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/p<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
        	<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/div<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
        	<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;div</span> <span style="color: #000066;">id</span>=<span style="color: #ff0000;">&quot;main-content&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>
        		<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;p<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>This is main content<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/p<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
        	<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/div<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
        	<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;div</span> <span style="color: #000066;">id</span>=<span style="color: #ff0000;">&quot;right-sidebar&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>
        		<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;p<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>This is right<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/p<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
    		<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/div<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
       <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/div<span style="color: #000000; font-weight: bold;">&gt;</span></span></span> <span style="color: #808080; font-style: italic;">&lt;!-- /segundo --&gt;</span>
    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/div<span style="color: #000000; font-weight: bold;">&gt;</span></span></span> <span style="color: #808080; font-style: italic;">&lt;!-- /wrapper2 --&gt;</span>
&nbsp;
    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;div</span> <span style="color: #000066;">id</span>=<span style="color: #ff0000;">&quot;footer&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>
        	<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;p<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>This is footer<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/p<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/div<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/body<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/html<span style="color: #000000; font-weight: bold;">&gt;</span></span></span></pre></div></div>

<p>Fichero <em>grid.scss</em> (de estilo):</p>

<div class="wp_syntax"><div class="code"><pre class="css" style="font-family:monospace;">&nbsp;
<span style="color: #808080; font-style: italic;">/* Tutorial Compass (IV) 
 * Autor: Miguel Martin (miguelm[at]unizar[dot]es)
 * Más detalles: www.leccionespracticas.com
 */</span>
&nbsp;
<span style="color: #a1a100;">@import &quot;compass/reset&quot;;</span>
<span style="color: #a1a100;">@import &quot;960/grid&quot;;  </span>
&nbsp;
$ninesixty-columns<span style="color: #00AA00;">:</span> <span style="color: #cc66cc;">24</span><span style="color: #00AA00;">;</span>
$ninesixty-gutter-<span style="color: #000000; font-weight: bold;">width</span><span style="color: #00AA00;">:</span> <span style="color: #933;">10px</span><span style="color: #00AA00;">;</span>
&nbsp;
<span style="color: #6666ff;">.container_24</span> <span style="color: #00AA00;">&#123;</span>
  <span style="color: #a1a100;">@include grid-container;</span>
&nbsp;
  <span style="color: #000000; font-weight: bold;">background-image</span><span style="color: #00AA00;">:</span> <span style="color: #993333;">url</span><span style="color: #00AA00;">&#40;</span><span style="color: #ff0000; font-style: italic;">../img/24_col.gif</span><span style="color: #00AA00;">&#41;</span><span style="color: #00AA00;">;</span>
  <span style="color: #000000; font-weight: bold;">background-color</span><span style="color: #00AA00;">:</span> <span style="color: #cc00cc;">#fff</span><span style="color: #00AA00;">;</span>
  <span style="color: #000000; font-weight: bold;">background-repeat</span><span style="color: #00AA00;">:</span> <span style="color: #993333;">repeat-y</span><span style="color: #00AA00;">;</span>
&nbsp;
  <span style="color: #000000; font-weight: bold;">min-height</span><span style="color: #00AA00;">:</span> <span style="color: #933;">100%</span><span style="color: #00AA00;">;</span>
&nbsp;
  <span style="color: #cc00cc;">#header</span> <span style="color: #00AA00;">&#123;</span>
    <span style="color: #a1a100;">@include grid(24); </span>
  <span style="color: #00AA00;">&#125;</span>
&nbsp;
  <span style="color: #cc00cc;">#left-sidebar</span><span style="color: #00AA00;">&#123;</span>
  	<span style="color: #a1a100;">@include grid(4);</span>
  <span style="color: #00AA00;">&#125;</span>
&nbsp;
  <span style="color: #cc00cc;">#right-sidebar</span> <span style="color: #00AA00;">&#123;</span>
    <span style="color: #a1a100;">@include grid(4); </span>
  <span style="color: #00AA00;">&#125;</span>
&nbsp;
  <span style="color: #cc00cc;">#main-</span><span style="color: #000000; font-weight: bold;">content</span> <span style="color: #00AA00;">&#123;</span>
    <span style="color: #a1a100;">@include grid(16);</span>
  <span style="color: #00AA00;">&#125;</span> 
&nbsp;
<span style="color: #00AA00;">&#125;</span>
&nbsp;
<span style="color: #cc00cc;">#footer</span> <span style="color: #00AA00;">&#123;</span>
    <span style="color: #000000; font-weight: bold;">position</span><span style="color: #00AA00;">:</span> <span style="color: #993333;">relative</span><span style="color: #00AA00;">;</span>
    <span style="color: #000000; font-weight: bold;">margin-top</span><span style="color: #00AA00;">:</span> <span style="color: #933;">-50px</span><span style="color: #00AA00;">;</span> <span style="color: #808080; font-style: italic;">/* negative value of footer height */</span>
    <span style="color: #000000; font-weight: bold;">height</span><span style="color: #00AA00;">:</span> <span style="color: #933;">50px</span><span style="color: #00AA00;">;</span>
    <span style="color: #000000; font-weight: bold;">clear</span><span style="color: #00AA00;">:</span> <span style="color: #993333;">both</span><span style="color: #00AA00;">;</span>
	<span style="color: #000000; font-weight: bold;">background</span><span style="color: #00AA00;">:</span> <span style="color: #cc00cc;">#FFF</span><span style="color: #00AA00;">;</span>
	<span style="color: #000000; font-weight: bold;">margin-bottom</span><span style="color: #00AA00;">:</span> <span style="color: #933;">0px</span><span style="color: #00AA00;">;</span>
	<span style="color: #000000; font-weight: bold;">padding</span><span style="color: #00AA00;">:</span><span style="color: #933;">0px</span><span style="color: #00AA00;">;</span>
	<span style="color: #000000; font-weight: bold;">width</span><span style="color: #00AA00;">:</span> <span style="color: #933;">960px</span><span style="color: #00AA00;">;</span>
	<span style="color: #000000; font-weight: bold;">margin-left</span><span style="color: #00AA00;">:</span> <span style="color: #993333;">auto</span><span style="color: #00AA00;">;</span>
	<span style="color: #000000; font-weight: bold;">margin-right</span><span style="color: #00AA00;">:</span><span style="color: #993333;">auto</span><span style="color: #00AA00;">;</span>
&nbsp;
	p<span style="color: #00AA00;">&#123;</span>
		<span style="color: #000000; font-weight: bold;">padding</span><span style="color: #00AA00;">:</span> <span style="color: #933;">5px</span><span style="color: #00AA00;">;</span>
		<span style="color: #000000; font-weight: bold;">border</span><span style="color: #00AA00;">:</span> <span style="color: #933;">0px</span><span style="color: #00AA00;">;</span>
		<span style="color: #000000; font-weight: bold;">margin</span><span style="color: #00AA00;">:</span> <span style="color: #933;">0px</span><span style="color: #00AA00;">;</span>
	<span style="color: #00AA00;">&#125;</span>
<span style="color: #00AA00;">&#125;</span> 
&nbsp;
<span style="color: #808080; font-style: italic;">/* ---- con wrapper2 consigo height 100% en el contenedor de contenido ------ */</span>
<span style="color: #cc00cc;">#wrapper2</span><span style="color: #00AA00;">&#123;</span>
	<span style="color: #000000; font-weight: bold;">height</span><span style="color: #00AA00;">:</span><span style="color: #933;">100%</span><span style="color: #00AA00;">;</span>
	<span style="color: #000000; font-weight: bold;">margin-bottom</span><span style="color: #00AA00;">:</span> <span style="color: #933;">-50px</span><span style="color: #00AA00;">;</span>
	<span style="color: #000000; font-weight: bold;">background</span><span style="color: #00AA00;">:</span><span style="color: #cc00cc;">#333</span><span style="color: #00AA00;">;</span>
	<span style="color: #000000; font-weight: bold;">width</span><span style="color: #00AA00;">:</span><span style="color: #933;">960px</span><span style="color: #00AA00;">;</span>
	<span style="color: #000000; font-weight: bold;">margin-left</span><span style="color: #00AA00;">:</span><span style="color: #993333;">auto</span><span style="color: #00AA00;">;</span>
	<span style="color: #000000; font-weight: bold;">margin-right</span><span style="color: #00AA00;">:</span><span style="color: #993333;">auto</span><span style="color: #00AA00;">;</span>
<span style="color: #00AA00;">&#125;</span>
<span style="color: #808080; font-style: italic;">/* --------------------------------------------------------- */</span>
&nbsp;
<span style="color: #808080; font-style: italic;">/* General CSS settings */</span>
body <span style="color: #00AA00;">&#123;</span>
  <span style="color: #000000; font-weight: bold;">background</span><span style="color: #00AA00;">:</span> <span style="color: #cc00cc;">#123</span><span style="color: #00AA00;">;</span>
  <span style="color: #000000; font-weight: bold;">color</span><span style="color: #00AA00;">:</span> <span style="color: #cc00cc;">#333</span><span style="color: #00AA00;">;</span>
  <span style="color: #000000; font-weight: bold;">font-size</span><span style="color: #00AA00;">:</span> <span style="color: #933;">11px</span><span style="color: #00AA00;">;</span>
<span style="color: #00AA00;">&#125;</span>
&nbsp;
html<span style="color: #00AA00;">,</span> body<span style="color: #00AA00;">,</span> <span style="color: #cc00cc;">#wrapper</span> <span style="color: #00AA00;">&#123;</span><span style="color: #000000; font-weight: bold;">height</span><span style="color: #00AA00;">:</span> <span style="color: #933;">100%</span><span style="color: #00AA00;">;</span><span style="color: #00AA00;">&#125;</span>
&nbsp;
body <span style="color: #00AA00;">&gt;</span> <span style="color: #cc00cc;">#wrapper</span> <span style="color: #00AA00;">&#123;</span> <span style="color: #000000; font-weight: bold;">height</span><span style="color: #00AA00;">:</span> <span style="color: #993333;">auto</span><span style="color: #00AA00;">;</span> <span style="color: #000000; font-weight: bold;">min-height</span><span style="color: #00AA00;">:</span> <span style="color: #933;">100%</span><span style="color: #00AA00;">;</span> <span style="color: #00AA00;">&#125;</span>
&nbsp;
<span style="color: #cc00cc;">#content</span> <span style="color: #00AA00;">&#123;</span> <span style="color: #000000; font-weight: bold;">overflow</span><span style="color: #00AA00;">:</span> <span style="color: #993333;">auto</span><span style="color: #00AA00;">;</span> <span style="color: #000000; font-weight: bold;">padding-bottom</span><span style="color: #00AA00;">:</span> <span style="color: #933;">50px</span><span style="color: #00AA00;">;</span> <span style="color: #00AA00;">&#125;</span> 
&nbsp;
a <span style="color: #00AA00;">&#123;</span>
  <span style="color: #000000; font-weight: bold;">color</span><span style="color: #00AA00;">:</span> <span style="color: #cc00cc;">#fff</span><span style="color: #00AA00;">;</span>
  <span style="color: #000000; font-weight: bold;">text-decoration</span><span style="color: #00AA00;">:</span> <span style="color: #993333;">none</span><span style="color: #00AA00;">;</span>
<span style="color: #00AA00;">&#125;</span>
&nbsp;
a<span style="color: #3333ff;">:hover </span><span style="color: #00AA00;">&#123;</span>
  <span style="color: #000000; font-weight: bold;">text-decoration</span><span style="color: #00AA00;">:</span> <span style="color: #993333;">underline</span><span style="color: #00AA00;">;</span>
<span style="color: #00AA00;">&#125;</span>
&nbsp;
h1 <span style="color: #00AA00;">&#123;</span>
  <span style="color: #000000; font-weight: bold;">font-family</span><span style="color: #00AA00;">:</span> Georgia<span style="color: #00AA00;">,</span> <span style="color: #993333;">serif</span><span style="color: #00AA00;">;</span>
  <span style="color: #000000; font-weight: bold;">font-weight</span><span style="color: #00AA00;">:</span> <span style="color: #993333;">normal</span><span style="color: #00AA00;">;</span>
  <span style="color: #000000; font-weight: bold;">padding-top</span><span style="color: #00AA00;">:</span> <span style="color: #933;">20px</span><span style="color: #00AA00;">;</span>
  <span style="color: #000000; font-weight: bold;">text-align</span><span style="color: #00AA00;">:</span> <span style="color: #993333;">center</span><span style="color: #00AA00;">;</span>
  <span style="color: #000000; font-weight: bold;">background</span><span style="color: #00AA00;">:</span> <span style="color: #cc00cc;">#FFF</span><span style="color: #00AA00;">;</span>
<span style="color: #00AA00;">&#125;</span>
&nbsp;
h2 <span style="color: #00AA00;">&#123;</span>
  <span style="color: #000000; font-weight: bold;">padding-top</span><span style="color: #00AA00;">:</span> <span style="color: #933;">20px</span><span style="color: #00AA00;">;</span>
  <span style="color: #000000; font-weight: bold;">text-align</span><span style="color: #00AA00;">:</span> <span style="color: #993333;">center</span><span style="color: #00AA00;">;</span>
<span style="color: #00AA00;">&#125;</span>
&nbsp;
p <span style="color: #00AA00;">&#123;</span>
  <span style="color: #000000; font-weight: bold;">border</span><span style="color: #00AA00;">:</span> <span style="color: #933;">1px</span> <span style="color: #993333;">solid</span> <span style="color: #cc00cc;">#666</span><span style="color: #00AA00;">;</span>
  <span style="color: #000000; font-weight: bold;">overflow</span><span style="color: #00AA00;">:</span> <span style="color: #993333;">hidden</span><span style="color: #00AA00;">;</span>
  <span style="color: #000000; font-weight: bold;">padding</span><span style="color: #00AA00;">:</span> <span style="color: #933;">10px</span> <span style="color: #cc66cc;">0</span><span style="color: #00AA00;">;</span>
  <span style="color: #000000; font-weight: bold;">text-align</span><span style="color: #00AA00;">:</span> <span style="color: #993333;">center</span><span style="color: #00AA00;">;</span>
<span style="color: #00AA00;">&#125;</span>
&nbsp;
<span style="color: #808080; font-style: italic;">/* `Clear Floated Elements
----------------------------------------------------------------------------------------------------*/</span>
.<span style="color: #000000; font-weight: bold;">clear</span> <span style="color: #00AA00;">&#123;</span>
  <span style="color: #000000; font-weight: bold;">clear</span><span style="color: #00AA00;">:</span> <span style="color: #993333;">both</span><span style="color: #00AA00;">;</span>
  <span style="color: #000000; font-weight: bold;">display</span><span style="color: #00AA00;">:</span> <span style="color: #993333;">block</span><span style="color: #00AA00;">;</span>
  <span style="color: #000000; font-weight: bold;">overflow</span><span style="color: #00AA00;">:</span> <span style="color: #993333;">hidden</span><span style="color: #00AA00;">;</span>
  <span style="color: #000000; font-weight: bold;">visibility</span><span style="color: #00AA00;">:</span> <span style="color: #993333;">hidden</span><span style="color: #00AA00;">;</span>
  <span style="color: #000000; font-weight: bold;">width</span><span style="color: #00AA00;">:</span> <span style="color: #cc66cc;">0</span><span style="color: #00AA00;">;</span>
  <span style="color: #000000; font-weight: bold;">height</span><span style="color: #00AA00;">:</span> <span style="color: #cc66cc;">0</span><span style="color: #00AA00;">;</span>
<span style="color: #00AA00;">&#125;</span>
&nbsp;
&nbsp;
<span style="color: #6666ff;">.clearfix</span><span style="color: #3333ff;">:before</span><span style="color: #00AA00;">,</span>
<span style="color: #6666ff;">.clearfix</span><span style="color: #3333ff;">:after</span><span style="color: #00AA00;">,</span>
<span style="color: #6666ff;">.container_24</span><span style="color: #3333ff;">:before</span><span style="color: #00AA00;">,</span>
<span style="color: #6666ff;">.container_24</span><span style="color: #3333ff;">:after </span><span style="color: #00AA00;">&#123;</span>
  <span style="color: #000000; font-weight: bold;">content</span><span style="color: #00AA00;">:</span> <span style="color: #ff0000;">'.'</span><span style="color: #00AA00;">;</span>
  <span style="color: #000000; font-weight: bold;">display</span><span style="color: #00AA00;">:</span> <span style="color: #993333;">block</span><span style="color: #00AA00;">;</span>
  <span style="color: #000000; font-weight: bold;">overflow</span><span style="color: #00AA00;">:</span> <span style="color: #993333;">hidden</span><span style="color: #00AA00;">;</span>
  <span style="color: #000000; font-weight: bold;">visibility</span><span style="color: #00AA00;">:</span> <span style="color: #993333;">hidden</span><span style="color: #00AA00;">;</span>
  <span style="color: #000000; font-weight: bold;">font-size</span><span style="color: #00AA00;">:</span> <span style="color: #cc66cc;">0</span><span style="color: #00AA00;">;</span>
  <span style="color: #000000; font-weight: bold;">line-height</span><span style="color: #00AA00;">:</span> <span style="color: #cc66cc;">0</span><span style="color: #00AA00;">;</span>
  <span style="color: #000000; font-weight: bold;">width</span><span style="color: #00AA00;">:</span> <span style="color: #cc66cc;">0</span><span style="color: #00AA00;">;</span>
  <span style="color: #000000; font-weight: bold;">height</span><span style="color: #00AA00;">:</span> <span style="color: #cc66cc;">0</span><span style="color: #00AA00;">;</span>
<span style="color: #00AA00;">&#125;</span>
&nbsp;
<span style="color: #6666ff;">.clearfix</span><span style="color: #3333ff;">:after</span><span style="color: #00AA00;">,</span>
<span style="color: #6666ff;">.container_24</span><span style="color: #3333ff;">:after </span><span style="color: #00AA00;">&#123;</span>
  <span style="color: #000000; font-weight: bold;">clear</span><span style="color: #00AA00;">:</span> <span style="color: #993333;">both</span><span style="color: #00AA00;">;</span>
<span style="color: #00AA00;">&#125;</span>
&nbsp;
<span style="color: #808080; font-style: italic;">/*
  The following zoom:1 rule is specifically for IE6 + IE7.
  Move to separate stylesheet if invalid CSS is a problem.
*/</span>
&nbsp;
.clearfix<span style="color: #00AA00;">,</span>
<span style="color: #6666ff;">.container_24</span> <span style="color: #00AA00;">&#123;</span>
  zoom<span style="color: #00AA00;">:</span> <span style="color: #cc66cc;">1</span><span style="color: #00AA00;">;</span>
<span style="color: #00AA00;">&#125;</span></pre></div></div>

<p>Utilizando estos dos ejemplos como base se puede realizar de forma muy simple cualquier layout sobre un grid de anchura fija de 960px.</p>
<p>En próximos capítulos veremos las desventajas de utilizar grids de ancho fijo ahora que los tablets, móviles y demás aparatos de resoluciones dispares están conquistando el mercado.</p>
<p>Related posts:<ol>
<li><a href='http://www.leccionespracticas.com/informatica-web/compass-iii-sticky-footer-how-to-solved/' rel='bookmark' title='Compass (III): Sticky footer how to [SOLVED] [RESUELTO]'>Compass (III): Sticky footer how to [SOLVED] [RESUELTO]</a></li>
<li><a href='http://www.leccionespracticas.com/informatica-web/compass-ii-grid-de-24-columnas-listo-para-trabajar/' rel='bookmark' title='Compass (II): Grid de 24 columnas listo para trabajar'>Compass (II): Grid de 24 columnas listo para trabajar</a></li>
<li><a href='http://www.leccionespracticas.com/informatica-web/compass-i-instalacion-y-primeros-pasos/' rel='bookmark' title='Compass (I): instalación, primeros pasos y ejemplos básicos'>Compass (I): instalación, primeros pasos y ejemplos básicos</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://www.leccionespracticas.com/informatica-web/compass-iv-100-height-solved/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Compass (III): Sticky footer how to [SOLVED] [RESUELTO]</title>
		<link>http://www.leccionespracticas.com/informatica-web/compass-iii-sticky-footer-how-to-solved/</link>
		<comments>http://www.leccionespracticas.com/informatica-web/compass-iii-sticky-footer-how-to-solved/#comments</comments>
		<pubDate>Wed, 30 Nov 2011 12:50:10 +0000</pubDate>
		<dc:creator>Miguel</dc:creator>
				<category><![CDATA[Informática - web]]></category>
		<category><![CDATA[100%]]></category>
		<category><![CDATA[altura]]></category>
		<category><![CDATA[compass]]></category>
		<category><![CDATA[css]]></category>
		<category><![CDATA[height]]></category>
		<category><![CDATA[html]]></category>
		<category><![CDATA[markup]]></category>
		<category><![CDATA[pie]]></category>
		<category><![CDATA[sass]]></category>
		<category><![CDATA[sticky footer]]></category>

		<guid isPermaLink="false">http://www.leccionespracticas.com/?p=1924</guid>
		<description><![CDATA[Llevo unos posts hablando sobre Compass y me preguntaban vía mail cómo conseguir un sticky footer mediante este sistema. Bueno, me preguntaban cómo hacer que la altura de la página fuera 100%. Pero vamos, es lo mismo y se hace del mismo modo que se hace siempre: div para wrapper, div para content y el [...]
Related posts:<ol>
<li><a href='http://www.leccionespracticas.com/informatica-web/compass-iv-100-height-solved/' rel='bookmark' title='Compass (IV): 100% height using 960.gs grid [SOLVED]'>Compass (IV): 100% height using 960.gs grid [SOLVED]</a></li>
<li><a href='http://www.leccionespracticas.com/informatica-web/compass-ii-grid-de-24-columnas-listo-para-trabajar/' rel='bookmark' title='Compass (II): Grid de 24 columnas listo para trabajar'>Compass (II): Grid de 24 columnas listo para trabajar</a></li>
<li><a href='http://www.leccionespracticas.com/cds-invenio/invenio-css-sticky-footer-solved/' rel='bookmark' title='Invenio CSS &#8211; sticky footer [solved]'>Invenio CSS &#8211; sticky footer [solved]</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p>Llevo unos posts <a href="http://leccionespracticas.com/?s=compass&#038;search=">hablando sobre Compass</a> y me preguntaban vía mail cómo conseguir un <a href="http://leccionespracticas.com/?s=sticky+footer&#038;search=">sticky footer</a> mediante este sistema.</p>
<p>Bueno, me preguntaban <em>cómo hacer que la altura de la página fuera 100%</em>. Pero vamos, es lo mismo y se hace del mismo modo que se hace siempre: div para <em>wrapper</em>, div para <em>content </em>y el <em>footer </em>fuera. Pero veámoslo con un ejemplo:</p>

<div class="wp_syntax"><div class="code"><pre class="xml" style="font-family:monospace;"><span style="color: #00bbdd;">&lt;!DOCTYPE html PUBLIC &quot;-//W3C//DTD XHTML 1.0 Transitional//EN&quot; &quot;http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd&quot;&gt;</span>
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;html</span> <span style="color: #000066;">xmlns</span>=<span style="color: #ff0000;">&quot;http://www.w3.org/1999/xhtml&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;head<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;meta</span> <span style="color: #000066;">http-equiv</span>=<span style="color: #ff0000;">&quot;Content-Type&quot;</span> <span style="color: #000066;">content</span>=<span style="color: #ff0000;">&quot;text/html; charset=utf-8&quot;</span> <span style="color: #000000; font-weight: bold;">/&gt;</span></span>
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;link</span> <span style="color: #000066;">href</span>=<span style="color: #ff0000;">&quot;./stylesheets/grid.css&quot;</span> <span style="color: #000066;">media</span>=<span style="color: #ff0000;">&quot;screen, projection&quot;</span> <span style="color: #000066;">rel</span>=<span style="color: #ff0000;">&quot;stylesheet&quot;</span> <span style="color: #000066;">type</span>=<span style="color: #ff0000;">&quot;text/css&quot;</span> <span style="color: #000000; font-weight: bold;">/&gt;</span></span>
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;link</span> <span style="color: #000066;">href</span>=<span style="color: #ff0000;">&quot;./stylesheets/text.css&quot;</span> <span style="color: #000066;">media</span>=<span style="color: #ff0000;">&quot;screen, projection&quot;</span> <span style="color: #000066;">rel</span>=<span style="color: #ff0000;">&quot;stylesheet&quot;</span> <span style="color: #000066;">type</span>=<span style="color: #ff0000;">&quot;text/css&quot;</span> <span style="color: #000000; font-weight: bold;">/&gt;</span></span>
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;title<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>Compass 24 column grid tutorial by Miguel Martín<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/title<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/head<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;body<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
	<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;div</span> <span style="color: #000066;">id</span>=<span style="color: #ff0000;">&quot;wrapper&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>
	   <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;div</span> <span style="color: #000066;">id</span>=<span style="color: #ff0000;">&quot;content&quot;</span> <span style="color: #000066;">class</span>=<span style="color: #ff0000;">&quot;container_24&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>  
        	<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;div</span> <span style="color: #000066;">id</span>=<span style="color: #ff0000;">&quot;header&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>
        		<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;p<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>This is the header<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/p<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
        	<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/div<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
        	<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;div</span> <span style="color: #000066;">id</span>=<span style="color: #ff0000;">&quot;left-sidebar&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>
        		<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;p<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>This is left<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/p<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
        	<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/div<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
        	<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;div</span> <span style="color: #000066;">id</span>=<span style="color: #ff0000;">&quot;main-content&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>
        		<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;p<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>This is main content<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/p<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
        	<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/div<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
        	<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;div</span> <span style="color: #000066;">id</span>=<span style="color: #ff0000;">&quot;right-sidebar&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>
        		<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;p<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>This is right<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/p<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
    		<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/div<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
       <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/div<span style="color: #000000; font-weight: bold;">&gt;</span></span></span> <span style="color: #808080; font-style: italic;">&lt;!-- content --&gt;</span>
    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/div<span style="color: #000000; font-weight: bold;">&gt;</span></span></span> <span style="color: #808080; font-style: italic;">&lt;!-- /wrapper --&gt;</span>
&nbsp;
    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;div</span> <span style="color: #000066;">id</span>=<span style="color: #ff0000;">&quot;footer&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>
        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;p<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>This is footer<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/p<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/div<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/body<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/html<span style="color: #000000; font-weight: bold;">&gt;</span></span></span></pre></div></div>

<p>Y el <em>grid.scss</em> para 24 columnas sería</p>

<div class="wp_syntax"><div class="code"><pre class="css" style="font-family:monospace;"><span style="color: #808080; font-style: italic;">/* Tutorial Compass (III) - sticky footer resuelto
 * Autor: Miguel Martin (miguelm[at]unizar[dot]es)
 * Más detalles: www.leccionespracticas.com
 */</span>
&nbsp;
<span style="color: #a1a100;">@import &quot;compass/reset&quot;;</span>
<span style="color: #a1a100;">@import &quot;960/grid&quot;;  </span>
&nbsp;
$ninesixty-columns<span style="color: #00AA00;">:</span> <span style="color: #cc66cc;">24</span><span style="color: #00AA00;">;</span>
$ninesixty-gutter-<span style="color: #000000; font-weight: bold;">width</span><span style="color: #00AA00;">:</span> <span style="color: #933;">10px</span><span style="color: #00AA00;">;</span>
&nbsp;
<span style="color: #6666ff;">.container_24</span> <span style="color: #00AA00;">&#123;</span>
  <span style="color: #a1a100;">@include grid-container;</span>
&nbsp;
  <span style="color: #000000; font-weight: bold;">background-image</span><span style="color: #00AA00;">:</span> <span style="color: #993333;">url</span><span style="color: #00AA00;">&#40;</span><span style="color: #ff0000; font-style: italic;">../img/24_col.gif</span><span style="color: #00AA00;">&#41;</span><span style="color: #00AA00;">;</span>
  <span style="color: #000000; font-weight: bold;">background-color</span><span style="color: #00AA00;">:</span> <span style="color: #cc00cc;">#fff</span><span style="color: #00AA00;">;</span>
  <span style="color: #000000; font-weight: bold;">background-repeat</span><span style="color: #00AA00;">:</span> <span style="color: #993333;">repeat-y</span><span style="color: #00AA00;">;</span>
&nbsp;
  <span style="color: #cc00cc;">#header</span> <span style="color: #00AA00;">&#123;</span>
    <span style="color: #a1a100;">@include grid(24); </span>
  <span style="color: #00AA00;">&#125;</span>
&nbsp;
  <span style="color: #cc00cc;">#left-sidebar</span><span style="color: #00AA00;">&#123;</span>
  	<span style="color: #a1a100;">@include grid(4);</span>
  <span style="color: #00AA00;">&#125;</span>
&nbsp;
  <span style="color: #cc00cc;">#right-sidebar</span> <span style="color: #00AA00;">&#123;</span>
    <span style="color: #a1a100;">@include grid(4); </span>
  <span style="color: #00AA00;">&#125;</span>
&nbsp;
  <span style="color: #cc00cc;">#main-</span><span style="color: #000000; font-weight: bold;">content</span> <span style="color: #00AA00;">&#123;</span>
    <span style="color: #a1a100;">@include grid(16);</span>
  <span style="color: #00AA00;">&#125;</span> 
&nbsp;
<span style="color: #00AA00;">&#125;</span>
&nbsp;
<span style="color: #cc00cc;">#footer</span> <span style="color: #00AA00;">&#123;</span>
    <span style="color: #000000; font-weight: bold;">position</span><span style="color: #00AA00;">:</span> <span style="color: #993333;">relative</span><span style="color: #00AA00;">;</span>
    <span style="color: #000000; font-weight: bold;">margin-top</span><span style="color: #00AA00;">:</span> <span style="color: #933;">-150px</span><span style="color: #00AA00;">;</span> <span style="color: #808080; font-style: italic;">/* negative value of footer height */</span>
    <span style="color: #000000; font-weight: bold;">height</span><span style="color: #00AA00;">:</span> <span style="color: #933;">150px</span><span style="color: #00AA00;">;</span>
    <span style="color: #000000; font-weight: bold;">clear</span><span style="color: #00AA00;">:</span> <span style="color: #993333;">both</span><span style="color: #00AA00;">;</span>
	<span style="color: #000000; font-weight: bold;">background</span><span style="color: #00AA00;">:</span> <span style="color: #cc00cc;">#FFF</span><span style="color: #00AA00;">;</span>
	<span style="color: #000000; font-weight: bold;">margin-bottom</span><span style="color: #00AA00;">:</span> <span style="color: #933;">0px</span><span style="color: #00AA00;">;</span>
	<span style="color: #000000; font-weight: bold;">padding</span><span style="color: #00AA00;">:</span><span style="color: #933;">0px</span><span style="color: #00AA00;">;</span>
<span style="color: #00AA00;">&#125;</span> 
&nbsp;
&nbsp;
&nbsp;
<span style="color: #808080; font-style: italic;">/* General CSS settings */</span>
body <span style="color: #00AA00;">&#123;</span>
  <span style="color: #000000; font-weight: bold;">background</span><span style="color: #00AA00;">:</span> <span style="color: #cc00cc;">#123</span><span style="color: #00AA00;">;</span>
  <span style="color: #000000; font-weight: bold;">color</span><span style="color: #00AA00;">:</span> <span style="color: #cc00cc;">#333</span><span style="color: #00AA00;">;</span>
  <span style="color: #000000; font-weight: bold;">font-size</span><span style="color: #00AA00;">:</span> <span style="color: #933;">11px</span><span style="color: #00AA00;">;</span>
<span style="color: #00AA00;">&#125;</span>
&nbsp;
&nbsp;
html<span style="color: #00AA00;">,</span> body<span style="color: #00AA00;">,</span> <span style="color: #cc00cc;">#wrapper</span> <span style="color: #00AA00;">&#123;</span><span style="color: #000000; font-weight: bold;">height</span><span style="color: #00AA00;">:</span> <span style="color: #933;">100%</span><span style="color: #00AA00;">;</span><span style="color: #00AA00;">&#125;</span>
&nbsp;
body <span style="color: #00AA00;">&gt;</span> <span style="color: #cc00cc;">#wrapper</span> <span style="color: #00AA00;">&#123;</span> <span style="color: #000000; font-weight: bold;">height</span><span style="color: #00AA00;">:</span> <span style="color: #993333;">auto</span><span style="color: #00AA00;">;</span> <span style="color: #000000; font-weight: bold;">min-height</span><span style="color: #00AA00;">:</span> <span style="color: #933;">100%</span><span style="color: #00AA00;">;</span> <span style="color: #00AA00;">&#125;</span>
&nbsp;
<span style="color: #cc00cc;">#content</span> <span style="color: #00AA00;">&#123;</span> <span style="color: #000000; font-weight: bold;">overflow</span><span style="color: #00AA00;">:</span> <span style="color: #993333;">auto</span><span style="color: #00AA00;">;</span> <span style="color: #000000; font-weight: bold;">padding-bottom</span><span style="color: #00AA00;">:</span> <span style="color: #933;">150px</span><span style="color: #00AA00;">;</span> <span style="color: #00AA00;">&#125;</span> 
&nbsp;
a <span style="color: #00AA00;">&#123;</span>
  <span style="color: #000000; font-weight: bold;">color</span><span style="color: #00AA00;">:</span> <span style="color: #cc00cc;">#fff</span><span style="color: #00AA00;">;</span>
  <span style="color: #000000; font-weight: bold;">text-decoration</span><span style="color: #00AA00;">:</span> <span style="color: #993333;">none</span><span style="color: #00AA00;">;</span>
<span style="color: #00AA00;">&#125;</span>
&nbsp;
a<span style="color: #3333ff;">:hover </span><span style="color: #00AA00;">&#123;</span>
  <span style="color: #000000; font-weight: bold;">text-decoration</span><span style="color: #00AA00;">:</span> <span style="color: #993333;">underline</span><span style="color: #00AA00;">;</span>
<span style="color: #00AA00;">&#125;</span>
&nbsp;
h1 <span style="color: #00AA00;">&#123;</span>
  <span style="color: #000000; font-weight: bold;">font-family</span><span style="color: #00AA00;">:</span> Georgia<span style="color: #00AA00;">,</span> <span style="color: #993333;">serif</span><span style="color: #00AA00;">;</span>
  <span style="color: #000000; font-weight: bold;">font-weight</span><span style="color: #00AA00;">:</span> <span style="color: #993333;">normal</span><span style="color: #00AA00;">;</span>
  <span style="color: #000000; font-weight: bold;">padding-top</span><span style="color: #00AA00;">:</span> <span style="color: #933;">20px</span><span style="color: #00AA00;">;</span>
  <span style="color: #000000; font-weight: bold;">text-align</span><span style="color: #00AA00;">:</span> <span style="color: #993333;">center</span><span style="color: #00AA00;">;</span>
  <span style="color: #000000; font-weight: bold;">background</span><span style="color: #00AA00;">:</span> <span style="color: #cc00cc;">#FFF</span><span style="color: #00AA00;">;</span>
<span style="color: #00AA00;">&#125;</span>
&nbsp;
h2 <span style="color: #00AA00;">&#123;</span>
  <span style="color: #000000; font-weight: bold;">padding-top</span><span style="color: #00AA00;">:</span> <span style="color: #933;">20px</span><span style="color: #00AA00;">;</span>
  <span style="color: #000000; font-weight: bold;">text-align</span><span style="color: #00AA00;">:</span> <span style="color: #993333;">center</span><span style="color: #00AA00;">;</span>
<span style="color: #00AA00;">&#125;</span>
&nbsp;
p <span style="color: #00AA00;">&#123;</span>
  <span style="color: #000000; font-weight: bold;">border</span><span style="color: #00AA00;">:</span> <span style="color: #933;">1px</span> <span style="color: #993333;">solid</span> <span style="color: #cc00cc;">#666</span><span style="color: #00AA00;">;</span>
  <span style="color: #000000; font-weight: bold;">overflow</span><span style="color: #00AA00;">:</span> <span style="color: #993333;">hidden</span><span style="color: #00AA00;">;</span>
  <span style="color: #000000; font-weight: bold;">padding</span><span style="color: #00AA00;">:</span> <span style="color: #933;">10px</span> <span style="color: #cc66cc;">0</span><span style="color: #00AA00;">;</span>
  <span style="color: #000000; font-weight: bold;">text-align</span><span style="color: #00AA00;">:</span> <span style="color: #993333;">center</span><span style="color: #00AA00;">;</span>
<span style="color: #00AA00;">&#125;</span>
&nbsp;
<span style="color: #808080; font-style: italic;">/* `Clear Floated Elements
----------------------------------------------------------------------------------------------------*/</span>
.<span style="color: #000000; font-weight: bold;">clear</span> <span style="color: #00AA00;">&#123;</span>
  <span style="color: #000000; font-weight: bold;">clear</span><span style="color: #00AA00;">:</span> <span style="color: #993333;">both</span><span style="color: #00AA00;">;</span>
  <span style="color: #000000; font-weight: bold;">display</span><span style="color: #00AA00;">:</span> <span style="color: #993333;">block</span><span style="color: #00AA00;">;</span>
  <span style="color: #000000; font-weight: bold;">overflow</span><span style="color: #00AA00;">:</span> <span style="color: #993333;">hidden</span><span style="color: #00AA00;">;</span>
  <span style="color: #000000; font-weight: bold;">visibility</span><span style="color: #00AA00;">:</span> <span style="color: #993333;">hidden</span><span style="color: #00AA00;">;</span>
  <span style="color: #000000; font-weight: bold;">width</span><span style="color: #00AA00;">:</span> <span style="color: #cc66cc;">0</span><span style="color: #00AA00;">;</span>
  <span style="color: #000000; font-weight: bold;">height</span><span style="color: #00AA00;">:</span> <span style="color: #cc66cc;">0</span><span style="color: #00AA00;">;</span>
<span style="color: #00AA00;">&#125;</span>
&nbsp;
&nbsp;
<span style="color: #6666ff;">.clearfix</span><span style="color: #3333ff;">:before</span><span style="color: #00AA00;">,</span>
<span style="color: #6666ff;">.clearfix</span><span style="color: #3333ff;">:after</span><span style="color: #00AA00;">,</span>
<span style="color: #6666ff;">.container_24</span><span style="color: #3333ff;">:before</span><span style="color: #00AA00;">,</span>
<span style="color: #6666ff;">.container_24</span><span style="color: #3333ff;">:after </span><span style="color: #00AA00;">&#123;</span>
  <span style="color: #000000; font-weight: bold;">content</span><span style="color: #00AA00;">:</span> <span style="color: #ff0000;">'.'</span><span style="color: #00AA00;">;</span>
  <span style="color: #000000; font-weight: bold;">display</span><span style="color: #00AA00;">:</span> <span style="color: #993333;">block</span><span style="color: #00AA00;">;</span>
  <span style="color: #000000; font-weight: bold;">overflow</span><span style="color: #00AA00;">:</span> <span style="color: #993333;">hidden</span><span style="color: #00AA00;">;</span>
  <span style="color: #000000; font-weight: bold;">visibility</span><span style="color: #00AA00;">:</span> <span style="color: #993333;">hidden</span><span style="color: #00AA00;">;</span>
  <span style="color: #000000; font-weight: bold;">font-size</span><span style="color: #00AA00;">:</span> <span style="color: #cc66cc;">0</span><span style="color: #00AA00;">;</span>
  <span style="color: #000000; font-weight: bold;">line-height</span><span style="color: #00AA00;">:</span> <span style="color: #cc66cc;">0</span><span style="color: #00AA00;">;</span>
  <span style="color: #000000; font-weight: bold;">width</span><span style="color: #00AA00;">:</span> <span style="color: #cc66cc;">0</span><span style="color: #00AA00;">;</span>
  <span style="color: #000000; font-weight: bold;">height</span><span style="color: #00AA00;">:</span> <span style="color: #cc66cc;">0</span><span style="color: #00AA00;">;</span>
<span style="color: #00AA00;">&#125;</span>
&nbsp;
<span style="color: #6666ff;">.clearfix</span><span style="color: #3333ff;">:after</span><span style="color: #00AA00;">,</span>
<span style="color: #6666ff;">.container_24</span><span style="color: #3333ff;">:after </span><span style="color: #00AA00;">&#123;</span>
  <span style="color: #000000; font-weight: bold;">clear</span><span style="color: #00AA00;">:</span> <span style="color: #993333;">both</span><span style="color: #00AA00;">;</span>
<span style="color: #00AA00;">&#125;</span>
&nbsp;
<span style="color: #808080; font-style: italic;">/*
  The following zoom:1 rule is specifically for IE6 + IE7.
  Move to separate stylesheet if invalid CSS is a problem.
*/</span>
&nbsp;
.clearfix<span style="color: #00AA00;">,</span>
<span style="color: #6666ff;">.container_24</span> <span style="color: #00AA00;">&#123;</span>
  zoom<span style="color: #00AA00;">:</span> <span style="color: #cc66cc;">1</span><span style="color: #00AA00;">;</span>
<span style="color: #00AA00;">&#125;</span></pre></div></div>

<p>Y el resultado:<br />
<a target='_blank' title='Compass SASS sticky footer using 960.gs grid layout (solved)' href='http://imageshack.us/photo/my-images/198/compassstickyfooter.jpg/'><img src='http://img198.imageshack.us/img198/4439/compassstickyfooter.jpg' border='0' width='550px'/></a></p>
<p>Related posts:<ol>
<li><a href='http://www.leccionespracticas.com/informatica-web/compass-iv-100-height-solved/' rel='bookmark' title='Compass (IV): 100% height using 960.gs grid [SOLVED]'>Compass (IV): 100% height using 960.gs grid [SOLVED]</a></li>
<li><a href='http://www.leccionespracticas.com/informatica-web/compass-ii-grid-de-24-columnas-listo-para-trabajar/' rel='bookmark' title='Compass (II): Grid de 24 columnas listo para trabajar'>Compass (II): Grid de 24 columnas listo para trabajar</a></li>
<li><a href='http://www.leccionespracticas.com/cds-invenio/invenio-css-sticky-footer-solved/' rel='bookmark' title='Invenio CSS &#8211; sticky footer [solved]'>Invenio CSS &#8211; sticky footer [solved]</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://www.leccionespracticas.com/informatica-web/compass-iii-sticky-footer-how-to-solved/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Compass (II): Grid de 24 columnas listo para trabajar</title>
		<link>http://www.leccionespracticas.com/informatica-web/compass-ii-grid-de-24-columnas-listo-para-trabajar/</link>
		<comments>http://www.leccionespracticas.com/informatica-web/compass-ii-grid-de-24-columnas-listo-para-trabajar/#comments</comments>
		<pubDate>Wed, 30 Nov 2011 09:07:08 +0000</pubDate>
		<dc:creator>Miguel</dc:creator>
				<category><![CDATA[Informática - web]]></category>
		<category><![CDATA[24]]></category>
		<category><![CDATA[columns]]></category>
		<category><![CDATA[compass]]></category>
		<category><![CDATA[css]]></category>
		<category><![CDATA[design]]></category>
		<category><![CDATA[example]]></category>
		<category><![CDATA[grid]]></category>
		<category><![CDATA[html]]></category>
		<category><![CDATA[layout]]></category>
		<category><![CDATA[photoshop]]></category>
		<category><![CDATA[sass]]></category>
		<category><![CDATA[tutorial]]></category>

		<guid isPermaLink="false">http://www.leccionespracticas.com/?p=1912</guid>
		<description><![CDATA[Como ya vimos en la primera parte del tutorial de Compass este sistema facilita muchísimo la escritura, legibilidad y jerarquización de CSS. Los ejemplos de la primera parte del tutorial eran simplemente para entender los mecanismos de Compass+SASS. En esta segunda parte vamos a desarrollar un ejemplo más útil, que servirá para comenzar a diseñar [...]
Related posts:<ol>
<li><a href='http://www.leccionespracticas.com/informatica-web/compass-iv-100-height-solved/' rel='bookmark' title='Compass (IV): 100% height using 960.gs grid [SOLVED]'>Compass (IV): 100% height using 960.gs grid [SOLVED]</a></li>
<li><a href='http://www.leccionespracticas.com/informatica-web/compass-iii-sticky-footer-how-to-solved/' rel='bookmark' title='Compass (III): Sticky footer how to [SOLVED] [RESUELTO]'>Compass (III): Sticky footer how to [SOLVED] [RESUELTO]</a></li>
<li><a href='http://www.leccionespracticas.com/informatica-web/compass-i-instalacion-y-primeros-pasos/' rel='bookmark' title='Compass (I): instalación, primeros pasos y ejemplos básicos'>Compass (I): instalación, primeros pasos y ejemplos básicos</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p>Como <a href="http://www.leccionespracticas.com/informatica-web/compass-i-instalacion-y-primeros-pasos/">ya vimos en la primera parte del tutorial de Compass</a> este sistema facilita muchísimo la escritura, legibilidad y jerarquización de <strong>CSS</strong>.</p>
<p>Los ejemplos de la primera parte del tutorial eran simplemente para entender los mecanismos de <strong>Compass+SASS</strong>. En esta segunda parte vamos a desarrollar un ejemplo más útil, que servirá para comenzar a diseñar sobre él: un grid de 24 columnas con un <em>header</em>, <em>footer </em>y dos <em>sidebars</em>.</p>
<p>Lo que vamos a obtener es esto:<br />
<a target='_blank' title='Compass grid de 24 columnas tutorial por Miguel Martin' href='http://imageshack.us/photo/my-images/85/marcadobasico1.jpg/'><img src='http://img85.imageshack.us/img85/8338/marcadobasico1.jpg' border='0' width="550px"/></a></p>
<p>El fichero <em>index.html</em> que contiene el marcado html (aka <em>markup</em>) será realmente simple:</p>

<div class="wp_syntax"><div class="code"><pre class="xml" style="font-family:monospace;"><span style="color: #00bbdd;">&lt;!DOCTYPE html PUBLIC &quot;-//W3C//DTD XHTML 1.0 Transitional//EN&quot; &quot;http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd&quot;&gt;</span>
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;html</span> <span style="color: #000066;">xmlns</span>=<span style="color: #ff0000;">&quot;http://www.w3.org/1999/xhtml&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;head<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;meta</span> <span style="color: #000066;">http-equiv</span>=<span style="color: #ff0000;">&quot;Content-Type&quot;</span> <span style="color: #000066;">content</span>=<span style="color: #ff0000;">&quot;text/html; charset=utf-8&quot;</span> <span style="color: #000000; font-weight: bold;">/&gt;</span></span>
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;link</span> <span style="color: #000066;">href</span>=<span style="color: #ff0000;">&quot;./stylesheets/grid.css&quot;</span> <span style="color: #000066;">media</span>=<span style="color: #ff0000;">&quot;screen, projection&quot;</span> <span style="color: #000066;">rel</span>=<span style="color: #ff0000;">&quot;stylesheet&quot;</span> <span style="color: #000066;">type</span>=<span style="color: #ff0000;">&quot;text/css&quot;</span> <span style="color: #000000; font-weight: bold;">/&gt;</span></span>
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;link</span> <span style="color: #000066;">href</span>=<span style="color: #ff0000;">&quot;./stylesheets/text.css&quot;</span> <span style="color: #000066;">media</span>=<span style="color: #ff0000;">&quot;screen, projection&quot;</span> <span style="color: #000066;">rel</span>=<span style="color: #ff0000;">&quot;stylesheet&quot;</span> <span style="color: #000066;">type</span>=<span style="color: #ff0000;">&quot;text/css&quot;</span> <span style="color: #000000; font-weight: bold;">/&gt;</span></span>
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;title<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>Compass 24 column grid tutorial by Miguel Martín<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/title<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/head<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;body<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;h1<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>Ejemplo más completo de Compass+LASS<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/h1<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
	<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;div</span> <span style="color: #000066;">class</span>=<span style="color: #ff0000;">&quot;container_24&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>  
    	<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;div</span> <span style="color: #000066;">id</span>=<span style="color: #ff0000;">&quot;header&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>
        	<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;p<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>This is the header<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/p<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/div<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;div</span> <span style="color: #000066;">id</span>=<span style="color: #ff0000;">&quot;left-sidebar&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>
        	<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;p<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>This is left<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/p<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/div<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;div</span> <span style="color: #000066;">id</span>=<span style="color: #ff0000;">&quot;main-content&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>
        	<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;p<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>This is main content<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/p<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/div<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;div</span> <span style="color: #000066;">id</span>=<span style="color: #ff0000;">&quot;right-sidebar&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>
        	<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;p<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>This is right<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/p<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
    	<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/div<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;div</span> <span style="color: #000066;">id</span>=<span style="color: #ff0000;">&quot;footer&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>
        	<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;p<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>This is footer<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/p<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/div<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/div<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/body<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/html<span style="color: #000000; font-weight: bold;">&gt;</span></span></span></pre></div></div>

<p>En este caso nuestro fichero <em>grid.scss</em> va a contener varias cosas adicionales que no habíamos visto en la primera parte del tutorial.</p>
<p>Algunos ajustes básicos de estilo:</p>

<div class="wp_syntax"><div class="code"><pre class="css" style="font-family:monospace;">body <span style="color: #00AA00;">&#123;</span>
  <span style="color: #000000; font-weight: bold;">background</span><span style="color: #00AA00;">:</span> <span style="color: #cc00cc;">#123</span><span style="color: #00AA00;">;</span>
  <span style="color: #000000; font-weight: bold;">color</span><span style="color: #00AA00;">:</span> <span style="color: #cc00cc;">#333</span><span style="color: #00AA00;">;</span>
  <span style="color: #000000; font-weight: bold;">font-size</span><span style="color: #00AA00;">:</span> <span style="color: #933;">11px</span><span style="color: #00AA00;">;</span>
  <span style="color: #000000; font-weight: bold;">height</span><span style="color: #00AA00;">:</span> <span style="color: #993333;">auto</span><span style="color: #00AA00;">;</span>
  <span style="color: #000000; font-weight: bold;">padding-bottom</span><span style="color: #00AA00;">:</span> <span style="color: #933;">20px</span><span style="color: #00AA00;">;</span>
<span style="color: #00AA00;">&#125;</span>
&nbsp;
a <span style="color: #00AA00;">&#123;</span>
  <span style="color: #000000; font-weight: bold;">color</span><span style="color: #00AA00;">:</span> <span style="color: #cc00cc;">#fff</span><span style="color: #00AA00;">;</span>
  <span style="color: #000000; font-weight: bold;">text-decoration</span><span style="color: #00AA00;">:</span> <span style="color: #993333;">none</span><span style="color: #00AA00;">;</span>
<span style="color: #00AA00;">&#125;</span>
&nbsp;
a<span style="color: #3333ff;">:hover </span><span style="color: #00AA00;">&#123;</span>
  <span style="color: #000000; font-weight: bold;">text-decoration</span><span style="color: #00AA00;">:</span> <span style="color: #993333;">underline</span><span style="color: #00AA00;">;</span>
<span style="color: #00AA00;">&#125;</span>
&nbsp;
h1 <span style="color: #00AA00;">&#123;</span>
  <span style="color: #000000; font-weight: bold;">font-family</span><span style="color: #00AA00;">:</span> Georgia<span style="color: #00AA00;">,</span> <span style="color: #993333;">serif</span><span style="color: #00AA00;">;</span>
  <span style="color: #000000; font-weight: bold;">font-weight</span><span style="color: #00AA00;">:</span> <span style="color: #993333;">normal</span><span style="color: #00AA00;">;</span>
  <span style="color: #000000; font-weight: bold;">padding-top</span><span style="color: #00AA00;">:</span> <span style="color: #933;">20px</span><span style="color: #00AA00;">;</span>
  <span style="color: #000000; font-weight: bold;">text-align</span><span style="color: #00AA00;">:</span> <span style="color: #993333;">center</span><span style="color: #00AA00;">;</span>
  <span style="color: #000000; font-weight: bold;">background</span><span style="color: #00AA00;">:</span> <span style="color: #cc00cc;">#FFF</span><span style="color: #00AA00;">;</span>
<span style="color: #00AA00;">&#125;</span>
&nbsp;
h2 <span style="color: #00AA00;">&#123;</span>
  <span style="color: #000000; font-weight: bold;">padding-top</span><span style="color: #00AA00;">:</span> <span style="color: #933;">20px</span><span style="color: #00AA00;">;</span>
  <span style="color: #000000; font-weight: bold;">text-align</span><span style="color: #00AA00;">:</span> <span style="color: #993333;">center</span><span style="color: #00AA00;">;</span>
<span style="color: #00AA00;">&#125;</span>
&nbsp;
p <span style="color: #00AA00;">&#123;</span>
  <span style="color: #000000; font-weight: bold;">border</span><span style="color: #00AA00;">:</span> <span style="color: #933;">1px</span> <span style="color: #993333;">solid</span> <span style="color: #cc00cc;">#666</span><span style="color: #00AA00;">;</span>
  <span style="color: #000000; font-weight: bold;">overflow</span><span style="color: #00AA00;">:</span> <span style="color: #993333;">hidden</span><span style="color: #00AA00;">;</span>
  <span style="color: #000000; font-weight: bold;">padding</span><span style="color: #00AA00;">:</span> <span style="color: #933;">10px</span> <span style="color: #cc66cc;">0</span><span style="color: #00AA00;">;</span>
  <span style="color: #000000; font-weight: bold;">text-align</span><span style="color: #00AA00;">:</span> <span style="color: #993333;">center</span><span style="color: #00AA00;">;</span>
<span style="color: #00AA00;">&#125;</span></pre></div></div>

<p>Las reglas <strong><em>clearfix </em></strong>para un grid de 24 columnas:</p>

<div class="wp_syntax"><div class="code"><pre class="css" style="font-family:monospace;"><span style="color: #808080; font-style: italic;">/* `Clear Floated Elements
----------------------------------------------------------------------------------------------------*/</span>
&nbsp;
<span style="color: #808080; font-style: italic;">/* http://sonspring.com/journal/clearing-floats */</span>
&nbsp;
.<span style="color: #000000; font-weight: bold;">clear</span> <span style="color: #00AA00;">&#123;</span>
  <span style="color: #000000; font-weight: bold;">clear</span><span style="color: #00AA00;">:</span> <span style="color: #993333;">both</span><span style="color: #00AA00;">;</span>
  <span style="color: #000000; font-weight: bold;">display</span><span style="color: #00AA00;">:</span> <span style="color: #993333;">block</span><span style="color: #00AA00;">;</span>
  <span style="color: #000000; font-weight: bold;">overflow</span><span style="color: #00AA00;">:</span> <span style="color: #993333;">hidden</span><span style="color: #00AA00;">;</span>
  <span style="color: #000000; font-weight: bold;">visibility</span><span style="color: #00AA00;">:</span> <span style="color: #993333;">hidden</span><span style="color: #00AA00;">;</span>
  <span style="color: #000000; font-weight: bold;">width</span><span style="color: #00AA00;">:</span> <span style="color: #cc66cc;">0</span><span style="color: #00AA00;">;</span>
  <span style="color: #000000; font-weight: bold;">height</span><span style="color: #00AA00;">:</span> <span style="color: #cc66cc;">0</span><span style="color: #00AA00;">;</span>
<span style="color: #00AA00;">&#125;</span>
&nbsp;
<span style="color: #808080; font-style: italic;">/* http://www.yuiblog.com/blog/2010/09/27/clearfix-reloaded-overflowhidden-demystified */</span>
&nbsp;
<span style="color: #6666ff;">.clearfix</span><span style="color: #3333ff;">:before</span><span style="color: #00AA00;">,</span>
<span style="color: #6666ff;">.clearfix</span><span style="color: #3333ff;">:after</span><span style="color: #00AA00;">,</span>
<span style="color: #6666ff;">.container_24</span><span style="color: #3333ff;">:before</span><span style="color: #00AA00;">,</span>
<span style="color: #6666ff;">.container_24</span><span style="color: #3333ff;">:after </span><span style="color: #00AA00;">&#123;</span>
  <span style="color: #000000; font-weight: bold;">content</span><span style="color: #00AA00;">:</span> <span style="color: #ff0000;">'.'</span><span style="color: #00AA00;">;</span>
  <span style="color: #000000; font-weight: bold;">display</span><span style="color: #00AA00;">:</span> <span style="color: #993333;">block</span><span style="color: #00AA00;">;</span>
  <span style="color: #000000; font-weight: bold;">overflow</span><span style="color: #00AA00;">:</span> <span style="color: #993333;">hidden</span><span style="color: #00AA00;">;</span>
  <span style="color: #000000; font-weight: bold;">visibility</span><span style="color: #00AA00;">:</span> <span style="color: #993333;">hidden</span><span style="color: #00AA00;">;</span>
  <span style="color: #000000; font-weight: bold;">font-size</span><span style="color: #00AA00;">:</span> <span style="color: #cc66cc;">0</span><span style="color: #00AA00;">;</span>
  <span style="color: #000000; font-weight: bold;">line-height</span><span style="color: #00AA00;">:</span> <span style="color: #cc66cc;">0</span><span style="color: #00AA00;">;</span>
  <span style="color: #000000; font-weight: bold;">width</span><span style="color: #00AA00;">:</span> <span style="color: #cc66cc;">0</span><span style="color: #00AA00;">;</span>
  <span style="color: #000000; font-weight: bold;">height</span><span style="color: #00AA00;">:</span> <span style="color: #cc66cc;">0</span><span style="color: #00AA00;">;</span>
<span style="color: #00AA00;">&#125;</span>
&nbsp;
<span style="color: #6666ff;">.clearfix</span><span style="color: #3333ff;">:after</span><span style="color: #00AA00;">,</span>
<span style="color: #6666ff;">.container_24</span><span style="color: #3333ff;">:after </span><span style="color: #00AA00;">&#123;</span>
  <span style="color: #000000; font-weight: bold;">clear</span><span style="color: #00AA00;">:</span> <span style="color: #993333;">both</span><span style="color: #00AA00;">;</span>
<span style="color: #00AA00;">&#125;</span>
&nbsp;
<span style="color: #808080; font-style: italic;">/*
  The following zoom:1 rule is specifically for IE6 + IE7.
  Move to separate stylesheet if invalid CSS is a problem.
*/</span>
&nbsp;
.clearfix<span style="color: #00AA00;">,</span>
<span style="color: #6666ff;">.container_24</span> <span style="color: #00AA00;">&#123;</span>
  zoom<span style="color: #00AA00;">:</span> <span style="color: #cc66cc;">1</span><span style="color: #00AA00;">;</span>
<span style="color: #00AA00;">&#125;</span></pre></div></div>

<p>Y la parte <em>jugosa</em>, donde definiremos el <strong>grid de 24 columnas</strong> sobre el contenedor de 960px, centrado, con su margen (aka <em>gutter</em>) entre columnas (que no serán los 20px por defecto, sino 10px):</p>

<div class="wp_syntax"><div class="code"><pre class="css" style="font-family:monospace;">$ninesixty-columns<span style="color: #00AA00;">:</span> <span style="color: #cc66cc;">24</span><span style="color: #00AA00;">;</span> // grid de <span style="color: #cc66cc;">24</span> columnas...
$ninesixty-gutter-<span style="color: #000000; font-weight: bold;">width</span><span style="color: #00AA00;">:</span> <span style="color: #933;">10px</span><span style="color: #00AA00;">;</span> // separadas <span style="color: #933;">10px</span>...
&nbsp;
<span style="color: #6666ff;">.container_24</span> <span style="color: #00AA00;">&#123;</span>
  <span style="color: #a1a100;">@include grid-container;</span>
&nbsp;
  <span style="color: #000000; font-weight: bold;">background-image</span><span style="color: #00AA00;">:</span> <span style="color: #993333;">url</span><span style="color: #00AA00;">&#40;</span><span style="color: #ff0000; font-style: italic;">../img/24_col.gif</span><span style="color: #00AA00;">&#41;</span><span style="color: #00AA00;">;</span> // imagen con las franjas <span style="color: #ff0000;">&quot;rosas&quot;</span> de fondo
  <span style="color: #000000; font-weight: bold;">background-repeat</span><span style="color: #00AA00;">:</span> <span style="color: #993333;">repeat-y</span><span style="color: #00AA00;">;</span> // que se repite en horizontal...
  <span style="color: #000000; font-weight: bold;">background-color</span><span style="color: #00AA00;">:</span> <span style="color: #cc00cc;">#fff</span><span style="color: #00AA00;">;</span> // sobre un <span style="color: #000000; font-weight: bold;">color</span> de fondo blanco...
  <span style="color: #000000; font-weight: bold;">margin-bottom</span><span style="color: #00AA00;">:</span> <span style="color: #933;">20px</span><span style="color: #00AA00;">;</span>
&nbsp;
  <span style="color: #cc00cc;">#header</span><span style="color: #00AA00;">,</span> <span style="color: #cc00cc;">#footer</span> <span style="color: #00AA00;">&#123;</span>
    <span style="color: #a1a100;">@include grid(24); </span>
  <span style="color: #00AA00;">&#125;</span>
&nbsp;
  <span style="color: #cc00cc;">#left-sidebar</span><span style="color: #00AA00;">&#123;</span>
  	<span style="color: #a1a100;">@include grid(4);</span>
  <span style="color: #00AA00;">&#125;</span>
&nbsp;
  <span style="color: #cc00cc;">#right-sidebar</span> <span style="color: #00AA00;">&#123;</span>
    <span style="color: #a1a100;">@include grid(4); </span>
  <span style="color: #00AA00;">&#125;</span>
&nbsp;
  <span style="color: #cc00cc;">#main-</span><span style="color: #000000; font-weight: bold;">content</span> <span style="color: #00AA00;">&#123;</span>
    <span style="color: #a1a100;">@include grid(16);</span>
  <span style="color: #00AA00;">&#125;</span> 
<span style="color: #00AA00;">&#125;</span></pre></div></div>

<p>Y por último, dejo el fichero <em>grid.scss</em> completo:</p>

<div class="wp_syntax"><div class="code"><pre class="css" style="font-family:monospace;"><span style="color: #808080; font-style: italic;">/* Tutorial Compass (II) 
 * Autor: Miguel Martin (miguelm[at]unizar[dot]es)
 * Más detalles: www.leccionespracticas.com
 */</span>
&nbsp;
<span style="color: #a1a100;">@import &quot;compass/reset&quot;;</span>
<span style="color: #a1a100;">@import &quot;960/grid&quot;;  </span>
&nbsp;
$ninesixty-columns<span style="color: #00AA00;">:</span> <span style="color: #cc66cc;">24</span><span style="color: #00AA00;">;</span>
$ninesixty-gutter-<span style="color: #000000; font-weight: bold;">width</span><span style="color: #00AA00;">:</span> <span style="color: #933;">10px</span><span style="color: #00AA00;">;</span>
&nbsp;
body <span style="color: #00AA00;">&#123;</span>
  <span style="color: #000000; font-weight: bold;">background</span><span style="color: #00AA00;">:</span> <span style="color: #cc00cc;">#123</span><span style="color: #00AA00;">;</span>
  <span style="color: #000000; font-weight: bold;">color</span><span style="color: #00AA00;">:</span> <span style="color: #cc00cc;">#333</span><span style="color: #00AA00;">;</span>
  <span style="color: #000000; font-weight: bold;">font-size</span><span style="color: #00AA00;">:</span> <span style="color: #933;">11px</span><span style="color: #00AA00;">;</span>
  <span style="color: #000000; font-weight: bold;">height</span><span style="color: #00AA00;">:</span> <span style="color: #993333;">auto</span><span style="color: #00AA00;">;</span>
  <span style="color: #000000; font-weight: bold;">padding-bottom</span><span style="color: #00AA00;">:</span> <span style="color: #933;">20px</span><span style="color: #00AA00;">;</span>
<span style="color: #00AA00;">&#125;</span>
&nbsp;
a <span style="color: #00AA00;">&#123;</span>
  <span style="color: #000000; font-weight: bold;">color</span><span style="color: #00AA00;">:</span> <span style="color: #cc00cc;">#fff</span><span style="color: #00AA00;">;</span>
  <span style="color: #000000; font-weight: bold;">text-decoration</span><span style="color: #00AA00;">:</span> <span style="color: #993333;">none</span><span style="color: #00AA00;">;</span>
<span style="color: #00AA00;">&#125;</span>
&nbsp;
a<span style="color: #3333ff;">:hover </span><span style="color: #00AA00;">&#123;</span>
  <span style="color: #000000; font-weight: bold;">text-decoration</span><span style="color: #00AA00;">:</span> <span style="color: #993333;">underline</span><span style="color: #00AA00;">;</span>
<span style="color: #00AA00;">&#125;</span>
&nbsp;
h1 <span style="color: #00AA00;">&#123;</span>
  <span style="color: #000000; font-weight: bold;">font-family</span><span style="color: #00AA00;">:</span> Georgia<span style="color: #00AA00;">,</span> <span style="color: #993333;">serif</span><span style="color: #00AA00;">;</span>
  <span style="color: #000000; font-weight: bold;">font-weight</span><span style="color: #00AA00;">:</span> <span style="color: #993333;">normal</span><span style="color: #00AA00;">;</span>
  <span style="color: #000000; font-weight: bold;">padding-top</span><span style="color: #00AA00;">:</span> <span style="color: #933;">20px</span><span style="color: #00AA00;">;</span>
  <span style="color: #000000; font-weight: bold;">text-align</span><span style="color: #00AA00;">:</span> <span style="color: #993333;">center</span><span style="color: #00AA00;">;</span>
  <span style="color: #000000; font-weight: bold;">background</span><span style="color: #00AA00;">:</span> <span style="color: #cc00cc;">#FFF</span><span style="color: #00AA00;">;</span>
<span style="color: #00AA00;">&#125;</span>
&nbsp;
h2 <span style="color: #00AA00;">&#123;</span>
  <span style="color: #000000; font-weight: bold;">padding-top</span><span style="color: #00AA00;">:</span> <span style="color: #933;">20px</span><span style="color: #00AA00;">;</span>
  <span style="color: #000000; font-weight: bold;">text-align</span><span style="color: #00AA00;">:</span> <span style="color: #993333;">center</span><span style="color: #00AA00;">;</span>
<span style="color: #00AA00;">&#125;</span>
&nbsp;
p <span style="color: #00AA00;">&#123;</span>
  <span style="color: #000000; font-weight: bold;">border</span><span style="color: #00AA00;">:</span> <span style="color: #933;">1px</span> <span style="color: #993333;">solid</span> <span style="color: #cc00cc;">#666</span><span style="color: #00AA00;">;</span>
  <span style="color: #000000; font-weight: bold;">overflow</span><span style="color: #00AA00;">:</span> <span style="color: #993333;">hidden</span><span style="color: #00AA00;">;</span>
  <span style="color: #000000; font-weight: bold;">padding</span><span style="color: #00AA00;">:</span> <span style="color: #933;">10px</span> <span style="color: #cc66cc;">0</span><span style="color: #00AA00;">;</span>
  <span style="color: #000000; font-weight: bold;">text-align</span><span style="color: #00AA00;">:</span> <span style="color: #993333;">center</span><span style="color: #00AA00;">;</span>
<span style="color: #00AA00;">&#125;</span>
&nbsp;
<span style="color: #6666ff;">.container_24</span> <span style="color: #00AA00;">&#123;</span>
  <span style="color: #a1a100;">@include grid-container;</span>
&nbsp;
  <span style="color: #000000; font-weight: bold;">background-image</span><span style="color: #00AA00;">:</span> <span style="color: #993333;">url</span><span style="color: #00AA00;">&#40;</span><span style="color: #ff0000; font-style: italic;">../img/24_col.gif</span><span style="color: #00AA00;">&#41;</span><span style="color: #00AA00;">;</span>
  <span style="color: #000000; font-weight: bold;">background-color</span><span style="color: #00AA00;">:</span> <span style="color: #cc00cc;">#fff</span><span style="color: #00AA00;">;</span>
  <span style="color: #000000; font-weight: bold;">background-repeat</span><span style="color: #00AA00;">:</span> <span style="color: #993333;">repeat-y</span><span style="color: #00AA00;">;</span>
  <span style="color: #000000; font-weight: bold;">margin-bottom</span><span style="color: #00AA00;">:</span> <span style="color: #933;">20px</span><span style="color: #00AA00;">;</span>
&nbsp;
  <span style="color: #cc00cc;">#header</span><span style="color: #00AA00;">,</span> <span style="color: #cc00cc;">#footer</span> <span style="color: #00AA00;">&#123;</span>
    <span style="color: #a1a100;">@include grid(24); </span>
  <span style="color: #00AA00;">&#125;</span>
&nbsp;
  <span style="color: #cc00cc;">#left-sidebar</span><span style="color: #00AA00;">&#123;</span>
  	<span style="color: #a1a100;">@include grid(4);</span>
  <span style="color: #00AA00;">&#125;</span>
&nbsp;
  <span style="color: #cc00cc;">#right-sidebar</span> <span style="color: #00AA00;">&#123;</span>
    <span style="color: #a1a100;">@include grid(4); </span>
  <span style="color: #00AA00;">&#125;</span>
&nbsp;
  <span style="color: #cc00cc;">#main-</span><span style="color: #000000; font-weight: bold;">content</span> <span style="color: #00AA00;">&#123;</span>
    <span style="color: #a1a100;">@include grid(16);</span>
  <span style="color: #00AA00;">&#125;</span> 
<span style="color: #00AA00;">&#125;</span>
&nbsp;
<span style="color: #808080; font-style: italic;">/* `Clear Floated Elements
----------------------------------------------------------------------------------------------------*/</span>
&nbsp;
<span style="color: #808080; font-style: italic;">/* http://sonspring.com/journal/clearing-floats */</span>
&nbsp;
.<span style="color: #000000; font-weight: bold;">clear</span> <span style="color: #00AA00;">&#123;</span>
  <span style="color: #000000; font-weight: bold;">clear</span><span style="color: #00AA00;">:</span> <span style="color: #993333;">both</span><span style="color: #00AA00;">;</span>
  <span style="color: #000000; font-weight: bold;">display</span><span style="color: #00AA00;">:</span> <span style="color: #993333;">block</span><span style="color: #00AA00;">;</span>
  <span style="color: #000000; font-weight: bold;">overflow</span><span style="color: #00AA00;">:</span> <span style="color: #993333;">hidden</span><span style="color: #00AA00;">;</span>
  <span style="color: #000000; font-weight: bold;">visibility</span><span style="color: #00AA00;">:</span> <span style="color: #993333;">hidden</span><span style="color: #00AA00;">;</span>
  <span style="color: #000000; font-weight: bold;">width</span><span style="color: #00AA00;">:</span> <span style="color: #cc66cc;">0</span><span style="color: #00AA00;">;</span>
  <span style="color: #000000; font-weight: bold;">height</span><span style="color: #00AA00;">:</span> <span style="color: #cc66cc;">0</span><span style="color: #00AA00;">;</span>
<span style="color: #00AA00;">&#125;</span>
&nbsp;
<span style="color: #808080; font-style: italic;">/* http://www.yuiblog.com/blog/2010/09/27/clearfix-reloaded-overflowhidden-demystified */</span>
&nbsp;
<span style="color: #6666ff;">.clearfix</span><span style="color: #3333ff;">:before</span><span style="color: #00AA00;">,</span>
<span style="color: #6666ff;">.clearfix</span><span style="color: #3333ff;">:after</span><span style="color: #00AA00;">,</span>
<span style="color: #6666ff;">.container_24</span><span style="color: #3333ff;">:before</span><span style="color: #00AA00;">,</span>
<span style="color: #6666ff;">.container_24</span><span style="color: #3333ff;">:after </span><span style="color: #00AA00;">&#123;</span>
  <span style="color: #000000; font-weight: bold;">content</span><span style="color: #00AA00;">:</span> <span style="color: #ff0000;">'.'</span><span style="color: #00AA00;">;</span>
  <span style="color: #000000; font-weight: bold;">display</span><span style="color: #00AA00;">:</span> <span style="color: #993333;">block</span><span style="color: #00AA00;">;</span>
  <span style="color: #000000; font-weight: bold;">overflow</span><span style="color: #00AA00;">:</span> <span style="color: #993333;">hidden</span><span style="color: #00AA00;">;</span>
  <span style="color: #000000; font-weight: bold;">visibility</span><span style="color: #00AA00;">:</span> <span style="color: #993333;">hidden</span><span style="color: #00AA00;">;</span>
  <span style="color: #000000; font-weight: bold;">font-size</span><span style="color: #00AA00;">:</span> <span style="color: #cc66cc;">0</span><span style="color: #00AA00;">;</span>
  <span style="color: #000000; font-weight: bold;">line-height</span><span style="color: #00AA00;">:</span> <span style="color: #cc66cc;">0</span><span style="color: #00AA00;">;</span>
  <span style="color: #000000; font-weight: bold;">width</span><span style="color: #00AA00;">:</span> <span style="color: #cc66cc;">0</span><span style="color: #00AA00;">;</span>
  <span style="color: #000000; font-weight: bold;">height</span><span style="color: #00AA00;">:</span> <span style="color: #cc66cc;">0</span><span style="color: #00AA00;">;</span>
<span style="color: #00AA00;">&#125;</span>
&nbsp;
<span style="color: #6666ff;">.clearfix</span><span style="color: #3333ff;">:after</span><span style="color: #00AA00;">,</span>
<span style="color: #6666ff;">.container_24</span><span style="color: #3333ff;">:after </span><span style="color: #00AA00;">&#123;</span>
  <span style="color: #000000; font-weight: bold;">clear</span><span style="color: #00AA00;">:</span> <span style="color: #993333;">both</span><span style="color: #00AA00;">;</span>
<span style="color: #00AA00;">&#125;</span>
&nbsp;
<span style="color: #808080; font-style: italic;">/*
  The following zoom:1 rule is specifically for IE6 + IE7.
  Move to separate stylesheet if invalid CSS is a problem.
*/</span>
&nbsp;
.clearfix<span style="color: #00AA00;">,</span>
<span style="color: #6666ff;">.container_24</span> <span style="color: #00AA00;">&#123;</span>
  zoom<span style="color: #00AA00;">:</span> <span style="color: #cc66cc;">1</span><span style="color: #00AA00;">;</span>
<span style="color: #00AA00;">&#125;</span></pre></div></div>

<p>Si deseáis descargarlo de forma completa, podéis hacerlo aqui:<br />
<a href="http://hotfile.com/dl/136343062/0669bec/my_project.rar.html">DESCARGA EJEMPLO COMPLETO</a></p>
<h3>Un poco más</h3>
<p>Vamos a ver cómo <strong>añadir</strong>, por ejemplo, <strong>una tercera fila con contenido solo en la segunda columna</strong>. Debemos añadir una nueva clase (que llamaré <em>ancho1_desplazado1</em> y resultará en un ancho de 30px) con:</p>

<div class="wp_syntax"><div class="code"><pre class="css" style="font-family:monospace;">  .ancho1_desplazado1<span style="color: #00AA00;">&#123;</span>
 	<span style="color: #a1a100;">@include grid-prefix(1,24);</span>
  	<span style="color: #a1a100;">@include grid(1);</span>
  <span style="color: #00AA00;">&#125;</span></pre></div></div>

<p>Y añadir un nuevo div de esa clase en nuestro marcado&#8230;</p>

<div class="wp_syntax"><div class="code"><pre class="xml" style="font-family:monospace;"><span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;body<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;h1<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>Ejemplo más completo de Compass+LASS<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/h1<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;div</span> <span style="color: #000066;">class</span>=<span style="color: #ff0000;">&quot;container_24&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>  
    	<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;div</span> <span style="color: #000066;">id</span>=<span style="color: #ff0000;">&quot;header&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>
        	<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;p<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>This is the header<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/p<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/div<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;div</span> <span style="color: #000066;">id</span>=<span style="color: #ff0000;">&quot;left-sidebar&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>
        	<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;p<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>This is left<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/p<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/div<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;div</span> <span style="color: #000066;">id</span>=<span style="color: #ff0000;">&quot;main-content&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>
        	<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;p<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>This is main content<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/p<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/div<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;div</span> <span style="color: #000066;">id</span>=<span style="color: #ff0000;">&quot;right-sidebar&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>
        	<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;p<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>This is right<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/p<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
    	<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/div<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;div</span> <span style="color: #000066;">class</span>=<span style="color: #ff0000;">&quot;ancho1_desplazado1&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>
        	<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;p<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>A1<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/p<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/div<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>      
        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;div</span> <span style="color: #000066;">id</span>=<span style="color: #ff0000;">&quot;footer&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>
        	<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;p<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>This is footer<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/p<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/div<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/div<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/body<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/html<span style="color: #000000; font-weight: bold;">&gt;</span></span></span></pre></div></div>

<p>Y conseguiremos el efecto deseado:<br />
<a target='_blank' title='Compass, Sass and CSS grid layouts tutorial' href='http://imageshack.us/photo/my-images/705/marcadobasico2.jpg/'><img src='http://img705.imageshack.us/img705/5708/marcadobasico2.jpg' border='0' width="550px"/></a></p>
<h3>Utilizando Photoshop para hacer nuestro diseño</h3>
<p>Una vez visto cómo colocar elementos del ancho deseado en la posición deseada, podemos empezar a <strong>realizar nuestro diseño de página usando photoshop</strong>. Para ello abrimos un nuevo documento .psd y metemos la imagen rosa de fondo.</p>
<p><a target='_blank' title='Compass + SASS 24 column grid 960 px photoshop layout' href='http://imageshack.us/photo/my-images/703/grid24colsphotoshop.jpg/'><img src='http://img703.imageshack.us/img703/8628/grid24colsphotoshop.jpg' border='0' width='550px'/></a></p>
<p>A partir de este punto podemos realizar todo nuestro diseño sobre el fichero PSD y más adelante &#8220;traducirlo&#8221; a CSS <img src='http://www.leccionespracticas.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>Related posts:<ol>
<li><a href='http://www.leccionespracticas.com/informatica-web/compass-iv-100-height-solved/' rel='bookmark' title='Compass (IV): 100% height using 960.gs grid [SOLVED]'>Compass (IV): 100% height using 960.gs grid [SOLVED]</a></li>
<li><a href='http://www.leccionespracticas.com/informatica-web/compass-iii-sticky-footer-how-to-solved/' rel='bookmark' title='Compass (III): Sticky footer how to [SOLVED] [RESUELTO]'>Compass (III): Sticky footer how to [SOLVED] [RESUELTO]</a></li>
<li><a href='http://www.leccionespracticas.com/informatica-web/compass-i-instalacion-y-primeros-pasos/' rel='bookmark' title='Compass (I): instalación, primeros pasos y ejemplos básicos'>Compass (I): instalación, primeros pasos y ejemplos básicos</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://www.leccionespracticas.com/informatica-web/compass-ii-grid-de-24-columnas-listo-para-trabajar/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Compass (I): instalación, primeros pasos y ejemplos básicos</title>
		<link>http://www.leccionespracticas.com/informatica-web/compass-i-instalacion-y-primeros-pasos/</link>
		<comments>http://www.leccionespracticas.com/informatica-web/compass-i-instalacion-y-primeros-pasos/#comments</comments>
		<pubDate>Wed, 30 Nov 2011 07:48:59 +0000</pubDate>
		<dc:creator>Miguel</dc:creator>
				<category><![CDATA[Informática - web]]></category>
		<category><![CDATA[960]]></category>
		<category><![CDATA[compass]]></category>
		<category><![CDATA[css]]></category>
		<category><![CDATA[example]]></category>
		<category><![CDATA[layout]]></category>
		<category><![CDATA[sass]]></category>
		<category><![CDATA[tutorial]]></category>

		<guid isPermaLink="false">http://www.leccionespracticas.com/?p=1887</guid>
		<description><![CDATA[Si diseñas webs a menudo puede que estés cansado de estar haciendo tú mismo los CSS&#8217;s (y los cálculos que esto conlleva). Hay sistemas, como 960 grid que ayudan (y mucho) a construir grids sobre un contenedor de 960 px. ¿Por qué 960px? Porque es un número fácilmente divisible (resto entero entre dos, tres, cuatro, [...]
Related posts:<ol>
<li><a href='http://www.leccionespracticas.com/informatica-web/compass-ii-grid-de-24-columnas-listo-para-trabajar/' rel='bookmark' title='Compass (II): Grid de 24 columnas listo para trabajar'>Compass (II): Grid de 24 columnas listo para trabajar</a></li>
<li><a href='http://www.leccionespracticas.com/informatica-web/compass-iii-sticky-footer-how-to-solved/' rel='bookmark' title='Compass (III): Sticky footer how to [SOLVED] [RESUELTO]'>Compass (III): Sticky footer how to [SOLVED] [RESUELTO]</a></li>
<li><a href='http://www.leccionespracticas.com/informatica-web/compass-iv-100-height-solved/' rel='bookmark' title='Compass (IV): 100% height using 960.gs grid [SOLVED]'>Compass (IV): 100% height using 960.gs grid [SOLVED]</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p>Si diseñas webs a menudo puede que estés cansado de estar haciendo tú mismo los CSS&#8217;s (y los cálculos que esto conlleva). Hay sistemas, como <a href="http://960.gs/">960 grid</a> que ayudan (y mucho) a construir grids sobre un contenedor de 960 px. ¿Por qué 960px? Porque es un número fácilmente divisible (resto entero entre dos, tres, cuatro, cinco, etc)</p>
<p>Los sistemas como <em>960.gs</em> son muy cómodos de utilizar <a href="http://sixrevisions.com/web_design/the-960-grid-system-made-easy/">una vez entiendes el funcionamiento básico</a>, pero terminan generando un <em>markup </em>muy poco legible y sobrecargado de información de estilo, algo que va en contra de la filosofía de separar markup de información de estilos. </p>
<p>Un ejemplo (sacado de un proyecto real):</p>

<div class="wp_syntax"><div class="code"><pre class="xml" style="font-family:monospace;"><span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;div</span> <span style="color: #000066;">class</span>=<span style="color: #ff0000;">&quot;grid_6 push_3 suffix_2&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>
   <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;p<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>logo<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/p<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/div<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;div</span> <span style="color: #000066;">class</span>=<span style="color: #ff0000;">&quot;grid_2 prefix_3&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>
   <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;p<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>sometext<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/p<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/div<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
...</pre></div></div>

<p>Con <a href="http://compass-style.org">Compass</a> seguiremos manteniendo la comodidad de diseñar sobre un grid, pero obtendremos un marcado mucho mejor.</p>
<p>Por ejemplo, partiendo de esto:</p>

<div class="wp_syntax"><div class="code"><pre class="css" style="font-family:monospace;"><span style="color: #a1a100;">@import &quot;compass/utilities/general/clearfix&quot;;</span>
<span style="color: #a1a100;">@import &quot;960/grid&quot;;</span>
&nbsp;
$ninesixty_columns<span style="color: #00AA00;">:</span> <span style="color: #cc66cc;">16</span><span style="color: #00AA00;">;</span>
&nbsp;
<span style="color: #cc00cc;">#wrapper</span>
<span style="color: #00AA00;">&#123;</span>
  <span style="color: #a1a100;">@include grid_container;</span>
  <span style="color: #a1a100;">@include clearfix;</span>
<span style="color: #00AA00;">&#125;</span>
&nbsp;
<span style="color: #cc00cc;">#mast</span>
<span style="color: #00AA00;">&#123;</span>
  <span style="color: #a1a100;">@include grid(16);</span>
  <span style="color: #a1a100;">@include clearfix;</span>
  <span style="color: #000000; font-weight: bold;">background</span><span style="color: #00AA00;">:</span> <span style="color: #cc00cc;">#ddd</span><span style="color: #00AA00;">;</span>
&nbsp;
  <span style="color: #cc00cc;">#logo</span>
  <span style="color: #00AA00;">&#123;</span>
    <span style="color: #a1a100;">@include grid(6);</span>
    <span style="color: #a1a100;">@include alpha;</span>
  <span style="color: #00AA00;">&#125;</span>
&nbsp;
  <span style="color: #cc00cc;">#strapline</span>
  <span style="color: #00AA00;">&#123;</span>
    <span style="color: #a1a100;">@include grid(10);</span>
    <span style="color: #a1a100;">@include omega;</span>
  <span style="color: #00AA00;">&#125;</span>
<span style="color: #00AA00;">&#125;</span></pre></div></div>

<p>Terminaremos consiguiendo un fichero CSS renderizado tal que asi:</p>

<div class="wp_syntax"><div class="code"><pre class="css" style="font-family:monospace;"><span style="color: #808080; font-style: italic;">/* line 7, ../src/grid.scss */</span>
<span style="color: #cc00cc;">#wrapper</span> <span style="color: #00AA00;">&#123;</span>
  <span style="color: #000000; font-weight: bold;">margin-left</span><span style="color: #00AA00;">:</span> <span style="color: #993333;">auto</span><span style="color: #00AA00;">;</span>
  <span style="color: #000000; font-weight: bold;">margin-right</span><span style="color: #00AA00;">:</span> <span style="color: #993333;">auto</span><span style="color: #00AA00;">;</span>
  <span style="color: #000000; font-weight: bold;">width</span><span style="color: #00AA00;">:</span> <span style="color: #933;">960px</span><span style="color: #00AA00;">;</span>
  <span style="color: #000000; font-weight: bold;">overflow</span><span style="color: #00AA00;">:</span> <span style="color: #993333;">hidden</span><span style="color: #00AA00;">;</span>
  <span style="color: #000000; font-weight: bold;">display</span><span style="color: #00AA00;">:</span> inline-<span style="color: #993333;">block</span><span style="color: #00AA00;">;</span>
<span style="color: #00AA00;">&#125;</span>
<span style="color: #808080; font-style: italic;">/* line 8, ../../../../../Library/Ruby/Gems/1.8/gems/compass-0.10.0/frameworks/compass/... */</span>
<span style="color: #cc00cc;">#wrapper</span> <span style="color: #00AA00;">&#123;</span>
  <span style="color: #000000; font-weight: bold;">display</span><span style="color: #00AA00;">:</span> <span style="color: #993333;">block</span><span style="color: #00AA00;">;</span>
<span style="color: #00AA00;">&#125;</span>
&nbsp;
<span style="color: #808080; font-style: italic;">/* line 13, ../src/grid.scss */</span>
<span style="color: #cc00cc;">#mast</span> <span style="color: #00AA00;">&#123;</span>
  <span style="color: #000000; font-weight: bold;">display</span><span style="color: #00AA00;">:</span> <span style="color: #993333;">inline</span><span style="color: #00AA00;">;</span>
  <span style="color: #000000; font-weight: bold;">float</span><span style="color: #00AA00;">:</span> <span style="color: #000000; font-weight: bold;">left</span><span style="color: #00AA00;">;</span>
  <span style="color: #000000; font-weight: bold;">margin-left</span><span style="color: #00AA00;">:</span> <span style="color: #933;">10px</span><span style="color: #00AA00;">;</span>
  <span style="color: #000000; font-weight: bold;">margin-right</span><span style="color: #00AA00;">:</span> <span style="color: #933;">10px</span><span style="color: #00AA00;">;</span>
  <span style="color: #000000; font-weight: bold;">width</span><span style="color: #00AA00;">:</span> <span style="color: #933;">940px</span><span style="color: #00AA00;">;</span>
  <span style="color: #000000; font-weight: bold;">overflow</span><span style="color: #00AA00;">:</span> <span style="color: #993333;">hidden</span><span style="color: #00AA00;">;</span>
  <span style="color: #000000; font-weight: bold;">display</span><span style="color: #00AA00;">:</span> inline-<span style="color: #993333;">block</span><span style="color: #00AA00;">;</span>
  <span style="color: #000000; font-weight: bold;">background</span><span style="color: #00AA00;">:</span> <span style="color: #cc00cc;">#ddd</span><span style="color: #00AA00;">;</span>
<span style="color: #00AA00;">&#125;</span>
<span style="color: #808080; font-style: italic;">/* line 8, ../../../../../Library/Ruby/Gems/1.8/gems/compass-0.10.0/frameworks/compass/... */</span>
<span style="color: #cc00cc;">#mast</span> <span style="color: #00AA00;">&#123;</span>
  <span style="color: #000000; font-weight: bold;">display</span><span style="color: #00AA00;">:</span> <span style="color: #993333;">block</span><span style="color: #00AA00;">;</span>
<span style="color: #00AA00;">&#125;</span>
<span style="color: #808080; font-style: italic;">/* line 19, ../src/grid.scss */</span>
<span style="color: #cc00cc;">#mast</span> <span style="color: #cc00cc;">#logo</span> <span style="color: #00AA00;">&#123;</span>
  <span style="color: #000000; font-weight: bold;">display</span><span style="color: #00AA00;">:</span> <span style="color: #993333;">inline</span><span style="color: #00AA00;">;</span>
  <span style="color: #000000; font-weight: bold;">float</span><span style="color: #00AA00;">:</span> <span style="color: #000000; font-weight: bold;">left</span><span style="color: #00AA00;">;</span>
  <span style="color: #000000; font-weight: bold;">margin-left</span><span style="color: #00AA00;">:</span> <span style="color: #933;">10px</span><span style="color: #00AA00;">;</span>
  <span style="color: #000000; font-weight: bold;">margin-right</span><span style="color: #00AA00;">:</span> <span style="color: #933;">10px</span><span style="color: #00AA00;">;</span>
  <span style="color: #000000; font-weight: bold;">width</span><span style="color: #00AA00;">:</span> <span style="color: #933;">340px</span><span style="color: #00AA00;">;</span>
  <span style="color: #000000; font-weight: bold;">margin-left</span><span style="color: #00AA00;">:</span> <span style="color: #cc66cc;">0</span><span style="color: #00AA00;">;</span>
<span style="color: #00AA00;">&#125;</span>
<span style="color: #808080; font-style: italic;">/* line 25, ../src/grid.scss */</span>
<span style="color: #cc00cc;">#mast</span> <span style="color: #cc00cc;">#strapline</span> <span style="color: #00AA00;">&#123;</span>
  <span style="color: #000000; font-weight: bold;">display</span><span style="color: #00AA00;">:</span> <span style="color: #993333;">inline</span><span style="color: #00AA00;">;</span>
  <span style="color: #000000; font-weight: bold;">float</span><span style="color: #00AA00;">:</span> <span style="color: #000000; font-weight: bold;">left</span><span style="color: #00AA00;">;</span>
  <span style="color: #000000; font-weight: bold;">margin-left</span><span style="color: #00AA00;">:</span> <span style="color: #933;">10px</span><span style="color: #00AA00;">;</span>
  <span style="color: #000000; font-weight: bold;">margin-right</span><span style="color: #00AA00;">:</span> <span style="color: #933;">10px</span><span style="color: #00AA00;">;</span>
  <span style="color: #000000; font-weight: bold;">width</span><span style="color: #00AA00;">:</span> <span style="color: #933;">580px</span><span style="color: #00AA00;">;</span>
  <span style="color: #000000; font-weight: bold;">margin-right</span><span style="color: #00AA00;">:</span> <span style="color: #cc66cc;">0</span><span style="color: #00AA00;">;</span>
  <span style="color: #000000; font-weight: bold;">background</span><span style="color: #00AA00;">:</span> <span style="color: #993333;">red</span><span style="color: #00AA00;">;</span>
<span style="color: #00AA00;">&#125;</span></pre></div></div>

<p>¿Cómodo, eh?</p>
<h3>Instalando Compass</h3>
<p><em>Compass </em>necesita que tengas instalado <a href="http://es.wikipedia.org/wiki/Ruby">Ruby</a>. <a href="http://www.ruby-lang.org/en/downloads/">Existen múltiples instaladores de Ruby</a>. Si desarrollas en Windows, una de las formas más simples de instalar Ruby es <a href="http://rubyinstaller.org/downloads/">utilizar RubyInstaller</a>. Si desarrollas en MAC OS o en Linux/Unix, lo más cómodo es instalar Ruby utilizando <em>RVM</em> (<em>Ruby Version Manager</em>).</p>
<p>Una vez instalado, deberemos añadir al <em>PATH </em>la ruta donde hemos instalado Ruby. Por ejemplo, en mi caso, instalo en un Windows 7, en la ruta <em>c:\Ruby193</em> y añadiré al <em>PATH </em>(panel de control -> variables de entorno) este directorio.</p>
<p>Después abro una consola (Inicio -> Ejecutar -> Start command prompt with Ruby) y procedo a instalar <em>Compass </em>y el plugin <em>compass-960-plugin</em>:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">gem update <span style="color: #660033;">--system</span>
gem <span style="color: #c20cb9; font-weight: bold;">install</span> compass
gem <span style="color: #c20cb9; font-weight: bold;">install</span> compass-<span style="color: #000000;">960</span>-plugin</pre></div></div>

<h3>¿Dónde está la documentación del plugin 960gs para Compass?</h3>
<p>Puedes leerla en tu máquina al instalar el compass-960-plugin o consultar <a href="https://github.com/nextmat/compass-960-plugin/blob/master/README.mkdn">la documentación en línea</a> y <a href="https://github.com/nextmat/compass-960-plugin/blob/master/stylesheets/960/_grid.sass">las distintas opciones</a>.</p>
<h3>Creando nuestro primer proyecto con Compass</h3>
<p>Una vez instalado, vamos a crear un primer proyecto llamado <em>my_project</em> utilizando el plugin 960 para <em>Compass</em>.</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">compass create <span style="color: #660033;">-r</span> ninesixty my_project <span style="color: #660033;">--using</span> <span style="color: #000000;">960</span></pre></div></div>

<p>Producirá una salida tal que:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">directory my_project<span style="color: #000000; font-weight: bold;">/</span>
directory my_project<span style="color: #000000; font-weight: bold;">/</span>sass<span style="color: #000000; font-weight: bold;">/</span>
directory my_project<span style="color: #000000; font-weight: bold;">/</span>stylesheets<span style="color: #000000; font-weight: bold;">/</span>
   create my_project<span style="color: #000000; font-weight: bold;">/</span>config.rb
   create my_project<span style="color: #000000; font-weight: bold;">/</span>sass<span style="color: #000000; font-weight: bold;">/</span>grid.scss
   create my_project<span style="color: #000000; font-weight: bold;">/</span>sass<span style="color: #000000; font-weight: bold;">/</span>text.scss
   create my_project<span style="color: #000000; font-weight: bold;">/</span>stylesheets<span style="color: #000000; font-weight: bold;">/</span>grid.css
   create my_project<span style="color: #000000; font-weight: bold;">/</span>stylesheets<span style="color: #000000; font-weight: bold;">/</span>text.css
&nbsp;
<span style="color: #000000; font-weight: bold;">*********************************************************************</span>
Congratulations<span style="color: #000000; font-weight: bold;">!</span> Your compass project has been created.
&nbsp;
You may now add and edit sass stylesheets <span style="color: #000000; font-weight: bold;">in</span> the sass subdirectory of your project.
&nbsp;
Sass files beginning with an underscore are called partials and will not be compiled to CSS, but they can be imported into other sass stylesheets.
&nbsp;
You can configure your project by editing the config.rb configuration file. 
&nbsp;
You must compile your sass stylesheets <span style="color: #7a0874; font-weight: bold;">&#40;</span>.scss<span style="color: #7a0874; font-weight: bold;">&#41;</span> into CSS when they change.
This can be <span style="color: #000000; font-weight: bold;">done</span> <span style="color: #000000; font-weight: bold;">in</span> one of the following ways:
  <span style="color: #000000;">1</span>. To compile on demand:
     compass compile <span style="color: #7a0874; font-weight: bold;">&#91;</span>path<span style="color: #000000; font-weight: bold;">/</span>to<span style="color: #000000; font-weight: bold;">/</span>project<span style="color: #7a0874; font-weight: bold;">&#93;</span>
  <span style="color: #000000;">2</span>. To monitor your project <span style="color: #000000; font-weight: bold;">for</span> changes and automatically recompile:
     compass <span style="color: #c20cb9; font-weight: bold;">watch</span> <span style="color: #7a0874; font-weight: bold;">&#91;</span>path<span style="color: #000000; font-weight: bold;">/</span>to<span style="color: #000000; font-weight: bold;">/</span>project<span style="color: #7a0874; font-weight: bold;">&#93;</span>
&nbsp;
More Resources:
  <span style="color: #000000; font-weight: bold;">*</span> Website: http:<span style="color: #000000; font-weight: bold;">//</span>compass-style.org<span style="color: #000000; font-weight: bold;">/</span>
  <span style="color: #000000; font-weight: bold;">*</span> Sass: http:<span style="color: #000000; font-weight: bold;">//</span>sass-lang.com
  <span style="color: #000000; font-weight: bold;">*</span> Community: http:<span style="color: #000000; font-weight: bold;">//</span>groups.google.com<span style="color: #000000; font-weight: bold;">/</span>group<span style="color: #000000; font-weight: bold;">/</span>compass-users<span style="color: #000000; font-weight: bold;">/</span>
&nbsp;
&nbsp;
Please see the <span style="color: #000000;">960</span> website <span style="color: #000000; font-weight: bold;">for</span> documentation:
&nbsp;
    http:<span style="color: #000000; font-weight: bold;">//</span><span style="color: #000000;">960</span>.gs<span style="color: #000000; font-weight: bold;">/</span>
&nbsp;
To import your new stylesheets add the following lines of HTML <span style="color: #7a0874; font-weight: bold;">&#40;</span>or equivalent<span style="color: #7a0874; font-weight: bold;">&#41;</span> to your webpage:
<span style="color: #000000; font-weight: bold;">&lt;</span><span style="color: #c20cb9; font-weight: bold;">head</span><span style="color: #000000; font-weight: bold;">&gt;</span>
  <span style="color: #000000; font-weight: bold;">&lt;</span><span style="color: #c20cb9; font-weight: bold;">link</span> <span style="color: #007800;">href</span>=<span style="color: #ff0000;">&quot;/stylesheets/grid.css&quot;</span> <span style="color: #007800;">media</span>=<span style="color: #ff0000;">&quot;screen, projection&quot;</span> <span style="color: #007800;">rel</span>=<span style="color: #ff0000;">&quot;stylesheet&quot;</span> <span style="color: #007800;">type</span>=<span style="color: #ff0000;">&quot;text/css&quot;</span> <span style="color: #000000; font-weight: bold;">/&gt;</span>
  <span style="color: #000000; font-weight: bold;">&lt;</span><span style="color: #c20cb9; font-weight: bold;">link</span> <span style="color: #007800;">href</span>=<span style="color: #ff0000;">&quot;/stylesheets/text.css&quot;</span> <span style="color: #007800;">media</span>=<span style="color: #ff0000;">&quot;screen, projection&quot;</span> <span style="color: #007800;">rel</span>=<span style="color: #ff0000;">&quot;stylesheet&quot;</span> <span style="color: #007800;">type</span>=<span style="color: #ff0000;">&quot;text/css&quot;</span> <span style="color: #000000; font-weight: bold;">/&gt;</span>
<span style="color: #000000; font-weight: bold;">&lt;/</span><span style="color: #c20cb9; font-weight: bold;">head</span><span style="color: #000000; font-weight: bold;">&gt;</span></pre></div></div>

<p>Ya está el proyecto creado. Vamos a echar un vistazo a los ficheros que se han creado en <em>C:\Users\miguelm\my_project</em>:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">C:\Users\miguelm\my_project<span style="color: #000000; font-weight: bold;">&gt;</span><span style="color: #c20cb9; font-weight: bold;">dir</span>
<span style="color: #000000;">29</span><span style="color: #000000; font-weight: bold;">/</span><span style="color: #000000;">11</span><span style="color: #000000; font-weight: bold;">/</span><span style="color: #000000;">2011</span>  09:<span style="color: #000000;">47</span>    <span style="color: #000000; font-weight: bold;">&lt;</span>DIR<span style="color: #000000; font-weight: bold;">&gt;</span>          .
<span style="color: #000000;">29</span><span style="color: #000000; font-weight: bold;">/</span><span style="color: #000000;">11</span><span style="color: #000000; font-weight: bold;">/</span><span style="color: #000000;">2011</span>  09:<span style="color: #000000;">47</span>    <span style="color: #000000; font-weight: bold;">&lt;</span>DIR<span style="color: #000000; font-weight: bold;">&gt;</span>          ..
<span style="color: #000000;">29</span><span style="color: #000000; font-weight: bold;">/</span><span style="color: #000000;">11</span><span style="color: #000000; font-weight: bold;">/</span><span style="color: #000000;">2011</span>  09:<span style="color: #000000;">47</span>    <span style="color: #000000; font-weight: bold;">&lt;</span>DIR<span style="color: #000000; font-weight: bold;">&gt;</span>          .sass-cache
<span style="color: #000000;">29</span><span style="color: #000000; font-weight: bold;">/</span><span style="color: #000000;">11</span><span style="color: #000000; font-weight: bold;">/</span><span style="color: #000000;">2011</span>  09:<span style="color: #000000;">47</span>               <span style="color: #000000;">908</span> config.rb
<span style="color: #000000;">29</span><span style="color: #000000; font-weight: bold;">/</span><span style="color: #000000;">11</span><span style="color: #000000; font-weight: bold;">/</span><span style="color: #000000;">2011</span>  09:<span style="color: #000000;">47</span>    <span style="color: #000000; font-weight: bold;">&lt;</span>DIR<span style="color: #000000; font-weight: bold;">&gt;</span>          sass
<span style="color: #000000;">29</span><span style="color: #000000; font-weight: bold;">/</span><span style="color: #000000;">11</span><span style="color: #000000; font-weight: bold;">/</span><span style="color: #000000;">2011</span>  09:<span style="color: #000000;">47</span>    <span style="color: #000000; font-weight: bold;">&lt;</span>DIR<span style="color: #000000; font-weight: bold;">&gt;</span>          stylesheets</pre></div></div>

<p>En la carpeta sass tenemos los ficheros SIN compilar y en la carpeta <em>stylesheets </em>los ficheros compilados. Los settings del proyecto se pueden modificar editando el archivo <em>config.rb</em>. Por ejemplo, puedes indicar cuál es el <em>images_dir</em> o el <em>output_style</em> (si deseas CSS comprimido o sin comprimir), por ejemplo:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">...
images_dir = <span style="color: #ff0000;">&quot;public/images&quot;</span>
output_style = :compressed</pre></div></div>

<p>Para hacer el desarrollo más cómodo y que compass detecte y auto-compile los ficheros &#8220;al vuelo&#8221;, vamos a ejecutar:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">compass <span style="color: #c20cb9; font-weight: bold;">watch</span> my_project</pre></div></div>

<p>Y ya podemos empezar a editar los ficheros de <em>/sass/*.scss</em><br />
Por ejemplo, voy comentando los contenidos de <em>sass/grid.scss</em>:</p>

<div class="wp_syntax"><div class="code"><pre class="css" style="font-family:monospace;">&nbsp;
// importa los resets y algunas cosas básicas del grid
<span style="color: #a1a100;">@import &quot;compass/reset&quot;;</span>
<span style="color: #a1a100;">@import &quot;960/grid&quot;;</span>
&nbsp;
// Hay tres versiones del célebre <span style="color: #cc66cc;">960</span><span style="color: #6666ff;">.gs</span><span style="color: #00AA00;">,</span> en <span style="color: #cc66cc;">12</span><span style="color: #00AA00;">,</span> <span style="color: #cc66cc;">16</span> y <span style="color: #cc66cc;">24</span> columnas <span style="color: #00AA00;">&#40;</span>el que usaremos en el siguiente ejemplo<span style="color: #00AA00;">&#41;</span>
<span style="color: #6666ff;">.container_12</span> <span style="color: #00AA00;">&#123;</span>
  <span style="color: #a1a100;">@include grid-system(12); }</span>
&nbsp;
<span style="color: #6666ff;">.container_16</span> <span style="color: #00AA00;">&#123;</span>
  <span style="color: #a1a100;">@include grid-system(16); }</span>
&nbsp;
// La mayoría de nosotros estamos acostumbrados a diseñar layouts algo más semánticos <span style="color: #00AA00;">&#40;</span>por ejemplo<span style="color: #00AA00;">,</span> dos columnas<span style="color: #00AA00;">,</span> con header y footer<span style="color: #00AA00;">&#41;</span>
$ninesixty-columns<span style="color: #00AA00;">:</span> <span style="color: #cc66cc;">24</span><span style="color: #00AA00;">;</span>
&nbsp;
// El contenedor de todo será de clase two-column
<span style="color: #6666ff;">.two-column</span> <span style="color: #00AA00;">&#123;</span>
&nbsp;
  // La siguiente línea indica que queremos CENTRAR el contenedor
  <span style="color: #a1a100;">@include grid-container;</span>
&nbsp;
  // Comenzamos a describir nuestros id<span style="color: #ff0000;">'s...
  #header, #footer {
    @include grid(24); }
  #sidebar {
    @include grid(8); }
  #main-content {
    @include grid(16); } }</span></pre></div></div>

<p>Vamos a hacer una prueba creando el archivo de markup para este CSS:</p>

<div class="wp_syntax"><div class="code"><pre class="html" style="font-family:monospace;">&lt;!DOCTYPE html PUBLIC &quot;-//W3C//DTD XHTML 1.0 Transitional//EN&quot; &quot;http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd&quot;&gt;
&lt;html xmlns=&quot;http://www.w3.org/1999/xhtml&quot;&gt;
&lt;head&gt;
&lt;meta http-equiv=&quot;Content-Type&quot; content=&quot;text/html; charset=utf-8&quot; /&gt;
&lt;link href=&quot;./stylesheets/grid.css&quot; media=&quot;screen, projection&quot; rel=&quot;stylesheet&quot; type=&quot;text/css&quot; /&gt;
&lt;link href=&quot;./stylesheets/text.css&quot; media=&quot;screen, projection&quot; rel=&quot;stylesheet&quot; type=&quot;text/css&quot; /&gt;
&nbsp;
&lt;title&gt;My Project&lt;/title&gt;
&lt;/head&gt;
&nbsp;
&lt;body&gt;
	&lt;div class=&quot;two-column&quot;&gt;
    	  &lt;div id=&quot;header&quot;&gt;
        	This is the header
          &lt;/div&gt;
          &lt;div id=&quot;main-content&quot;&gt;
        	This is main-content
          &lt;/div&gt;
          &lt;div id=&quot;sidebar&quot;&gt;
        	This is sidebar
    	  &lt;/div&gt;
          &lt;div id=&quot;footer&quot;&gt;
        	This is footer
    	  &lt;/div&gt;  
    &lt;/div&gt;
&lt;/body&gt;
&lt;/html&gt;</pre></div></div>

<p>Con el markup anterior vemos que nuestro contenedor será de la clase &#8220;<em>two-column</em>&#8221; y estará dividido en 24 columnas.</p>
<p>Tanto el <em>header </em>como el <em>footer </em>tienen 24 columnas (<em>@include grid(24);</em>), es decir, ocuparán los 960px de ancho.</p>
<p>La barra lateral (#<em>sidebar</em>) ocupará 8 columnas (<em>@include grid(8);</em>) y la zona del contenido, 16 columnas (<em>@include grid(16);</em>).</p>
<p>Nótese que el total de columnas será SIEMPRE igual al valor del parámetro <em>$ninesixty-columns</em> (24, en este caso).</p>
<p>Para que veamos mejor el grid, voy a poner color negro de fondo a todos los div (y el texto en blanco). Para ello simplemente añado al archivo <em>grid.scss</em> las líneas 14 a 16:</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
</pre></td><td class="code"><pre class="xml" style="font-family:monospace;">/* 960 Grid System ~ Core CSS.
 * Learn more ~ http://960.gs/
 * *
 * Licensed under GPL and MIT. */
&nbsp;
@import &quot;compass/reset&quot;;
@import &quot;960/grid&quot;;
&nbsp;
// The following generates the default grids provided by the css version of 960.gs
.container_12 {
  @include grid-system(12); 
}
&nbsp;
.container_16 {
  @include grid-system(16); 
}
&nbsp;
// But most compass users prefer to construct semantic layouts like so (two column layout with header and footer):
&nbsp;
$ninesixty-columns: 24;
&nbsp;
*div{
	background: #000;
	color: #fff;
}
&nbsp;
.two-column {
&nbsp;
  @include grid-container;
&nbsp;
  #header, #footer {
    @include grid(24); 
&nbsp;
  }
  #sidebar {
    @include grid(8); 
  }
  #main-content {
    @include grid(16);
  } 
}</pre></td></tr></table></div>

<p>Guardamos el fichero.</p>
<p>Si nos fijamos en la consola que teníamos abierta, donde tecleamos <em>compass wathc my_project</em> veremos que ha detectado los cambios y sobreescrito <em>grid.css</em>.</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">&gt;&gt;&gt;</span> Change detected to: grid.scss
overwrite my_project<span style="color: #000000; font-weight: bold;">/</span>stylesheets<span style="color: #000000; font-weight: bold;">/</span>grid.css</pre></div></div>

<p>Al ver el ejemplo en nuestro navegador, observaremos algo tal que:<br />
<a target='_blank' title='Tutorial compass en español 1' href='http://imageshack.us/photo/my-images/32/marcadobasico1.jpg/'><img src='http://img32.imageshack.us/img32/8338/marcadobasico1.jpg' border='0' width='550px'/></a></p>
<p>Es feo, pero es un comienzo. Sigamos.</p>
<h3>Compass alpha y omega: Ajustando márgenes entre elementos</h3>
<p>Por defecto los bloques están separados 20px (cada uno tiene un <em>margin </em>de 10px). Podemos eliminar el margen entre elementos o bien al principio (<em>@include alpha;</em>) o bien al final (<em>@include omega;</em>) de los mismos.</p>
<p>Por ejemplo, para eliminar el margen al final de nuestro div main-content, añadimos <em>@include omega;</em> en el mismo&#8230;o añadimos <em>@include alpha;</em> en el sidebar.</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">...
<span style="color: #666666; font-style: italic;">#sidebar {</span>
    <span style="color: #000000; font-weight: bold;">@</span>include grid<span style="color: #7a0874; font-weight: bold;">&#40;</span><span style="color: #000000;">8</span><span style="color: #7a0874; font-weight: bold;">&#41;</span>; 
    <span style="color: #000000; font-weight: bold;">@</span>include alpha;
<span style="color: #7a0874; font-weight: bold;">&#125;</span>
...</pre></div></div>

<p><a target='_blank' title='Tutorial compass en español eliminar margenes' href='http://imageshack.us/photo/my-images/802/marcadobasico1.jpg/'><img src='http://img802.imageshack.us/img802/8338/marcadobasico1.jpg' border='0' width='550px'/></a></p>
<p>A continuación vamos a ver cómo sería un diseño en tres columnas usando 960 gs para Compass:</p>

<div class="wp_syntax"><div class="code"><pre class="xml" style="font-family:monospace;">/* This is grid.scss */
&nbsp;
@import &quot;compass/reset&quot;;
@import &quot;960/grid&quot;;
&nbsp;
// The following generates the default grids provided by the css version of 960.gs
.container_12 {
  @include grid-system(12); 
}
&nbsp;
.container_16 {
  @include grid-system(16); 
}
&nbsp;
// But most compass users prefer to construct semantic layouts like so (two column layout with header and footer):
&nbsp;
$ninesixty-columns: 24;
&nbsp;
*div{
	background: #000;
	color: #fff;
}
&nbsp;
.three-column {
&nbsp;
  @include grid-container;
&nbsp;
  #header, #footer {
    @include grid(24); 
&nbsp;
  }
&nbsp;
  #left-sidebar{
  	@include grid(4);
  }
&nbsp;
  #right-sidebar {
    @include grid(4); 
  }
&nbsp;
  #main-content {
    @include grid(16);
  } 
&nbsp;
}</pre></div></div>

<p>Y el marcado:</p>

<div class="wp_syntax"><div class="code"><pre class="xml" style="font-family:monospace;"><span style="color: #00bbdd;">&lt;!DOCTYPE html PUBLIC &quot;-//W3C//DTD XHTML 1.0 Transitional//EN&quot; &quot;http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd&quot;&gt;</span>
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;html</span> <span style="color: #000066;">xmlns</span>=<span style="color: #ff0000;">&quot;http://www.w3.org/1999/xhtml&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;head<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;meta</span> <span style="color: #000066;">http-equiv</span>=<span style="color: #ff0000;">&quot;Content-Type&quot;</span> <span style="color: #000066;">content</span>=<span style="color: #ff0000;">&quot;text/html; charset=utf-8&quot;</span> <span style="color: #000000; font-weight: bold;">/&gt;</span></span>
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;link</span> <span style="color: #000066;">href</span>=<span style="color: #ff0000;">&quot;./stylesheets/grid.css&quot;</span> <span style="color: #000066;">media</span>=<span style="color: #ff0000;">&quot;screen, projection&quot;</span> <span style="color: #000066;">rel</span>=<span style="color: #ff0000;">&quot;stylesheet&quot;</span> <span style="color: #000066;">type</span>=<span style="color: #ff0000;">&quot;text/css&quot;</span> <span style="color: #000000; font-weight: bold;">/&gt;</span></span>
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;link</span> <span style="color: #000066;">href</span>=<span style="color: #ff0000;">&quot;./stylesheets/text.css&quot;</span> <span style="color: #000066;">media</span>=<span style="color: #ff0000;">&quot;screen, projection&quot;</span> <span style="color: #000066;">rel</span>=<span style="color: #ff0000;">&quot;stylesheet&quot;</span> <span style="color: #000066;">type</span>=<span style="color: #ff0000;">&quot;text/css&quot;</span> <span style="color: #000000; font-weight: bold;">/&gt;</span></span>
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;title<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>My Project<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/title<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/head<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;body<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
	<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;div</span> <span style="color: #000066;">class</span>=<span style="color: #ff0000;">&quot;three-column&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>  
    	<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;div</span> <span style="color: #000066;">id</span>=<span style="color: #ff0000;">&quot;header&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>
        	This is the header
        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/div<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;div</span> <span style="color: #000066;">id</span>=<span style="color: #ff0000;">&quot;left-sidebar&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>
        	This is left
        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/div<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;div</span> <span style="color: #000066;">id</span>=<span style="color: #ff0000;">&quot;main-content&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>
        	This is main-content
        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/div<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;div</span> <span style="color: #000066;">id</span>=<span style="color: #ff0000;">&quot;right-sidebar&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>
        	This is right
    	<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/div<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;div</span> <span style="color: #000066;">id</span>=<span style="color: #ff0000;">&quot;footer&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>
             This is the footer                                      
    	<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/div<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/div<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/body<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/html<span style="color: #000000; font-weight: bold;">&gt;</span></span></span></pre></div></div>

<h3>Explorando más posibilidades</h3>
<p>En <a href="https://github.com/nextmat/compass-960-plugin/blob/master/README.mkdn">el README del compass-960-plugin</a> leemos:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">To create a grid system using only CSS, use the following semantic grid mixins:
&nbsp;
    Use the +grid-container mixin to <span style="color: #7a0874; font-weight: bold;">declare</span> your container element.
    Use the +grid<span style="color: #7a0874; font-weight: bold;">&#40;</span>N, columns, gutter-width<span style="color: #7a0874; font-weight: bold;">&#41;</span> mixin to <span style="color: #7a0874; font-weight: bold;">declare</span> a grid element.
    Use the +alpha and +omega mixins to <span style="color: #7a0874; font-weight: bold;">declare</span> the first and <span style="color: #c20cb9; font-weight: bold;">last</span> grid elements <span style="color: #000000; font-weight: bold;">for</span> a row.
    Use the +grid-prefix<span style="color: #7a0874; font-weight: bold;">&#40;</span>N, columns<span style="color: #7a0874; font-weight: bold;">&#41;</span> and +grid-suffix<span style="color: #7a0874; font-weight: bold;">&#40;</span>N, columns<span style="color: #7a0874; font-weight: bold;">&#41;</span> mixins to add empty grid columns before or after a grid element.
    Use the +grid-push<span style="color: #7a0874; font-weight: bold;">&#40;</span>N, columns<span style="color: #7a0874; font-weight: bold;">&#41;</span> and +grid-pull<span style="color: #7a0874; font-weight: bold;">&#40;</span>N, columns<span style="color: #7a0874; font-weight: bold;">&#41;</span> mixins to move a grid element from its default position.
&nbsp;
N is the number of grid columns to span <span style="color: #c20cb9; font-weight: bold;">as</span> <span style="color: #000000; font-weight: bold;">in</span> grid_N or push_N with the original <span style="color: #000000;">960</span> Grid System framework.</pre></div></div>

<p>Además de las ya exploradas @include grid(N) encontramos una forma útil de crear espacios negativos (vacíos) en el layout con @include grid-prefix(N,cols) y @include grid-suffix(N,cols).</p>
<p>Por ejemplo, vamos a crear una segunda fila en la que desplacemos 1 columna hacia la derecha el layout:</p>

<div class="wp_syntax"><div class="code"><pre class="xml" style="font-family:monospace;">/* 960 Grid System ~ Core CSS.
 * Learn more ~ http://960.gs/
 * *
 * Licensed under GPL and MIT. */
&nbsp;
@import &quot;compass/reset&quot;;
@import &quot;960/grid&quot;;
&nbsp;
// The following generates the default grids provided by the css version of 960.gs
.container_12 {
  @include grid-system(12); 
}
&nbsp;
.container_16 {
  @include grid-system(16); 
}
&nbsp;
// But most compass users prefer to construct semantic layouts like so (two column layout with header and footer):
&nbsp;
$ninesixty-columns: 24;
&nbsp;
*div{
	background: #000;
	color: #fff;
}
&nbsp;
.three-column {
&nbsp;
  @include grid-container;
&nbsp;
  #header, #footer {
    @include grid(24); 
&nbsp;
  }
&nbsp;
  #left-sidebar{
  	@include grid(4);
  }
&nbsp;
  #right-sidebar {
    @include grid(4); 
  }
&nbsp;
  #main-content {
    @include grid(16);
  } 
&nbsp;
  #left-sidebar-2{
  	@include grid(4);
        // extiendo 1 columna hacia la derecha de 24 totales...
        // Nótese que sigue sumando 24: 4(grid)+1(extensión)+3(right)+16(main-content2)
	@include grid-suffix(1,24);
  }
&nbsp;
  #right-sidebar-2 {
    @include grid(3); 
  }
&nbsp;
  #main-content-2 {
    @include grid(16);
  } 
}</pre></div></div>

<p>Y la salida que obtendremos:<br />
<a target='_blank' title='Extendiendo grid - Tutorial Compass XML' href='http://imageshack.us/photo/my-images/442/marcadobasico1.jpg/'><img src='http://img442.imageshack.us/img442/8338/marcadobasico1.jpg' border='0' width='550px'/></a></p>
<p>En próximos posts, haremos algún ejemplo real de uso de Compass <img src='http://www.leccionespracticas.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>Related posts:<ol>
<li><a href='http://www.leccionespracticas.com/informatica-web/compass-ii-grid-de-24-columnas-listo-para-trabajar/' rel='bookmark' title='Compass (II): Grid de 24 columnas listo para trabajar'>Compass (II): Grid de 24 columnas listo para trabajar</a></li>
<li><a href='http://www.leccionespracticas.com/informatica-web/compass-iii-sticky-footer-how-to-solved/' rel='bookmark' title='Compass (III): Sticky footer how to [SOLVED] [RESUELTO]'>Compass (III): Sticky footer how to [SOLVED] [RESUELTO]</a></li>
<li><a href='http://www.leccionespracticas.com/informatica-web/compass-iv-100-height-solved/' rel='bookmark' title='Compass (IV): 100% height using 960.gs grid [SOLVED]'>Compass (IV): 100% height using 960.gs grid [SOLVED]</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://www.leccionespracticas.com/informatica-web/compass-i-instalacion-y-primeros-pasos/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>vBulletin 4: Disable plugin/mod per style [SOLVED]</title>
		<link>http://www.leccionespracticas.com/informatica-web/vbulletin-informatica-web/vbulletin-4-disable-pluginmod-per-style-solved/</link>
		<comments>http://www.leccionespracticas.com/informatica-web/vbulletin-informatica-web/vbulletin-4-disable-pluginmod-per-style-solved/#comments</comments>
		<pubDate>Mon, 28 Nov 2011 11:40:36 +0000</pubDate>
		<dc:creator>Miguel</dc:creator>
				<category><![CDATA[vBulletin]]></category>
		<category><![CDATA[disable]]></category>
		<category><![CDATA[hook]]></category>
		<category><![CDATA[plugin]]></category>
		<category><![CDATA[product]]></category>
		<category><![CDATA[theme fetch]]></category>
		<category><![CDATA[vbulletin]]></category>

		<guid isPermaLink="false">http://www.leccionespracticas.com/?p=1881</guid>
		<description><![CDATA[Suppose you install a new vBulletin 4 plugin that affects all your styles. For instance, the Subforum maganer plugin I talked about some days ago. This Subforum manager plugin does NOT work with the mobile style included in vBulletin 4.1.8. If the mod has an on/off switch, then you can write a plugin to turn [...]
Related posts:<ol>
<li><a href='http://www.leccionespracticas.com/informatica-web/vbulletin-informatica-web/vbulletin-change-sticky-text-style-solved/' rel='bookmark' title='vBulletin: change sticky text style [SOLVED]'>vBulletin: change sticky text style [SOLVED]</a></li>
<li><a href='http://www.leccionespracticas.com/informatica-web/vbulletin-informatica-web/vbulletin-4-add-right-or-left-sidebar-solved/' rel='bookmark' title='vBulletin 4: Add right or left sidebar [SOLVED]'>vBulletin 4: Add right or left sidebar [SOLVED]</a></li>
<li><a href='http://www.leccionespracticas.com/informatica-web/vbulletin-informatica-web/vbulletin-4-1-7-instalar-spanish-language-pack-resuelto/' rel='bookmark' title='vBulletin 4.1.7 &#8211; Instalar spanish language pack [RESUELTO]'>vBulletin 4.1.7 &#8211; Instalar spanish language pack [RESUELTO]</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p>Suppose you install a new vBulletin 4 plugin that affects all your styles. For instance, the <a href="http://www.vbulletin.org/forum/showthread.php?threadid=229148">Subforum maganer plugin</a> I talked about <a href="http://www.leccionespracticas.com/informatica-web/vbulletin-informatica-web/vbulletin-how-to-list-subforums-in-new-line-not-comma-separated-solved/">some days ago</a>.</p>
<p>This <a href="http://www.leccionespracticas.com/informatica-web/vbulletin-informatica-web/vbulletin-how-to-list-subforums-in-new-line-not-comma-separated-solved/">Subforum manager plugin</a> does NOT work with the mobile style included in vBulletin 4.1.8.</p>
<p><strong>If the mod has an on/off switch, then you can write a plugin to turn off the mod when using styleid xx. You can use the hook location style_fetch for that. If the mod doesn&#8217;t have an on/off switch, then you will need to put a condition around the modification plugins themselves to turn them off for styleid xx.</strong></p>
<p>For instance, my mobile styleid is styleid=6 (if I type mysite.com/?styleid=6) I see the mobile theme.</p>
<p>Looking at the XML file for the product I want to disable for mobile style I notice this line which indicates there is indeed an option for activating/desactivating this product, <em>$vbulletin->options['sub_forum_manager']</em></p>

<div class="wp_syntax"><div class="code"><pre class="xml" style="font-family:monospace;"><span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;stylevardfns<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
	<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/stylevardfns<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
	<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;stylevars<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
	<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/stylevars<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
	<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;plugins<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
		<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;plugin</span> <span style="color: #000066;">active</span>=<span style="color: #ff0000;">&quot;1&quot;</span> <span style="color: #000066;">executionorder</span>=<span style="color: #ff0000;">&quot;5&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>
			<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;title<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>Sub-forum Manager (FORUMDISPLAY)<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/title<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
			<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;hookname<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>forumdisplay_complete<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/hookname<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
			<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;phpcode<span style="color: #000000; font-weight: bold;">&gt;</span></span></span><span style="color: #339933;">&lt;![CDATA[if ( $vbulletin-&gt;options['sub_forum_manager'] )</span></pre></div></div>

<p>I want to disable the product &#8216;Hasann &#8211; Sub-Forum Manager&#8217; for styleid=6 so I write a new plugin like this:</p>
<pre>
<strong>Product</strong>: Hassan - Sub-Forum-Manager
<strong>Hook</strong>: style_fetch
<strong>Title</strong>: DisableHassanForMobileStyle
<strong>Order</strong>: 1
<strong>PHP Code</strong>:
if ($styleid == 6){
  $vbulletin->options['sub_forum_manager'] = 0;
}
<strong>Active plugin</strong>: YES
</pre>
<p><a target='_blank' title='vbulletin disable plugin mod per style' href='http://imageshack.us/photo/my-images/411/pluginhook.jpg/'><img src='http://img411.imageshack.us/img411/3448/pluginhook.jpg' border='0' width='550px'/></a></p>
<p>Job done! </p>
<p>Related posts:<ol>
<li><a href='http://www.leccionespracticas.com/informatica-web/vbulletin-informatica-web/vbulletin-change-sticky-text-style-solved/' rel='bookmark' title='vBulletin: change sticky text style [SOLVED]'>vBulletin: change sticky text style [SOLVED]</a></li>
<li><a href='http://www.leccionespracticas.com/informatica-web/vbulletin-informatica-web/vbulletin-4-add-right-or-left-sidebar-solved/' rel='bookmark' title='vBulletin 4: Add right or left sidebar [SOLVED]'>vBulletin 4: Add right or left sidebar [SOLVED]</a></li>
<li><a href='http://www.leccionespracticas.com/informatica-web/vbulletin-informatica-web/vbulletin-4-1-7-instalar-spanish-language-pack-resuelto/' rel='bookmark' title='vBulletin 4.1.7 &#8211; Instalar spanish language pack [RESUELTO]'>vBulletin 4.1.7 &#8211; Instalar spanish language pack [RESUELTO]</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://www.leccionespracticas.com/informatica-web/vbulletin-informatica-web/vbulletin-4-disable-pluginmod-per-style-solved/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>vBulletin 4: Añadir páginas custom</title>
		<link>http://www.leccionespracticas.com/informatica-web/vbulletin-informatica-web/vbulletin-4-anadir-paginas-custom/</link>
		<comments>http://www.leccionespracticas.com/informatica-web/vbulletin-informatica-web/vbulletin-4-anadir-paginas-custom/#comments</comments>
		<pubDate>Thu, 17 Nov 2011 10:48:26 +0000</pubDate>
		<dc:creator>Miguel</dc:creator>
				<category><![CDATA[vBulletin]]></category>

		<guid isPermaLink="false">http://www.leccionespracticas.com/?p=1876</guid>
		<description><![CDATA[Imagina que quieres añadir a tu foro vBulletin una página con código HTML/PHP custom pero utilizando el sistema de plantillas de vBulletin. Para verlo, nada mejor que un ejemplo. Vamos a añadir una página de &#8216;Reglamento&#8217; a nuestro foro. Estos son los pasos que debes seguir: Creación del fichero reglamento.php Generamos un fichero llamado reglamento.php [...]
Related posts:<ol>
<li><a href='http://www.leccionespracticas.com/informatica-web/vbulletin-informatica-web/vbulletin-change-the-redirect-or-the-url-in-the-login-process/' rel='bookmark' title='vBulletin: change the redirect or the url in the login process'>vBulletin: change the redirect or the url in the login process</a></li>
<li><a href='http://www.leccionespracticas.com/informatica-web/anadir-boton-de-facebook-dinamico-para-la-pagina-actual-solucionado/' rel='bookmark' title='Añadir botón de facebook dinámico (para la página actual) [SOLUCIONADO]'>Añadir botón de facebook dinámico (para la página actual) [SOLUCIONADO]</a></li>
<li><a href='http://www.leccionespracticas.com/informatica-web/vbulletin-informatica-web/vbulletin-4-1-7-instalar-spanish-language-pack-resuelto/' rel='bookmark' title='vBulletin 4.1.7 &#8211; Instalar spanish language pack [RESUELTO]'>vBulletin 4.1.7 &#8211; Instalar spanish language pack [RESUELTO]</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p>Imagina que quieres añadir a tu foro vBulletin una página con código HTML/PHP custom pero utilizando el sistema de plantillas de vBulletin. Para verlo, nada mejor que un ejemplo. Vamos a añadir una página de &#8216;Reglamento&#8217; a nuestro foro.</p>
<p>Estos son los pasos que debes seguir:</p>
<h3>Creación del fichero reglamento.php</h3>
<p>Generamos un fichero llamado reglamento.php y lo subimos a la carpeta raiz de nuestro servidor. El contenido será tal que asi (sustituye &#8216;reglamento&#8217; por el titulo de tu pagina. Ojo! Es case-sensitive)</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">&lt;?php</span>
&nbsp;
<span style="color: #666666; font-style: italic;">// ####################### SET PHP ENVIRONMENT ###########################</span>
<span style="color: #990000;">error_reporting</span><span style="color: #009900;">&#40;</span><span style="color: #009900; font-weight: bold;">E_ALL</span> <span style="color: #339933;">&amp;</span> ~<span style="color: #009900; font-weight: bold;">E_NOTICE</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #666666; font-style: italic;">// #################### DEFINE IMPORTANT CONSTANTS #######################</span>
&nbsp;
<span style="color: #990000;">define</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'THIS_SCRIPT'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'reglamento'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #990000;">define</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'CSRF_PROTECTION'</span><span style="color: #339933;">,</span> <span style="color: #009900; font-weight: bold;">true</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>  
<span style="color: #666666; font-style: italic;">// change this depending on your filename</span>
&nbsp;
<span style="color: #666666; font-style: italic;">// ################### PRE-CACHE TEMPLATES AND DATA ######################</span>
<span style="color: #666666; font-style: italic;">// get special phrase groups</span>
<span style="color: #000088;">$phrasegroups</span> <span style="color: #339933;">=</span> <span style="color: #990000;">array</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #666666; font-style: italic;">// get special data templates from the datastore</span>
<span style="color: #000088;">$specialtemplates</span> <span style="color: #339933;">=</span> <span style="color: #990000;">array</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #666666; font-style: italic;">// pre-cache templates used by all actions</span>
<span style="color: #000088;">$globaltemplates</span> <span style="color: #339933;">=</span> <span style="color: #990000;">array</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'reglamento'</span><span style="color: #339933;">,</span>
<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #666666; font-style: italic;">// pre-cache templates used by specific actions</span>
<span style="color: #000088;">$actiontemplates</span> <span style="color: #339933;">=</span> <span style="color: #990000;">array</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #666666; font-style: italic;">// ######################### REQUIRE BACK-END ############################</span>
<span style="color: #666666; font-style: italic;">// if your page is outside of your normal vb forums directory, you should change directories by uncommenting the next line</span>
<span style="color: #666666; font-style: italic;">// chdir ('/path/to/your/forums');</span>
<span style="color: #b1b100;">require_once</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'./global.php'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #666666; font-style: italic;">// #######################################################################</span>
<span style="color: #666666; font-style: italic;">// ######################## START MAIN SCRIPT ############################</span>
<span style="color: #666666; font-style: italic;">// #######################################################################</span>
&nbsp;
<span style="color: #000088;">$navbits</span> <span style="color: #339933;">=</span> construct_navbits<span style="color: #009900;">&#40;</span><span style="color: #990000;">array</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">''</span> <span style="color: #339933;">=&gt;</span> <span style="color: #0000ff;">'Politica de privacidad'</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #000088;">$navbar</span> <span style="color: #339933;">=</span> render_navbar_template<span style="color: #009900;">&#40;</span><span style="color: #000088;">$navbits</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #666666; font-style: italic;">// ###### YOUR CUSTOM CODE GOES HERE #####</span>
<span style="color: #000088;">$pagetitle</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">'Reglamento (titulo de mi página custom)'</span><span style="color: #339933;">;</span>
&nbsp;
&nbsp;
&nbsp;
&nbsp;
<span style="color: #666666; font-style: italic;">// ###### NOW YOUR TEMPLATE IS BEING RENDERED ######</span>
&nbsp;
<span style="color: #000088;">$templater</span> <span style="color: #339933;">=</span> vB_Template<span style="color: #339933;">::</span><span style="color: #004000;">create</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'reglamento'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #000088;">$templater</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">register_page_templates</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #000088;">$templater</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">register</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'navbar'</span><span style="color: #339933;">,</span> <span style="color: #000088;">$navbar</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #000088;">$templater</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">register</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'pagetitle'</span><span style="color: #339933;">,</span> <span style="color: #000088;">$pagetitle</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
print_output<span style="color: #009900;">&#40;</span><span style="color: #000088;">$templater</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">render</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #000000; font-weight: bold;">?&gt;</span></pre></div></div>

<h3>Creación de nueva plantilla (template)</h3>
<p>Vamos al AdminControl Panel: <em>ACP > Estilos y Plantillas > Administrar estilos</em>, veremos el nombre del estilo que estamos utilizando en ese instante y en el desplegeable de la derecha pulsamos en &#8216;Añadir nueva plantilla&#8217;. </p>
<p>Nuestra plantilla se va a llamar &#8216;reglamento&#8217; (el mismo nombre que le dimos antes dentro del fichero reglamento.php).</p>
<p>Pegamos el código de la plantilla, donde irá la parte del custom HTML/PHP:</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #009900;">&#123;</span>vb<span style="color: #339933;">:</span>stylevar htmldoctype<span style="color: #009900;">&#125;</span>
<span style="color: #339933;">&lt;</span>html xmlns<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;http://www.w3.org/1999/xhtml&quot;</span> <span style="color: #990000;">dir</span><span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;{vb:stylevar textdirection}&quot;</span> lang<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;{vb:stylevar languagecode}&quot;</span> id<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;vbulletin_html&quot;</span><span style="color: #339933;">&gt;</span>
  <span style="color: #339933;">&lt;</span>head<span style="color: #339933;">&gt;</span>
    <span style="color: #339933;">&lt;</span>title<span style="color: #339933;">&gt;</span><span style="color: #009900;">&#123;</span>vb<span style="color: #339933;">:</span>raw vboptions<span style="color: #339933;">.</span>bbtitle<span style="color: #009900;">&#125;</span> <span style="color: #339933;">-</span> <span style="color: #009900;">&#123;</span>vb<span style="color: #339933;">:</span>raw pagetitle<span style="color: #009900;">&#125;</span><span style="color: #339933;">&lt;/</span>title<span style="color: #339933;">&gt;</span>
    <span style="color: #009900;">&#123;</span>vb<span style="color: #339933;">:</span>raw headinclude<span style="color: #009900;">&#125;</span>
    <span style="color: #009900;">&#123;</span>vb<span style="color: #339933;">:</span>raw headinclude_bottom<span style="color: #009900;">&#125;</span>
  <span style="color: #339933;">&lt;/</span>head<span style="color: #339933;">&gt;</span>
  <span style="color: #339933;">&lt;</span>body<span style="color: #339933;">&gt;</span>
&nbsp;
    <span style="color: #009900;">&#123;</span>vb<span style="color: #339933;">:</span>raw <span style="color: #990000;">header</span><span style="color: #009900;">&#125;</span>
&nbsp;
    <span style="color: #009900;">&#123;</span>vb<span style="color: #339933;">:</span>raw navbar<span style="color: #009900;">&#125;</span>
&nbsp;
    <span style="color: #339933;">&lt;</span>div id<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;pagetitle&quot;</span><span style="color: #339933;">&gt;</span>
      <span style="color: #339933;">&lt;</span>h1<span style="color: #339933;">&gt;</span><span style="color: #009900;">&#123;</span>vb<span style="color: #339933;">:</span>raw pagetitle<span style="color: #009900;">&#125;</span><span style="color: #339933;">&lt;/</span>h1<span style="color: #339933;">&gt;</span>
    <span style="color: #339933;">&lt;/</span>div<span style="color: #339933;">&gt;</span>
&nbsp;
    <span style="color: #339933;">&lt;</span>h2 <span style="color: #000000; font-weight: bold;">class</span><span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;blockhead&quot;</span><span style="color: #339933;">&gt;</span>Reglamento de mi foro vBulletin <span style="color: #cc66cc;">4</span><span style="color: #339933;">&lt;/</span>h2<span style="color: #339933;">&gt;</span>
    <span style="color: #339933;">&lt;</span>div <span style="color: #000000; font-weight: bold;">class</span><span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;blockbody&quot;</span><span style="color: #339933;">&gt;</span>
      <span style="color: #339933;">&lt;</span>div <span style="color: #000000; font-weight: bold;">class</span><span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;blockrow&quot;</span><span style="color: #339933;">&gt;</span>
        <span style="color: #339933;">&lt;!--</span> AQUI EMPIEZA EL CUSTOM CODE <span style="color: #339933;">--&gt;</span>
&nbsp;
        <span style="color: #339933;">&lt;!--</span> <span style="color: #339933;">/</span>AQUI TERMINA EL CUSTOM CODE <span style="color: #339933;">--&gt;</span>
      <span style="color: #339933;">&lt;/</span>div<span style="color: #339933;">&gt;</span>
    <span style="color: #339933;">&lt;/</span>div<span style="color: #339933;">&gt;</span>
&nbsp;
    <span style="color: #009900;">&#123;</span>vb<span style="color: #339933;">:</span>raw footer<span style="color: #009900;">&#125;</span>
  <span style="color: #339933;">&lt;/</span>body<span style="color: #339933;">&gt;</span>
<span style="color: #339933;">&lt;/</span>html<span style="color: #339933;">&gt;</span></pre></div></div>

<h3>Creación de plugins</h3>
<p>A continuación creamos dos plugins: <em>ACP > Plugins y productos > Agregar nuevo plugin</em></p>
<p>Crearemos uno llamado <em>plugincustom1 </em>con <em>Ubicación de Enganche = online_location_process</em> (curiosa traducción de <em>hook</em>) con el siguiente contenido y nos aseguraremos de marcarlo como activo:</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #b1b100;">switch</span> <span style="color: #009900;">&#40;</span><span style="color: #000088;">$filename</span><span style="color: #009900;">&#41;</span>
<span style="color: #009900;">&#123;</span>
    <span style="color: #b1b100;">case</span> <span style="color: #0000ff;">'reglamento.php'</span><span style="color: #339933;">:</span>
        <span style="color: #000088;">$userinfo</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'activity'</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">'Reglamento'</span><span style="color: #339933;">;</span>
        <span style="color: #b1b100;">break</span><span style="color: #339933;">;</span>
<span style="color: #666666; font-style: italic;">// add more cases here if you have more than one custom page. no need for multiple plugins. one plugin can handle all.</span>
<span style="color: #009900;">&#125;</span></pre></div></div>

<p>A continuación crearemos el plugincustom2 con Ubicación de enganche = online_location_unknown con el siguiente contenido y nos aseguramos de marcarlo como activo:</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #b1b100;">switch</span> <span style="color: #009900;">&#40;</span><span style="color: #000088;">$userinfo</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'activity'</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span>
<span style="color: #009900;">&#123;</span>
    <span style="color: #b1b100;">case</span> <span style="color: #0000ff;">'Reglamento'</span><span style="color: #339933;">:</span>
        <span style="color: #000088;">$userinfo</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'where'</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">'&lt;a href=&quot;reglamento.php?'</span><span style="color: #339933;">.</span><span style="color: #000088;">$vbulletin</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">session</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">vars</span><span style="color: #009900;">&#91;</span>sessionurl<span style="color: #009900;">&#93;</span><span style="color: #339933;">.</span><span style="color: #0000ff;">'&quot;&gt;Reglamento&lt;/a&gt;'</span><span style="color: #339933;">;</span>
        <span style="color: #000088;">$userinfo</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'action'</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">&quot;Reglamento de mi foro vBulletin&quot;</span><span style="color: #339933;">;</span>
        <span style="color: #000088;">$handled</span> <span style="color: #339933;">=</span> <span style="color: #009900; font-weight: bold;">true</span><span style="color: #339933;">;</span>
        <span style="color: #b1b100;">break</span><span style="color: #339933;">;</span>
<span style="color: #666666; font-style: italic;">// add more cases here if you have more than one custom page. no need for multiple plugins. one plugin can handle all.</span>
<span style="color: #009900;">&#125;</span></pre></div></div>

<h3>Creación del enlace</h3>
<p>Llegados a este punto ya podemos probar la URL de nuestro reglamento: http://www.misitioweb.com/reglamento.php debería funcionarnos. En este punto modificaremos la plantilla del punto 2 y meteremos nuestro custom code en &#8216;reglamento&#8217;.</p>
<p>A continuación querremos enlazar esta nueva página. Para ello, vamos a suponer que queremos enlazarla desde el menú de pie de página (gestionado por la plantilla <em>footer</em>) o la barra de navegación superior (gestionado por la plantilla <em>navbar</em>).</p>
<p>Si, por ejemplo, deseamos añadirlo a la barra de navegación: <em>ACP > Estilos y plantillas > Administrar Estilos</em> y en el desplegable de la derecha, elegiremos <em>Editar plantillas</em>, desplegamos &#8216;<em>Navigation  breadcrumb Plantillas</em>&#8216; y seleccionamos &#8216;<em>navbar</em>&#8216;.</p>
<p>Buscamos:</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #009900;">&#123;</span>vb<span style="color: #339933;">:</span>raw template_hook<span style="color: #339933;">.</span>navtab_end<span style="color: #009900;">&#125;</span></pre></div></div>

<p>Y lo cambiamos por:</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #339933;">&lt;!--</span> nueva pestaña en navbar <span style="color: #339933;">--&gt;</span>
  <span style="color: #339933;">&lt;</span>vb<span style="color: #339933;">:</span><span style="color: #b1b100;">if</span> condition<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;THIS_SCRIPT == 'reglamento'&quot;</span><span style="color: #339933;">&gt;</span>
     <span style="color: #339933;">&lt;</span>li <span style="color: #000000; font-weight: bold;">class</span><span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;selected&quot;</span><span style="color: #339933;">&gt;&lt;</span>a <span style="color: #000000; font-weight: bold;">class</span><span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;navtab&quot;</span> href<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;reglamento.php&quot;</span><span style="color: #339933;">&gt;</span>Reglamento<span style="color: #339933;">&lt;/</span>a<span style="color: #339933;">&gt;&lt;/</span>li<span style="color: #339933;">&gt;</span>
  <span style="color: #339933;">&lt;</span>vb<span style="color: #339933;">:</span><span style="color: #b1b100;">else</span> <span style="color: #339933;">/&gt;</span>
     <span style="color: #339933;">&lt;</span>li<span style="color: #339933;">&gt;&lt;</span>a <span style="color: #000000; font-weight: bold;">class</span><span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;navtab&quot;</span> href<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;reglamento.php&quot;</span><span style="color: #339933;">&gt;</span>Reglamento<span style="color: #339933;">&lt;/</span>a<span style="color: #339933;">&gt;&lt;/</span>li<span style="color: #339933;">&gt;</span>
  <span style="color: #339933;">&lt;/</span>vb<span style="color: #339933;">:</span>if<span style="color: #339933;">&gt;</span>  
<span style="color: #339933;">&lt;!--</span> <span style="color: #339933;">/</span>nueva pestaña reglamento <span style="color: #339933;">--&gt;</span>
&nbsp;
<span style="color: #009900;">&#123;</span>vb<span style="color: #339933;">:</span>raw template_hook<span style="color: #339933;">.</span>navtab_end<span style="color: #009900;">&#125;</span></pre></div></div>

<p>Y ya está <img src='http://www.leccionespracticas.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>Related posts:<ol>
<li><a href='http://www.leccionespracticas.com/informatica-web/vbulletin-informatica-web/vbulletin-change-the-redirect-or-the-url-in-the-login-process/' rel='bookmark' title='vBulletin: change the redirect or the url in the login process'>vBulletin: change the redirect or the url in the login process</a></li>
<li><a href='http://www.leccionespracticas.com/informatica-web/anadir-boton-de-facebook-dinamico-para-la-pagina-actual-solucionado/' rel='bookmark' title='Añadir botón de facebook dinámico (para la página actual) [SOLUCIONADO]'>Añadir botón de facebook dinámico (para la página actual) [SOLUCIONADO]</a></li>
<li><a href='http://www.leccionespracticas.com/informatica-web/vbulletin-informatica-web/vbulletin-4-1-7-instalar-spanish-language-pack-resuelto/' rel='bookmark' title='vBulletin 4.1.7 &#8211; Instalar spanish language pack [RESUELTO]'>vBulletin 4.1.7 &#8211; Instalar spanish language pack [RESUELTO]</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://www.leccionespracticas.com/informatica-web/vbulletin-informatica-web/vbulletin-4-anadir-paginas-custom/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>vBulletin: Non-www to www redirection [SOLVED]</title>
		<link>http://www.leccionespracticas.com/informatica-web/vbulletin-informatica-web/vbulletin-non-www-to-www-redirection-solved/</link>
		<comments>http://www.leccionespracticas.com/informatica-web/vbulletin-informatica-web/vbulletin-non-www-to-www-redirection-solved/#comments</comments>
		<pubDate>Tue, 15 Nov 2011 17:32:50 +0000</pubDate>
		<dc:creator>Miguel</dc:creator>
				<category><![CDATA[vBulletin]]></category>
		<category><![CDATA[.htaccess]]></category>
		<category><![CDATA[non-www to www]]></category>
		<category><![CDATA[redirection]]></category>
		<category><![CDATA[vbulletin]]></category>

		<guid isPermaLink="false">http://www.leccionespracticas.com/?p=1874</guid>
		<description><![CDATA[Another common thing I usually do for my clients is to redirect non-www version of their vbulletin forums to www-version. This can be easily achieved by creating a .htaccess file which contains: RewriteEngine On RewriteCond %&#123;HTTP_HOST&#125; ^domain.com RewriteRule &#40;.*&#41; http://www.domain.com/$1 &#91;R=301,L&#93; Just replace domain.com with your domain name and upload the file to the /public_html [...]
Related posts:<ol>
<li><a href='http://www.leccionespracticas.com/uncategorized/a-real-case-example-my-htaccess-in-wordpress-subdirectory/' rel='bookmark' title='A real case example: my .htaccess in /wordpress subdirectory'>A real case example: my .htaccess in /wordpress subdirectory</a></li>
<li><a href='http://www.leccionespracticas.com/informatica-web/vbulletin-informatica-web/vbulletin-change-the-redirect-or-the-url-in-the-login-process/' rel='bookmark' title='vBulletin: change the redirect or the url in the login process'>vBulletin: change the redirect or the url in the login process</a></li>
<li><a href='http://www.leccionespracticas.com/informatica-web/dfgallery-invalid-curl-response-we-expected-true-from-the-url/' rel='bookmark' title='dfgallery: Invalid cURL response. We expected &#8216;true&#8217; from the url &#8230;'>dfgallery: Invalid cURL response. We expected &#8216;true&#8217; from the url &#8230;</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p>Another common thing I usually do for my clients is to redirect non-www version of their vbulletin forums to www-version.</p>
<p>This can be easily achieved by creating a .htaccess file which contains:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">RewriteEngine On
RewriteCond <span style="color: #000000; font-weight: bold;">%</span><span style="color: #7a0874; font-weight: bold;">&#123;</span>HTTP_HOST<span style="color: #7a0874; font-weight: bold;">&#125;</span> ^domain.com
RewriteRule <span style="color: #7a0874; font-weight: bold;">&#40;</span>.<span style="color: #000000; font-weight: bold;">*</span><span style="color: #7a0874; font-weight: bold;">&#41;</span> http:<span style="color: #000000; font-weight: bold;">//</span>www.domain.com<span style="color: #000000; font-weight: bold;">/</span><span style="color: #007800;">$1</span> <span style="color: #7a0874; font-weight: bold;">&#91;</span><span style="color: #007800;">R</span>=<span style="color: #000000;">301</span>,L<span style="color: #7a0874; font-weight: bold;">&#93;</span></pre></div></div>

<p>Just replace domain.com with your domain name and upload the file to the /public_html folder <img src='http://www.leccionespracticas.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>Related posts:<ol>
<li><a href='http://www.leccionespracticas.com/uncategorized/a-real-case-example-my-htaccess-in-wordpress-subdirectory/' rel='bookmark' title='A real case example: my .htaccess in /wordpress subdirectory'>A real case example: my .htaccess in /wordpress subdirectory</a></li>
<li><a href='http://www.leccionespracticas.com/informatica-web/vbulletin-informatica-web/vbulletin-change-the-redirect-or-the-url-in-the-login-process/' rel='bookmark' title='vBulletin: change the redirect or the url in the login process'>vBulletin: change the redirect or the url in the login process</a></li>
<li><a href='http://www.leccionespracticas.com/informatica-web/dfgallery-invalid-curl-response-we-expected-true-from-the-url/' rel='bookmark' title='dfgallery: Invalid cURL response. We expected &#8216;true&#8217; from the url &#8230;'>dfgallery: Invalid cURL response. We expected &#8216;true&#8217; from the url &#8230;</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://www.leccionespracticas.com/informatica-web/vbulletin-informatica-web/vbulletin-non-www-to-www-redirection-solved/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>vBulletin: How to list subforums in new line (not comma separated) [SOLVED]</title>
		<link>http://www.leccionespracticas.com/informatica-web/vbulletin-informatica-web/vbulletin-how-to-list-subforums-in-new-line-not-comma-separated-solved/</link>
		<comments>http://www.leccionespracticas.com/informatica-web/vbulletin-informatica-web/vbulletin-how-to-list-subforums-in-new-line-not-comma-separated-solved/#comments</comments>
		<pubDate>Tue, 15 Nov 2011 08:58:37 +0000</pubDate>
		<dc:creator>Miguel</dc:creator>
				<category><![CDATA[vBulletin]]></category>

		<guid isPermaLink="false">http://www.leccionespracticas.com/?p=1870</guid>
		<description><![CDATA[List subforums in new lines can be achieved in vBulletin 4 just by making changes to CSS files. If you are looking for the vBulletin3 way, check this link EDIT: Just found this plugin which does the job and lets admin control the display of subforums in columns too! Cool, ain&#8217;t it? To remove the [...]
Related posts:<ol>
<li><a href='http://www.leccionespracticas.com/informatica-web/vbulletin-informatica-web/vbulletin-4-add-right-or-left-sidebar-solved/' rel='bookmark' title='vBulletin 4: Add right or left sidebar [SOLVED]'>vBulletin 4: Add right or left sidebar [SOLVED]</a></li>
<li><a href='http://www.leccionespracticas.com/informatica-web/vbulletin-informatica-web/vbulletin-4-disable-pluginmod-per-style-solved/' rel='bookmark' title='vBulletin 4: Disable plugin/mod per style [SOLVED]'>vBulletin 4: Disable plugin/mod per style [SOLVED]</a></li>
<li><a href='http://www.leccionespracticas.com/informatica-web/vbulletin-informatica-web/vbulletin-change-sticky-text-style-solved/' rel='bookmark' title='vBulletin: change sticky text style [SOLVED]'>vBulletin: change sticky text style [SOLVED]</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p>List subforums in new lines can be achieved in <a href="http://www.leccionespracticas.com/informatica-web/vbulletin-informatica-web/">vBulletin 4</a> just by making changes to <b>CSS files</b>.<br />
If you are looking for the vBulletin3 way, <a href="https://www.vbulletin.com/forum/showthread.php/158708-How-To-Make-Single-Column-Subforums-List-Under-Sub-Forum-Forumhome">check this link</a></p>
<p><font color="red">EDIT: Just found <a href="http://www.vbulletin.org/forum/showthread.php?threadid=229148">this plugin</a> which does the job and lets admin control the display of subforums in columns too! Cool, ain&#8217;t it?</font></p>
<p>To remove the commas between forums and separate them with a linea break <b>in vBulletin 4</b>, just edit your <em>vbulletin.css</em> and change from:</p>

<div class="wp_syntax"><div class="code"><pre class="css" style="font-family:monospace;"><span style="color: #6666ff;">.commalist</span> li <span style="color: #00AA00;">&#123;</span>
	<span style="color: #000000; font-weight: bold;">display</span><span style="color: #00AA00;">:</span>inline-<span style="color: #993333;">block</span><span style="color: #00AA00;">;</span>
<span style="color: #00AA00;">&#125;</span>
&nbsp;
<span style="color: #6666ff;">.commalist</span> li<span style="color: #3333ff;">:after </span><span style="color: #00AA00;">&#123;</span>
<span style="color: #808080; font-style: italic;">/*	Comma + &amp;nbsp; */</span>
	<span style="color: #000000; font-weight: bold;">content</span><span style="color: #00AA00;">:</span><span style="color: #ff0000;">&quot;,<span style="color: #000099; font-weight: bold;">\0</span>000A0&quot;</span><span style="color: #00AA00;">;</span>
<span style="color: #00AA00;">&#125;</span></pre></div></div>

<p>To:</p>

<div class="wp_syntax"><div class="code"><pre class="css" style="font-family:monospace;"><span style="color: #6666ff;">.commalist</span> li <span style="color: #00AA00;">&#123;</span>
        <span style="color: #000000; font-weight: bold;">display</span><span style="color: #00AA00;">:</span><span style="color: #993333;">block</span><span style="color: #00AA00;">;</span>
<span style="color: #00AA00;">&#125;</span>
&nbsp;
<span style="color: #6666ff;">.commalist</span> li<span style="color: #3333ff;">:after </span><span style="color: #00AA00;">&#123;</span>
<span style="color: #808080; font-style: italic;">/*	 &amp;nbsp; */</span>
        <span style="color: #000000; font-weight: bold;">content</span><span style="color: #00AA00;">:</span><span style="color: #ff0000;">&quot; <span style="color: #000099; font-weight: bold;">\0</span>000A0&quot;</span><span style="color: #00AA00;">;</span>
<span style="color: #00AA00;">&#125;</span></pre></div></div>

<p>Now, to add a line break after the &#8220;subforums: &#8221; text, edit <em>forumbits.css</em> and change from:</p>

<div class="wp_syntax"><div class="code"><pre class="css" style="font-family:monospace;"><span style="color: #6666ff;">.moderators</span> h4<span style="color: #00AA00;">,</span> <span style="color: #6666ff;">.moderators</span> <span style="color: #6666ff;">.commalist</span><span style="color: #00AA00;">,</span> <span style="color: #6666ff;">.subforums</span> h4<span style="color: #00AA00;">,</span> <span style="color: #6666ff;">.subforums</span> <span style="color: #6666ff;">.commalist</span> <span style="color: #00AA00;">&#123;</span>
	<span style="color: #000000; font-weight: bold;">float</span><span style="color: #00AA00;">:</span><span style="color: #00AA00;">&#123;</span>vb<span style="color: #3333ff;">:stylevar </span><span style="color: #000000; font-weight: bold;">left</span><span style="color: #00AA00;">&#125;</span><span style="color: #00AA00;">;</span>
	<span style="color: #000000; font-weight: bold;">clear</span><span style="color: #00AA00;">:</span><span style="color: #00AA00;">&#123;</span>vb<span style="color: #3333ff;">:stylevar </span><span style="color: #000000; font-weight: bold;">right</span><span style="color: #00AA00;">&#125;</span><span style="color: #00AA00;">;</span>
<span style="color: #00AA00;">&#125;</span></pre></div></div>

<p>To:</p>

<div class="wp_syntax"><div class="code"><pre class="css" style="font-family:monospace;"><span style="color: #6666ff;">.moderators</span> h4<span style="color: #00AA00;">,</span> <span style="color: #6666ff;">.moderators</span> <span style="color: #6666ff;">.commalist</span><span style="color: #00AA00;">,</span> <span style="color: #6666ff;">.subforums</span> h4<span style="color: #00AA00;">,</span> <span style="color: #6666ff;">.subforums</span> <span style="color: #6666ff;">.commalist</span> <span style="color: #00AA00;">&#123;</span>
	<span style="color: #000000; font-weight: bold;">float</span><span style="color: #00AA00;">:</span><span style="color: #00AA00;">&#123;</span>vb<span style="color: #3333ff;">:stylevar </span><span style="color: #000000; font-weight: bold;">left</span><span style="color: #00AA00;">&#125;</span><span style="color: #00AA00;">;</span>
        <span style="color: #000000; font-weight: bold;">clear</span><span style="color: #00AA00;">:</span><span style="color: #993333;">both</span><span style="color: #00AA00;">;</span>
<span style="color: #00AA00;">&#125;</span></pre></div></div>

<p>Related posts:<ol>
<li><a href='http://www.leccionespracticas.com/informatica-web/vbulletin-informatica-web/vbulletin-4-add-right-or-left-sidebar-solved/' rel='bookmark' title='vBulletin 4: Add right or left sidebar [SOLVED]'>vBulletin 4: Add right or left sidebar [SOLVED]</a></li>
<li><a href='http://www.leccionespracticas.com/informatica-web/vbulletin-informatica-web/vbulletin-4-disable-pluginmod-per-style-solved/' rel='bookmark' title='vBulletin 4: Disable plugin/mod per style [SOLVED]'>vBulletin 4: Disable plugin/mod per style [SOLVED]</a></li>
<li><a href='http://www.leccionespracticas.com/informatica-web/vbulletin-informatica-web/vbulletin-change-sticky-text-style-solved/' rel='bookmark' title='vBulletin: change sticky text style [SOLVED]'>vBulletin: change sticky text style [SOLVED]</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://www.leccionespracticas.com/informatica-web/vbulletin-informatica-web/vbulletin-how-to-list-subforums-in-new-line-not-comma-separated-solved/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>

