<?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>llynix.com &#187; HTML/CSS</title>
	<atom:link href="http://llynix.com/category/code/htmlcss/feed/" rel="self" type="application/rss+xml" />
	<link>http://llynix.com</link>
	<description>Code, Rants and Ramblings</description>
	<lastBuildDate>Mon, 15 Feb 2010 00:17:54 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.1</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Sideways Text</title>
		<link>http://llynix.com/articles/sideways-text/</link>
		<comments>http://llynix.com/articles/sideways-text/#comments</comments>
		<pubDate>Thu, 03 Sep 2009 17:01:48 +0000</pubDate>
		<dc:creator>Llynix</dc:creator>
				<category><![CDATA[Articles]]></category>
		<category><![CDATA[Code]]></category>
		<category><![CDATA[HTML/CSS]]></category>

		<guid isPermaLink="false">http://llynix.com/?p=227</guid>
		<description><![CDATA[Just upgraded to Firefox 3.5 and I have to test out the goods.
Sideways Text
If your on a cutting edge browser the text should appear sideways.  I had to tweak a bit to get it to display properly, so obviously there are a few bugs or misconceptions.  The code for the curious is:

&#60;div style="height:100px;"&#62;
&#160;&#160;&#60;br/&#62;&#60;br/&#62;
&#160;&#160;&#60;span [...]]]></description>
			<content:encoded><![CDATA[<p>Just upgraded to Firefox 3.5 and I have to test out the goods.</p>
<div style="height:100px;"><br/><br/><span style="-webkit-transform: rotate(-90deg); -moz-transform: rotate(-90deg);">Sideways Text</span></div>
<p>If your on a cutting edge browser the text should appear sideways.  I had to tweak a bit to get it to display properly, so obviously there are a few bugs or misconceptions.  The code for the curious is:</p>
<p><code><br />
&lt;div style="height:100px;"&gt;<br />
&nbsp;&nbsp;&lt;br/&gt;&lt;br/&gt;<br />
&nbsp;&nbsp;&lt;span style="-webkit-transform: rotate(-90deg); -moz-transform: rotate(-90deg);"&gt;Sideways Text&lt;/span&gt;<br />
&lt;/div&gt;<br />
</code></p>
]]></content:encoded>
			<wfw:commentRss>http://llynix.com/articles/sideways-text/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>IE8 Compatibility View</title>
		<link>http://llynix.com/code/ie8-compatibility-view/</link>
		<comments>http://llynix.com/code/ie8-compatibility-view/#comments</comments>
		<pubDate>Tue, 30 Jun 2009 21:48:52 +0000</pubDate>
		<dc:creator>Llynix</dc:creator>
				<category><![CDATA[Code]]></category>
		<category><![CDATA[HTML/CSS]]></category>

		<guid isPermaLink="false">http://llynix.com/?p=179</guid>
		<description><![CDATA[The latest incarnation of Internet Explorer 8 adds a new twist to standards compliant web pages.  When viewing a webpage in standards mode the user is presented with a compatibility icon that can be toggled to view the page using the Internet Explorer 7 engine.
However, as web master you have ultimate control.  By [...]]]></description>
			<content:encoded><![CDATA[<p><div id="attachment_181" class="wp-caption aligncenter" style="width: 457px"><a href="http://llynix.com/wp-content/uploads/2009/06/compatibility.jpg"><img src="http://llynix.com/wp-content/uploads/2009/06/compatibility.jpg" alt="Compatibility View" title="compatibility" width="447" height="89" class="size-full wp-image-181" /></a><p class="wp-caption-text">Compatibility View</p></div><br />
The latest incarnation of Internet Explorer 8 adds a new twist to standards compliant web pages.  When viewing a webpage in standards mode the user is presented with a compatibility icon that can be toggled to view the page using the Internet Explorer 7 engine.</p>
<p>However, as web master you have ultimate control.  By using the X-UA-Compatible meta tag in your documents you can choose which mode you want your page rendered in and hide the button from users.</p>
<p><code><br />
&lt;meta http-equiv="X-UA-Compatible" content="IE=Edge" /&gt;<br />
Always uses the latest available rendering engine.<br />
&lt;meta http-equiv="X-UA-Compatible" content="IE=8" /&gt;<br />
Display using the IE8 rendering engine.<br />
&lt;meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7" /&gt;<br />
Display standards mode documents in IE7 standards mode, quirks mode documents in IE7 quirks mode.<br />
&lt;meta http-equiv="X-UA-Compatible" content="IE=7" /&gt;<br />
Use IE7 standards mode.<br />
</code></p>
]]></content:encoded>
			<wfw:commentRss>http://llynix.com/code/ie8-compatibility-view/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Properly Hacking Max-Width for IE6</title>
		<link>http://llynix.com/code/properly-hacking-max-width-for-ie6/</link>
		<comments>http://llynix.com/code/properly-hacking-max-width-for-ie6/#comments</comments>
		<pubDate>Sat, 02 Jun 2007 05:36:48 +0000</pubDate>
		<dc:creator>Llynix</dc:creator>
				<category><![CDATA[Code]]></category>
		<category><![CDATA[HTML/CSS]]></category>

		<guid isPermaLink="false">http://llynix.com/code/properly-hacking-max-width-for-ie6/</guid>
		<description><![CDATA[I&#8217;ve been trying to clean up the design of Llynix.com and get it looking relatively the same across the major browsers.  One thorn in my side was the fact IE6 doesn&#8217;t support the max-width CSS property.  It may not seem like a problem to you, but if you are lucky enough to view [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve been trying to clean up the design of Llynix.com and get it looking relatively the same across the major browsers.  One thorn in my side was the fact IE6 doesn&#8217;t support the max-width CSS property.  It may not seem like a problem to you, but if you are lucky enough to view websites on a widescreen monitor the text has a tendency to run on a bit if max-width isn&#8217;t set.  Imagine reading this entire paragraph in one line of text.  It just doesn&#8217;t seem right.</p>
<p>So I apply a max-width which keeps things from running too far off the screen.  This works for the major decent browsers, but our old friend IE6 doesn&#8217;t understand it.  So what&#8217;s a web designer to do?</p>
<p>Enter the hack.  Luckily IE does have a little piece of javascript that can help us out in faking our max-width.  <a href="http://www.svendtofte.com/code/max_width_in_ie/">Svendtofte.com</a> has the details of the wonderful snippet below.</p>
<pre>
width:expression(document.body.clientWidth &gt; 800? "800px": "auto" );
</pre>
<p>This little &#8216;expression&#8217; does the same job as max-width:800px;  But how do we properly introduce it into our CSS?  In the old days we&#8217;d rely on faulty CSS error control to splice in various pieces of code for different browsers.  Today though we wash our hands of all that, and hopefully ignore such horriable code.  There is an easier way.</p>
<p>Enter conditional comments.</p>
<p>Conditional comments only work on Internet Explorer browsers.  Other browsers will just treat them as an ordinary comment and continue on.  But when IE detects them it will include them if necessary.  Zoffix Znet has an excellent article on <a href="http://haslayout.net/condcom.shtml">conditional comments</a>.  In addition you might want to check out what <a href="http://msdn2.microsoft.com/en-us/library/ms537512.aspx">Microsoft</a> has to say about them.</p>
<p>Here is my max-width fix inside a IE6 only conditional comment.</p>
<pre>
    &lt;!--[if IE 6]&gt;
    &lt;style type="text/css"&gt;
      #header {width:expression(document.body.clientWidth &gt; 1000? "1000px": "auto" );}
      #mainbody {width:expression(document.body.clientWidth &gt; 800? "800px": "auto" );}
    &lt;/style&gt;
  &lt;![endif]--&gt;
</pre>
<p>Now the webpage looks much better viewed in widescreen in IE6.</p>
]]></content:encoded>
			<wfw:commentRss>http://llynix.com/code/properly-hacking-max-width-for-ie6/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Website Design Skeleton</title>
		<link>http://llynix.com/code/website-design-skeleton/</link>
		<comments>http://llynix.com/code/website-design-skeleton/#comments</comments>
		<pubDate>Sat, 02 Jun 2007 04:54:14 +0000</pubDate>
		<dc:creator>Llynix</dc:creator>
				<category><![CDATA[Code]]></category>
		<category><![CDATA[HTML/CSS]]></category>
		<category><![CDATA[PHP]]></category>

		<guid isPermaLink="false">http://llynix.com/code/website-design-skeleton/</guid>
		<description><![CDATA[You don&#8217;t want to re-invent the wheel every new website you begin coding on.  Instead maximize your productivity with a template or skeleton if you will of a basic site design.
Your implementation may vary.  I&#8217;ve tried to keep mine terse for the utmost configuration.
We&#8217;ll start with a basic header:
head.php

&#60;!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML [...]]]></description>
			<content:encoded><![CDATA[<p>You don&#8217;t want to re-invent the wheel every new website you begin coding on.  Instead maximize your productivity with a template or skeleton if you will of a basic site design.</p>
<p>Your implementation may vary.  I&#8217;ve tried to keep mine terse for the utmost configuration.</p>
<p>We&#8217;ll start with a basic header:</p>
<h3>head.php</h3>
<pre>
&lt;!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"&gt;
&lt;html&gt;
&lt;head&gt;
  &lt;title&gt;Change Me Later&lt;/title&gt;
  &lt;meta http-equiv="Content-Type" content="text/html; charset=UTF-8"&gt;
  &lt;link href="/style.css" rel="stylesheet" type="text/css"&gt;
&lt;/head&gt;
&lt;body&gt;
</pre>
<p>I&#8217;ve choose HTML 4.01 strict for <a href="http://www.hixie.ch/advocacy/xhtml">various reasons</a>.  You will need to remember to fill in your title.</p>
<p>As you may have noticed, I&#8217;ve included a style sheet in this header, so let&#8217;s go over that.</p>
<h3>style.css</h3>
<pre>
* {margin:0;padding:0;}
</pre>
<p>Not much to see here, we reset our margin and padding to 0 to eliminate cross browser quirks and general madness while designing.  Some people prefer more in their <a href="http://meyerweb.com/eric/thoughts/2007/05/01/reset-reloaded/">default CSS</a>.</p>
<p>Let&#8217;s continue on to the main page.</p>
<h3>index.php</h3>
<pre>
require('head.php');
&lt;!-- Do stuff here --&gt;
require('foot.php');
</pre>
<p>Not much to see nor explain.  Now onwards to our footer.</p>
<h3>foot.php</h3>
<pre>
&lt;/body&gt;
&lt;/html&gt;
</pre>
<p>And there you have your skeleton.  It&#8217;s up to you to add the muscle.</p>
<p>A few ideas:</p>
<ul>
<li>Include your name, version and other information in comments in the header and stylesheet.</li>
<li>Include your statistics code in the footer.</li>
<li>Include any javascript you might use.</li>
<li>Instead write a php library to generate your header/footer bassed on doctype/chartype.</li>
<li>Set default text styles, colors etc to your liking in your CSS</li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://llynix.com/code/website-design-skeleton/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Creating a Linked Box (div)</title>
		<link>http://llynix.com/code/creating-a-linked-box-div/</link>
		<comments>http://llynix.com/code/creating-a-linked-box-div/#comments</comments>
		<pubDate>Tue, 29 May 2007 19:04:59 +0000</pubDate>
		<dc:creator>Llynix</dc:creator>
				<category><![CDATA[Code]]></category>
		<category><![CDATA[HTML/CSS]]></category>
		<category><![CDATA[JS]]></category>

		<guid isPermaLink="false">http://llynix.com/code/creating-a-linked-box-div/</guid>
		<description><![CDATA[This has been updated using jquery.
It&#8217;s easy to make a piece of text into a link, but what do you do when you want to make an entire area clickable?
Beginning web developers might try to wrap the entire div in an anchor tag.  While this might work for some browsers, it isn&#8217;t valid HTML [...]]]></description>
			<content:encoded><![CDATA[<p><strong>This has been <a href="http://llynix.com/articles/clickable-div-using-jquery/">updated using jquery</a>.</strong></p>
<p>It&#8217;s easy to make a piece of text into a link, but what do you do when you want to make an entire area clickable?</p>
<p>Beginning web developers might try to wrap the entire div in an anchor tag.  While this might work for some browsers, it isn&#8217;t valid HTML because anchor tags (&lt;a href=&#8221;"&gt;) can not contain block level elements (like div).  </p>
<p>We&#8217;ll start with a basic div with some text.</p>
<pre>
  &lt;div id="box"&gt;
    &lt;p&gt;Linked Div&lt;/p&gt;
    &lt;p&gt;By Llynix&lt;/p&gt;
  &lt;/div&gt;
</pre>
<p>Our first step is to make everything inside this box linkable.  This is ensure proper fallback when dealing with Javascript disabled browsers.</p>
<pre>
  &lt;div id="box"&gt;
    &lt;p&gt;&lt;a href="#"&gt;Linked Div&lt;/a&gt;&lt;/p&gt;
    &lt;p&gt;&lt;a href="#"&gt;By Llynix&lt;/a&gt;&lt;/p&gt;
  &lt;/div&gt;
</pre>
<p>Now we&#8217;ll add our Javascript which does the job for us.</p>
<pre>
  &lt;div id="box" onclick="javascript:window.location = '#';"&gt;
    &lt;p&gt;&lt;a href="#"&gt;Linked Div&lt;/a&gt;&lt;/p&gt;
    &lt;p&gt;&lt;a href="#"&gt;By Llynix&lt;/a&gt;&lt;/p&gt;
  &lt;/div&gt;
</pre>
<p>Finally we can add some CSS to make it behave more like a link.</p>
<pre>
  &lt;style type="text/css"&gt;
    #box {height:100px;width:100px;border:1px solid black;} /* Just some style to our div */
    #box {cursor:pointer;}
    #box:hover {background-color:yellow;}
  &lt;/style&gt;
</pre>
<p>And there you have it.  <a href="/linked_div/">View example</a></p>
]]></content:encoded>
			<wfw:commentRss>http://llynix.com/code/creating-a-linked-box-div/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

