<?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>Anmari &#187; layout</title>
	<atom:link href="http://webdesign.anmari.com/tag/layout/feed/" rel="self" type="application/rss+xml" />
	<link>http://webdesign.anmari.com</link>
	<description>Simply effective web services</description>
	<lastBuildDate>Wed, 16 Nov 2011 05:01:11 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
		<item>
		<title>Making a set of nested div&#8217;s clickable like a link or href element</title>
		<link>http://webdesign.anmari.com/130/clickable_link_nested_divs/</link>
		<comments>http://webdesign.anmari.com/130/clickable_link_nested_divs/#comments</comments>
		<pubDate>Tue, 03 Jun 2008 05:09:03 +0000</pubDate>
		<dc:creator>anmari</dc:creator>
				<category><![CDATA[Web designers]]></category>
		<category><![CDATA[css]]></category>
		<category><![CDATA[grids]]></category>
		<category><![CDATA[layout]]></category>

		<guid isPermaLink="false">http://www.webdesign.anmari.com/?p=130</guid>
		<description><![CDATA[The need: make a set of nested div&#8217;s clickable, like one big image The Auto CSS Layout generator has preview pages. In these we wanted the real html templates and the real tableless CSS required for each particular layout to be used, rather than screen dumps. this seemed like a more ethical approach and also [...]
Related posts:<ol>
<li><a href='http://webdesign.anmari.com/layout-generator/' rel='bookmark' title='Layout Generator'>Layout Generator</a> <small>The CSS Layout generator generates tableless CSS only layouts or grids that have A-grade browser support. Unlike Yahoo Grids it...</small></li>
<li><a href='http://webdesign.anmari.com/157/widgetized-headers-and-footers/' rel='bookmark' title='Widgetized headers and footers?'>Widgetized headers and footers?</a> <small>Dynamic (widgetized) Sidebars are great, but would you not like to have a dynamic header and footer in your theme...</small></li>
</ol>]]></description>
			<content:encoded><![CDATA[<h3>The need: make a set of nested div&#8217;s clickable, like one big image</h3>
<p>The <a title="Link to a CSS Layout Generator" href="http://www.webdesign.anmari.com/web-tools/layout-generator/">Auto CSS Layout generator</a> has preview pages.  In these we wanted the real html templates and the real tableless CSS required for each particular layout to be used, rather than screen dumps.  this seemed like a more ethical approach and also allowed one to &#8220;test&#8221; all the layouts in one go.  We also wanted the user to be able to &#8220;click&#8217; on the preview to choose the layout style, just like a normal link.</p>
<p>You can see a working test demo of the preview<a title="Link to a test web page showing clickable nested divs" href="http://www.anmari.com/testing/keeptest_divhref.html"> here.</a></p>
<h3>The problem: Link elements are empty</h3>
<p>However we had no images to use and a link element is by definition empty &#8211; it may not contain div&#8217;s &#8211; let alone a set of nested divs.</p>
<h3>The problem2:  No content</h3>
<p>In a multi layout situation, we did not want the screen to be too busy, so we did not want superfluous &#8220;content&#8221; for our clickable links.</p>
<h3>The answer: Clickable space links that are displayed as blocks</h3>
<p>Since some &#8220;content&#8221; is needed to make sure that the div&#8217;s do not collapse, we use the old space &#8221; &#8221; &#8211; in each div that needed content.  We made each space a link to the same &#8220;chosen layout&#8221; page.  In the CSS we then made the links in the nested div&#8217;s display as block elements and that seemed to do the trick!</p>
<p><a title="Link to the test html" href="http://www.anmari.com/testing/keeptest_divhref.html">View the test</a> and view source to see the code.</p>
<h4>css:</h4>
<p><code>div.container a  {display: block; text-decoration: none;}</code></p>
<h4>html:</h4>
<pre><code>&lt;div class="container"&gt;
  &lt;div class="header"&gt;
       &lt;a href="http://www.webdesign.anmari.com/web-tools/layout-generator/"
        title="The header or branding div" &gt;     &lt;/a&gt;
  &lt;/div&gt;
  &lt;div class="wrapper"&gt;
    &lt;div class="content"&gt;
      &lt;a href="http://www.webdesign.anmari.com/web-tools/layout-generator/"
      title="The content div"&gt;      &lt;/a&gt;
    &lt;/div&gt;
  &lt;/div&gt;
  &lt;div class="nav"&gt;&lt;a href="http://www.webdesign.anmari.com/web-tools/layout-generator/"
     title="The navigation div"&gt;      &lt;/a&gt;&lt;/div&gt;
  &lt;div class="extra"&gt;&lt;a href="http://www.webdesign.anmari.com/web-tools/layout-generator/"
     title="The extra or sidebar div"&gt;      &lt;/a&gt;&lt;/div&gt;
&lt;div class="footer"&gt;&lt;a href="http://www.webdesign.anmari.com/web-tools/layout-generator/"
     title="The footer div"&gt;      &lt;/a&gt;&lt;/div&gt;
&lt;/div&gt;</code></pre>
<p>Related posts:</p><ol>
<li><a href='http://webdesign.anmari.com/layout-generator/' rel='bookmark' title='Layout Generator'>Layout Generator</a> <small>The CSS Layout generator generates tableless CSS only layouts or grids that have A-grade browser support. Unlike Yahoo Grids it...</small></li>
<li><a href='http://webdesign.anmari.com/157/widgetized-headers-and-footers/' rel='bookmark' title='Widgetized headers and footers?'>Widgetized headers and footers?</a> <small>Dynamic (widgetized) Sidebars are great, but would you not like to have a dynamic header and footer in your theme...</small></li>
</ol>]]></content:encoded>
			<wfw:commentRss>http://webdesign.anmari.com/130/clickable_link_nested_divs/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

