<?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>eklog &#187; CSS</title>
	<atom:link href="http://www.ekstasis.net/log/category/css/feed" rel="self" type="application/rss+xml" />
	<link>http://www.ekstasis.net/log</link>
	<description>Just another WordPress site</description>
	<lastBuildDate>Tue, 29 Nov 2011 16:15:32 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Styling drop-downs</title>
		<link>http://www.ekstasis.net/log/css/select-styling.html</link>
		<comments>http://www.ekstasis.net/log/css/select-styling.html#comments</comments>
		<pubDate>Wed, 02 Nov 2011 19:07:07 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[CSS]]></category>
		<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[jquery]]></category>

		<guid isPermaLink="false">http://www.ekstasis.net/log/?p=541</guid>
		<description><![CDATA[Here&#8217;s how to style the options for a select drop-down. It uses some javaScript to add a class to the select options to match each option, and to add the selected option&#8217;s class to the select element itself. The CSS: The jQueries:]]></description>
			<content:encoded><![CDATA[<p>Here&#8217;s how to style the options for a select drop-down. It uses some javaScript to add a class to the select options to match each option, and to add the selected option&#8217;s class to the select element itself.</p>
<p>The CSS:</p>
<pre class="brush: css; title: ; notranslate">
.store-countries {
    padding-left: 20px;
    background-position: 4px 2px;
    background-repeat: no-repeat;
}
.store-countries option {
    padding: 0 0 0 24px;
    background-position: 2px 4px;
    background-repeat: no-repeat;
}
.store-countries option.Belgium {
    background-image: url(../images/icons/flags/be.gif);
}
.store-countries option.France {
    background-image: url(../images/icons/flags/fr.gif);
}
.store-countries option.Germany {
    background-image: url(../images/icons/flags/de.gif);
}
</pre>
<p>The jQueries:</p>
<pre class="brush: jscript; title: ; notranslate">
function dropDownCountries() {
    $('.store-countries').find('option').each(function() {
        var country = $j(this).val();
        $(this).addClass(country);
    });

    var selectedFlag = $('.store-countries').find('option:selected').css('background-image');
    $('.store-countries').css('background-image',selectedFlag)

    $('.store-countries').change( function() {
        var selectedFlag = $('.store-countries').find('option:selected').css('background-image');
        $('.store-countries').css('background-image',selectedFlag)
    });
}
</pre>
]]></content:encoded>
			<wfw:commentRss>http://www.ekstasis.net/log/css/select-styling.html/feed</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Checkbox link</title>
		<link>http://www.ekstasis.net/log/css/checkbox-link.html</link>
		<comments>http://www.ekstasis.net/log/css/checkbox-link.html#comments</comments>
		<pubDate>Wed, 07 Sep 2011 21:15:32 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[CSS]]></category>
		<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[Web Development]]></category>
		<category><![CDATA[jquery]]></category>

		<guid isPermaLink="false">http://www.ekstasis.net/log/?p=573</guid>
		<description><![CDATA[Turning a checkbox into a &#8216;clickable&#8217; label 1. Wrap the checkbox in a label: 2: Hide the checkbox and style the label: 3. Check the box when the label is clicked:]]></description>
			<content:encoded><![CDATA[<p>Turning a checkbox into a &#8216;clickable&#8217; label</p>
<p>1. Wrap the checkbox in a label:</p>
<pre class="brush: xml; title: ; notranslate">
&lt;label&gt;Save for later &lt;input type=&quot;checkbox&quot; value=&quot;1&quot; name=&quot;list&quot; class=&quot;checkbox&quot; /&gt;&lt;/label&gt;
</pre>
<p>2: Hide the checkbox and style the label:</p>
<pre class="brush: css; title: ; notranslate">
.save-for-later {
	cursor: pointer;
}
.save-for-later input {
	display: none;
}
.checked {
	text-shadow: 1px -1px 1px rgba(68,68,68,0.4);
	position: relative;
	top: 1px;
	left: 1px;
}
</pre>
<p>3. Check the box when the label is clicked:</p>
<pre class="brush: jscript; title: ; notranslate">
jQuery(function() {
    labelCheck();
});

function labelCheck() {
    $(&quot;#container .save-for-later&quot;).each( function(){
	$(this).find('input:checkbox').change(function() {
	    $(this).parent().toggleClass('checked');
	});
    });
}
</pre>
]]></content:encoded>
			<wfw:commentRss>http://www.ekstasis.net/log/css/checkbox-link.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>CSS3 graceful degredation</title>
		<link>http://www.ekstasis.net/log/css/css3-graceful-degredation.html</link>
		<comments>http://www.ekstasis.net/log/css/css3-graceful-degredation.html#comments</comments>
		<pubDate>Wed, 13 Jul 2011 22:27:21 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[CSS]]></category>
		<category><![CDATA[CSS3]]></category>

		<guid isPermaLink="false">http://www.ekstasis.net/log/?p=577</guid>
		<description><![CDATA[1. Use @font-face with a @font-face generator (e.g. from font squirrel) that includes EOT (to target IE 6 &#8211; 8), WOFF (for IE9+, FF3.6+, Chrome 5+) and SVG (for iOS devices before version 4.2.) and TrueType (for everything else) 2. http://www.modernizr.com/ &#8211; adds feature capability as classes to the HTML tag. 3. http://selectivizr.com/ &#8211; adds [...]]]></description>
			<content:encoded><![CDATA[<p>1. Use @font-face with a @font-face generator (e.g. from font squirrel) that includes EOT (to target IE 6 &#8211; 8), WOFF (for IE9+, FF3.6+, Chrome 5+) and SVG (for iOS devices before version 4.2.) and TrueType (for everything else)</p>
<p>2. http://www.modernizr.com/ &#8211; adds feature capability as classes to the HTML tag.</p>
<p>3. http://selectivizr.com/ &#8211; adds pseudo classes for IE6 &#038; 7</p>
<p>4. Webkit doesn&#8217;t do inset shadows with round corners, but adding normal drop shadow in a minus direction may give a good equivalent. (corrected in latest version)</p>
<p>5. For IE it&#8217;s difficult to add round corners and drop shadows.</p>
<p>There&#8217;s a good tutorial from http://www.w3.org/Style/Examples/007/roundshadow.en.html to add drop shadows without extra markup. Good only for IE8.</p>
<p>In conjunction with http://selectivizr.com/ this can allow us to even add round corners in IE6 &#038; 7. (also good for zebra table styling, IE6 hover, targeting a variety of different inputs)</p>
<p>or use jQuery: </p>
<pre class="brush: jscript; title: ; notranslate">
$('blockquote:after').addClass(&amp;quot;boom&amp;quot;); &lt;br /&gt;
$('blockquote').after(' &amp;lt;img src=&amp;quot;/images/external.png&amp;quot; alt=&amp;quot;external link&amp;quot;/&amp;gt;'); &lt;br /&gt;
$(&amp;quot;img.dropshadow&amp;quot;).wrap(&amp;quot;&amp;lt;div class='wrap1'&amp;gt;&amp;lt;div class='wrap2'&amp;gt;&amp;quot; + &amp;quot;&amp;lt;div class='wrap3'&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;/div&amp;gt;&amp;quot;);
</pre>
<p>Or use curvy corners: http://blue-anvil.com/jquerycurvycorners/test.html</p>
<p>6. Gradient filters<br />
- e.g.<br />
filter:  progid:DXImageTransform.Microsoft.gradient(startColorStr=&#8217;#c31026&#8242;, EndColorStr=&#8217;#5f0004&#8242;);</p>
<p>for IE &#8211; only work on IE6 &#038; 7 if a height is set. (If you cannot use a height then set a background image &#8211; you will need background images for gradients in older versions of Firefox and Safari.)</p>
<p>7. Combining background images and gradients:</p>
<p>Opera cannot combine background images and gradients, but purports to support css-gradiesnts. Therefore the background image needs to be positioned using a separate element e.g. a span inside a button, &#8211; if for example you want just the gradient to reverse on hover, or you need to serve different css to opera browsers. This is the same for IE (including IE9)</p>
<p>8. Test in:</p>
<p>Firefox 3.6.13<br />
Firefox 3.0 (No support for CSS3 round corners &#038; gradients)<br />
Firefox 2.0 (No support for CSS3 round corners &#038; gradients)</p>
<p>IE 8 &#8211; (No support for CSS3 round corners)<br />
IE 7 &#8211; (No support for CSS3 round corners &#038; gradients)<br />
IE 6 &#8211; (Fully functional, No support for PNG opacity, CSS3)</p>
<p>Safari 5 (5.0.2)<br />
Safari 4 (4.0.5)<br />
Safari 3 (3.2.3)</p>
<p>Chrome 8</p>
<p>Opera 11<br />
Opera 10 (10.6.3) (No support for CSS3 round corners &#038; gradients)</p>
]]></content:encoded>
			<wfw:commentRss>http://www.ekstasis.net/log/css/css3-graceful-degredation.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Buttons</title>
		<link>http://www.ekstasis.net/log/css/buttons.html</link>
		<comments>http://www.ekstasis.net/log/css/buttons.html#comments</comments>
		<pubDate>Sun, 18 Jul 2010 19:57:19 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[CSS]]></category>
		<category><![CDATA[Web Development]]></category>
		<category><![CDATA[buttons]]></category>
		<category><![CDATA[css]]></category>

		<guid isPermaLink="false">http://www.ekstasis.net/log/?p=95</guid>
		<description><![CDATA[Here&#8217;s some CSS buttons. These will stretch to fit any amount of text &#8211; even if it gets so large it becomes a banner. They use just one image &#8211; and have a &#8221;web 2.0&#8221; sheen. They have an icon (which can be positioned to the left or right) They have a hover state &#8211; [...]]]></description>
			<content:encoded><![CDATA[<p>Here&#8217;s some CSS buttons.</p>
<p>These will stretch to fit any amount of text &#8211; even if it gets so large it becomes a banner.<br />
They use just one image &#8211; and have a &#8221;web 2.0&#8221; sheen.<br />
They have an icon (which can be positioned to the left or right)<br />
They have a hover state &#8211; the text and the background colour can change.</p>
<p><a class="btn" href="#nogo"><strong><strong><strong>Shrink-wrapped buttons</strong></strong></strong></a><br />
<a class="btn_grn btn" href="#nogo"><strong><strong><strong><strong>Shrink-wrapped buttons</strong></strong></strong></strong></a></p>
<p><a class="btn_grn2 btn" href="#nogo"><strong><strong><strong><strong>Shrink-wrapped buttons</strong></strong></strong></strong></a><br />
<a class="btn_brwn btn" href="#nogo"><strong><strong><strong>..and a final one!</strong></strong></strong></a></p>
<div class="clearer"></div>
<p>Here&#8217;s the code:</p>
<pre class="brush: css; title: ; notranslate">
a.btn,
a.btn:visited {
    float:left;
    background-color: #80c64c;
    background-image: url(/images/blog/btn.png);
    color:#fff;
    text-decoration:none;
    font-size:0.95em;
    clear:both;
    margin:0 0 12px 6px;
    line-height: 1.1;
    letter-spacing: 0;
}
a:hover.btn {
    color:#ff0;
}
a.btn * {
    display:block;
    font-weight:normal;
}
a.btn b {
    margin-left:6px;
    padding:2px 0 0 0;
    background: transparent url(/images/blog/btn.png) right top;
}
    a.btn b b {
    margin:0 0 0 -6px;
    padding:0 0 0 12px;
    background-position: left bottom;
}
a.btn b b b {
    padding:6px 12px 12px 0px;
    margin: 0;
    background-position: right bottom;
    text-indent: -3px;
}

a.btn_grn,
a.btn_grn:visited {
    background-color: #80c64c;
}
a.btn_grn b b b b {
    padding: 0 28px 0 0;
    background-image: url(/images/blog/arrows.png);
    background-position: right center;
    background-repeat: no-repeat;
}
</pre>
<pre class="brush: xml; title: ; notranslate">
&lt;a class=&quot;btn&quot; href=&quot;#&quot;&gt;
    &lt;b&gt;&lt;b&gt;&lt;b&gt;Shrink-wrapped buttons&lt;/b&gt;&lt;/b&gt;&lt;/b&gt;
&lt;/a&gt;

&lt;a class=&quot;btn_grn btn&quot; href=&quot;#&quot;&gt;
    &lt;b&gt;&lt;b&gt;&lt;b&gt;&lt;b&gt;Shrink-wrapped buttons&lt;b&gt;&lt;/b&gt;&lt;/b&gt;&lt;/b&gt;
&lt;/a&gt;

&lt;a class=&quot;btn_grn2 btn&quot; href=&quot;#&quot;&gt;
   &lt;b&gt;&lt;b&gt;&lt;b&gt;&lt;b&gt;Shrink-wrapped buttons&lt;/b&gt;&lt;/b&gt;&lt;/b&gt;&lt;/b&gt;
&lt;/a&gt;

&lt;a class=&quot;btn_brwn btn&quot; href=&quot;#&quot;&gt;
    &lt;b&gt;&lt;b&gt;&lt;b&gt;..and a final one!&lt;/b&gt;&lt;/b&gt;&lt;/b&gt;
&lt;/a&gt;
</pre>
<p>This is an adaption to the work done by:<br />
<a href="http://www.schillmania.com/content/entries/2006/04/more-rounded-corners/">schillmania.com &#8211; More Rounded Corners with CSS<br />
</a><a href="http://www.456bereastreet.com/lab/bulletproof-shrinkwrapping-buttons/">456bereastreet.com &#8211; Bulletproof shrinkwrapping buttons</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.ekstasis.net/log/css/buttons.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>CSS tags</title>
		<link>http://www.ekstasis.net/log/css/css-tags.html</link>
		<comments>http://www.ekstasis.net/log/css/css-tags.html#comments</comments>
		<pubDate>Tue, 23 Mar 2010 19:29:52 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[CSS]]></category>

		<guid isPermaLink="false">http://www.ekstasis.net/log/?p=74</guid>
		<description><![CDATA[Here&#8221;s some tags. They stretch to fit the text and change state on hover: tag 1 tag whatever you like tag three Here&#8217;s the code and image:]]></description>
			<content:encoded><![CDATA[<p>Here&#8221;s some tags. They stretch to fit the text and change state on hover:</p>
<div id="cssTags">
<ul class="tags">
<li><a href="#">tag 1</a></li>
<li><a href="#">tag whatever you like</a></li>
<li><a href="#">tag three</a></li>
</ul>
<div class="clear"></div>
</div>
<p><br/></p>
<p>Here&#8217;s the code and image:</p>
<pre class="brush: css; title: ; notranslate">
    .tags {
	margin: 0 0 5px 0;
	padding: 0;
	list-style: none;
	background-colour: transparent;
    }
    .tags li {
	display: inline;
    }
    .tags li a {
	display:block;
	float:left;
	font-size:14px;
	line-height:16px;
	height:20px;
	overflow: hidden;
	margin: 5px 0 0 0;
	padding: 4px 14px 0 26px;
	text-decoration:none;
	background:transparent url(/images/blog/tag.gif) no-repeat 0 0;
	border-right:1px solid #666666;
    }
    .tags li a:hover {
	background-position: 0 -24px;
    }
</pre>
<pre class="brush: xml; title: ; notranslate">
&lt;ul class=&quot;tags&quot;&gt;
      &lt;li&gt;&lt;a href=&quot;#&quot;&gt;tag 1&lt;/a&gt;&lt;/li&gt;
      &lt;li&gt;&lt;a href=&quot;#&quot;&gt;tag whatever you like&lt;/a&gt;&lt;/li&gt;
      &lt;li&gt;&lt;a href=&quot;#&quot;&gt;tag three&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
</pre>
<p><img src="http://www.ekstasis.net/log/wp-content/uploads/tag.gif" alt="tags"/></p>
]]></content:encoded>
			<wfw:commentRss>http://www.ekstasis.net/log/css/css-tags.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Accessible image replacement</title>
		<link>http://www.ekstasis.net/log/css/accessible-image-replacement.html</link>
		<comments>http://www.ekstasis.net/log/css/accessible-image-replacement.html#comments</comments>
		<pubDate>Sun, 19 Apr 2009 19:21:35 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[CSS]]></category>

		<guid isPermaLink="false">http://www.ekstasis.net/log/?p=548</guid>
		<description><![CDATA[Normally examples of image replacement don&#8217;t include a link, but you usually want the logo to link somewhere. With a small tweak here&#8217;s how: Note: This example ensures the text is visible if images are turned off. This technique does not work with transparent images.]]></description>
			<content:encoded><![CDATA[<p>Normally examples of image replacement don&#8217;t include a link, but you usually want the logo to link somewhere. With a small tweak here&#8217;s how:</p>
<pre class="brush: css; title: ; notranslate">
.replace {
      position:relative;
      margin:0; padding:0;
}
.replace span{
      position:absolute;
      top:0; left:0;
}
#logo a, #logo span {
      display: block;
      width:218px;
      height:51px;
      background-image: url('images/logo.jpg');
}
</pre>
<pre class="brush: xml; title: ; notranslate">
&lt;h1 id=&quot;logo&quot;&gt;
&lt;a class=&quot;replace&quot; href=&quot;#&quot; title=&quot;Site name&quot;&gt;Site Name&lt;span&gt;&lt;/span&gt;&lt;/a&gt;
&lt;/h1&gt;
</pre>
<p>Note: This example ensures the text is visible if images are turned off. This technique does not work with transparent images.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.ekstasis.net/log/css/accessible-image-replacement.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>DHTML tree menu testing</title>
		<link>http://www.ekstasis.net/log/css/dhtml-tree-menu-testing.html</link>
		<comments>http://www.ekstasis.net/log/css/dhtml-tree-menu-testing.html#comments</comments>
		<pubDate>Tue, 19 Dec 2006 20:49:02 +0000</pubDate>
		<dc:creator>mat</dc:creator>
				<category><![CDATA[CSS]]></category>
		<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[Web Development]]></category>

		<guid isPermaLink="false">http://www.ekstasis.net/log/2006/12/19/dhtml-tree-menu-testing/</guid>
		<description><![CDATA[Testing and evaluating DHTML menu trees. Each menu included in the list (below) has it&#8217;s own testing area. They&#8217;ve been tested for full functionality within a working &#8216;mini site&#8217; and adapted to demonstrate whether it&#8217;s possible to open nested levels and display the current location without altering the body tag. Here&#8217;s the list of menus [...]]]></description>
			<content:encoded><![CDATA[<div align="center"><img alt="menu tree" title="menu tree" class="reflect rheight20 ropacity40" src="/images/logpics/menutree.jpg" /></div>
<h4>Testing and evaluating DHTML menu trees.</h4>
<p>Each menu included in the list (below) has it&#8217;s own testing area. They&#8217;ve been tested for full functionality within a working &#8216;mini site&#8217; and adapted to demonstrate whether it&#8217;s possible to open nested levels and display the current location without altering the body tag.</p>
<p>Here&#8217;s the list of menus with a link to the test and a link to the original sites:</p>
<table width="100%" cellpadding="0" border="0">
<tr>
<td><strong>Link to test area</strong></td>
<td><strong>Link to original site</strong></td>
</tr>
<tr>
<td><a href="/tests/menu08/">ECMA menu test</a><a href="/tests/menu12/" /></td>
<td><a href="http://juicystudio.com/article/ecmascriptmenu.php">Juicystudio.com menu</a></td>
</tr>
<tr>
<td><a href="/tests/menu08/">Ecommnet menu test</a></td>
<td><a href="http://www.ecommnet.co.uk/test/juicymenu/testthis4.asp">Ecommnet.co.uk menu</a></td>
</tr>
<tr>
<td><a href="/tests/menu12/">PDE menu test</a></td>
<td><a href="http://onlinetools.org/tools/dom-tree-menu-puredom/">Onlinetools.org menu</a></td>
</tr>
<tr>
<td><a href="/tests/menu09/">Splintered menu test</a></td>
<td><a href="http://www.splintered.co.uk/experiments/archives/menu_replace/">Splintered.co.uk menu</a></td>
</tr>
<tr>
<td><a href="/tests/menu03/">DNolan menu test</a></td>
<td><a href="http://www.dnolan.com/code/js/listmenu/">DNolan.com menu</a></td>
</tr>
<tr>
<td><a href="/tests/menu13/">MKTree menu test</a></td>
<td><a href="http://www.mattkruse.com/javascript/mktree/">Mattkruse.com MKTree menu</a></td>
</tr>
<tr>
<td><a href="/tests/menu10/">Simple Tree menu test</a></td>
<td><a href="http://www.dynamicdrive.com/dynamicindex1/navigate1.htm">Dynamicdrive.com menu</a></td>
</tr>
<tr>
<td><a href="/tests/menu05/">Click drop menu test</a></td>
<td><a href="http://bonrouge.com/br.php?page=clickdrop">Bonrouge.com Clickdrop menu</a></td>
</tr>
<tr>
<td><a href="/tests/menu01/">CreateMenu menu test</a></td>
<td><a href="http://www.codingforums.com/showthread.php?t=42084&#038;page=5">Codingforums.com Mike&#8217;s tree</a></td>
</tr>
<tr>
<td><a href="/tests/menu11/">Gazingus menu test</a></td>
<td>Site no longer available</td>
</tr>
</table>
<p>
<span id="more-32"></span></p>
<p>Displaying the &#8216;current location&#8217; is vital for clear site navigation. This feature is not usually included with the original menu source code. In order to test whether it is possible to adapt the menus to include this feature each menu has been set up &#8211; where possible &#8211; to indicate the &#8216;current location&#8217; and automatically open the tree at that level.</p>
<p>Links below include the local test area and the original URL providing the source code.</p>
<p>Only free-of-charge menu systems are included in this evaluation.</p>
<p>Overview of evaluation criteria:</p>
<ul>
<li>Is it accessible? Driveable by keyboard only?</li>
<li>How separate is the content, presentation, and behaviour.</li>
<li>Does it degrade well without JavaScript or CSS?</li>
<li>How easy is it to indicate the &#8216;current location&#8217; of the page selected?</li>
<li>Does it opens and displays current status for an included page &#8211; [e.g. HTML: main.php?page=page1.] i.e. cannot use body tags or code in  section of page?</li>
<li>When clicking on the parent item / title of the section do the nested list items open &#8211; i.e. not just clicking on the graphic which can cause confusion?</li>
<li>Is it xhtml 1.0 strict valid?</li>
</ul>
<p>In order to keep the nested levels visible at a specific location I have used one of two types of server-side functions:</p>
<pre><code><</code>?php
$theuri = $_SERVER['REQUEST_URI']; ?>
<code><</code>?php
if ( ($theuri =="/s01sub1a01.php") or ($theuri ==
"/tests/menu13/section1pages/s01sub1a02.php"))
echo " class="liOpen"";
else echo " class="liClosed""; ?>
</pre>
<p>or</p>
<pre><code><</code><code>?php
if ( ($thisPage=="s01sub1b01")
or ($thisPage=="s01sub1b02") or ($thisPage=="s01sub1b03") )
echo " rel="open""; ?></code></pre>
<p>A better method to use is demonstrated below.<br />
This has not been used in these tests because of the need for<br />
modRewrite using the RewriteEngine:</p>
<pre><code>$lines = split("n", $menu);
foreach ($lines as $line) {
$current = false;
preg_match('/href="([^" mce_href="([^"]+)"/', $line, $url);
if (substr($_SERVER["REQUEST_URI"], 0, 5) == substr($url[1], 0, 5)) {
$line = str_replace('</code><code><</code>a h', '<code><</code>
<code>a id="current" h', $line); }
echo $line."n";
}
</code>
</pre>
<p>[Full source code available at: <a title="pregmatch code" href="http://photomatt.net/scripts/intellimenu">http://photomatt.net/</a> ]</p>
<p></p>
<p>or</p>
<pre><code><</code><code>?php
$menu =
file_get_contents("/inc/menu.htm");
$menu = preg_replace("|</code><code><</code>li><code><</code>
<code>a xhref="" .
basename($_SERVER['PHP_SELF']) . "">(.*),/code><code><</code><code>!--[^-->]+></code>
<code><</code><code>/li>|U","</code><code><</code>
<code>li class="current">$1</code><code><</code><code>/li>", $menu);
echo $menu;</code>
<code>?></code></pre>
<p>[Full source code currently lost and code not tested. ]</p>
]]></content:encoded>
			<wfw:commentRss>http://www.ekstasis.net/log/css/dhtml-tree-menu-testing.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>PNG transparency rounded corners using images</title>
		<link>http://www.ekstasis.net/log/css/png-transparency-rounded-corners-using-images.html</link>
		<comments>http://www.ekstasis.net/log/css/png-transparency-rounded-corners-using-images.html#comments</comments>
		<pubDate>Wed, 06 Dec 2006 22:06:18 +0000</pubDate>
		<dc:creator>mat</dc:creator>
				<category><![CDATA[CSS]]></category>
		<category><![CDATA[Web Development]]></category>

		<guid isPermaLink="false">http://www.ekstasis.net/log/?p=33</guid>
		<description><![CDATA[UPDATE: Schillmaina has produced a new improved solution. See it here. It seems like there&#8217;s a million and one different solutions for creating round corners for boxes. There&#8217;s a good summary of many of the rounded corners solutions at www.smileycat.com: CSS Rounded Corners &#8216;Roundup&#8217; That&#8217;s why it&#8217;s surprising to find there&#8217;s no cross-browser solution for [...]]]></description>
			<content:encoded><![CDATA[<div align="center"><img title="rounded corners title" alt="rounded corners title" class="reflect rheight20 ropacity40" src="/images/logpics/rndcorners.jpg" /></div>
<p><strong>UPDATE</strong>: Schillmaina has produced a new improved solution. <a href="http://www.schillmania.com/content/projects/even-more-rounded-corners/">See it here.</a></p>
<p>It seems like there&#8217;s a million and one different solutions for creating round corners for boxes. There&#8217;s a good summary of many of the rounded corners solutions at www.smileycat.com: <a href="http://www.smileycat.com/miaow/archives/000044.html">CSS Rounded Corners &#8216;Roundup&#8217;</a></p>
<p>That&#8217;s why it&#8217;s surprising to find there&#8217;s no cross-browser solution for rounded corners using PNG transparent images.</p>
<p><span id="more-33"></span></p>
<p>But by tweaking one of the solutions out there it appears it is possible to get cross-browser solution for <a href="http://www.ekstasis.net/tests/rndcorners/">PNG transparency rounded corners using images. Click the link to see it in action.<br />
</a></p>
<p>One of the closest there is to a working solution can be found at <a href="http://www.schillmania.com/content/entries/2006/04/more-rounded-corners/">Schillmania&#8217;s rounded corners solution</a>.</p>
<p>Unfortunately there&#8217;s was an overlap producing a small imperfection. See <a href="http://www.ekstasis.net/tests/rndcorners/">the test</a> for an image displaying this.</p>
<p>Another downside is that&#8217;s also only possible to use an opaque box with that CSS code (and support IE6) &#8211; only the shadow effect can be transparent. A transparent white box with left border ornamentation isn&#8217;t possible.</p>
<p>The code used in <a href="http://www.ekstasis.net/tests/rndcorners/">the test</a> has been updated to give the following enhancements:</p>
<ol>
<li>It now works in Internet Explorer 7.</li>
<li>Created new code to enable a design which includes border ornamentation on all four sides.</li>
<li>Added Stu Nicholl&#8217;s (<a href="http://www.cssplay.co.uk/">CSSPlay.co.uk</a>) <a href="http://www.cssplay.co.uk/boxes/width2.html">minimum width for Internet Explorer 6</a> solution so that the layout doesn&#8217;t collapse at narrow browser widths.</li>
<li>Used conditional comments to serve Internet Explorer 6 with non transparent GIF images (and a white background for the BODY).</li>
</ol>
<p>Although there are a huge number of rounded corner solutions with much better mark-up and CSS code, designers sometimes need the flexibility of using images, and the png drop show effect.</p>
<p>Unfortunately the <a href="http://www.456bereastreet.com/archive/200505/transparent_custom_corners_and_borders/">JavaScript solution</a> from 456bereastreet.com doesn&#8217;t work in IE7. (See <a href="http://www.ekstasis.net/tests/rndcorners/">the test</a> for an image displaying this.)</p>
<p>There are better solutions for using gif images when the transparent png effect for shadows aren&#8217;t needed:</p>
<p>Check out Franky&#8217;s solution at his <a href="http://home.tiscali.nl/developerscorner/liquidcorners/liquid-corners-playgarden-08b.htm">developerscorner</a>.</p>
<p>And there is the solution from A List Apart: <a href="http://www.alistapart.com/articles/customcorners2/">Creating Custom Corners &#038; Borders Part II</a>.</p>
<p>The CSS used for the box above relies on the more forgiving nature of the black colour. The design only requires an image on the right hand side to give the shadow effect &#8211; on the left no image is needed as it&#8217;s just plain black.</p>
<p>In order to make the opaque design above (from schillmania.com) work in Internet Explorer 7 the following changes were needed:</p>
<p>Added the following CSS to .box .bd .c  : { position: relative; padding-right: 6px; width: 100%; height: 100%;</p>
<p>Then reduced the right margin of .box .bd .c .s by 6px</p>
<p>In order to have <a href="/tests/rndcorners/index.htm#whitecorners">this second design</a> which includes border ornamentation on all four sides &#8211; working in a fairly similar fashion in both modern browsers and Internet Explorer 6 &#8211; the following adaptions to the IE6 style sheet were needed:</p>
<ol>
<li>Crop the middle left border image so it doesn&#8217;t cover the entire width</li>
<li>Move the middle right border image into the main inside DIV &#8211; where the text resides (this meant leaving out the image with the daisies.)</li>
<li>Adjusting the margin on the inside DIV so the middle left boder image can be seen beneath it (margin:0px -4px 0px 14px;)</li>
</ol>
]]></content:encoded>
			<wfw:commentRss>http://www.ekstasis.net/log/css/png-transparency-rounded-corners-using-images.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Liquid Layouts</title>
		<link>http://www.ekstasis.net/log/css/liquid-layouts.html</link>
		<comments>http://www.ekstasis.net/log/css/liquid-layouts.html#comments</comments>
		<pubDate>Sun, 26 Nov 2006 23:14:03 +0000</pubDate>
		<dc:creator>mat</dc:creator>
				<category><![CDATA[CSS]]></category>
		<category><![CDATA[Web Development]]></category>

		<guid isPermaLink="false">http://www.ekstasis.net/log/?p=34</guid>
		<description><![CDATA[This is the web: it moves. We have small screens, wide screens, and a variety of needs for the desktop space on any screen. Fixed layouts are for magazines. If visitors have a 1024 pixels wide screen &#8211; and they don&#8217;t want to stretch the browser widow across the entire width &#8211; any 1024 pixel [...]]]></description>
			<content:encoded><![CDATA[<div align="center"><img class="reflect rheight20 ropacity40" alt="Liquid Layouts" title="Liquid Layouts" src="/images/logpics/liquidlayouts.jpg" /></div>
<p>This is the web: it moves. We have small screens, wide screens, and a variety of needs for the desktop space on any screen. Fixed layouts are for magazines.</p>
<p>If visitors have a 1024 pixels wide screen &#8211; and they don&#8217;t want to stretch the browser widow across the entire width &#8211; any 1024 pixel wide fixed layout means horizontal scrolling &#8211; and that&#8217;s not very nice.</p>
<p>In order to demonstrate liquid or fixed CSS functionality within the page it&#8217;s necessary to have a liquid layout. It&#8217;s even possible to have a liquid elastic layout.</p>
<p>Here&#8217;s a list of some of the best liquid layout tutorials on the web: <a title="Liquid Layout Links" href="/site/cst/css_layout">CSS Liquid Layouts</a>.</p>
<p>Liquid layouts do need a minimum width to stop the design breaking when the browser is narrowed. CSS or JavaScript can be used to do this (<a title="Mix Max Links" href="/site/cst/css_minmax">click here for some links</a>.)</p>
<p>O.K., a rant about liquid layouts within a fixed layout design may be the epitome of irony but hypocrisy is this &#8220;blogger&#8217;s&#8221; speciality. This liquid layout for WordPress: <a title="Seabeat" href="http://green-beast.com/seabeast/">SeaBeast</a> looks great. It doesn&#8217;t have a minimum width but uses a drop column technique so the design looks good at narrow widths.</p>
<p>Here&#8217;s a couple of liquid layouts with border images to give great flexibility with web page design:</p>
<div style="text-align: center">
<img alt="Eklayout1" title="Eklayout1" src="/images/logpics/eklayout1_screenshot.jpg" />
</div>
<div style="text-align: center"><a title="Eklayout 1" href="/tests/eklayout1/">click to see layout 1</a></div>
<div style="text-align: center">
<img alt="Eklayout 2" title="Eklayout 2" src="/images/logpics/eklayout2_screenshot.jpg" />
</div>
<div style="text-align: center"><a title="Eklayout 2" href="/tests/eklayout2/">click to see layout 2</a></div>
<p>Make like the polar ice caps: go liquid.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.ekstasis.net/log/css/liquid-layouts.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>CSS Hacking tips</title>
		<link>http://www.ekstasis.net/log/css/css-hacking-tips.html</link>
		<comments>http://www.ekstasis.net/log/css/css-hacking-tips.html#comments</comments>
		<pubDate>Fri, 10 Nov 2006 18:12:30 +0000</pubDate>
		<dc:creator>mat</dc:creator>
				<category><![CDATA[CSS]]></category>
		<category><![CDATA[Web Development]]></category>

		<guid isPermaLink="false">http://www.ekstasis.net/log/?p=17</guid>
		<description><![CDATA[Conditional comments IE conditional comments ( Websemantics.co.uk &#8211; conditional comments ) The format is: Only IE displays this text if the condition is met There are 6 conditions that can be applied (there's a "logical not" case too): [if IE] - if above or equal to version 5 [if IE 6] - if equal to [...]]]></description>
			<content:encoded><![CDATA[<h4 class="startitle">Conditional comments</h4>
<h5 class="blogtitle">IE conditional comments ( <a href="http://www.websemantics.co.uk/tutorials/useful_css_snippets/">Websemantics.co.uk &#8211; conditional comments</a> )</h5>
<p>The format is:<br />
<code><</code>!--[if "condition" IE "version number"]<code>></code> Only      IE displays this text if the condition is met  <code><</code>![endif]--<code>></code></p>
<p>There are 6 conditions that can be applied (there's a "logical not"      case too):</p>
<ol>
<li>[if IE] - if above or equal to version 5</li>
<li>[if IE 6] - if equal to version 6</li>
<li>[if lt IE 6] - if less than version 6</li>
<li>[if lte IE 6] - if less than or equal to version 6</li>
<li>[if gt IE 6] - if greater than version 6</li>
<li>[if gte IE 6] - if greater than or equal to version 6</li>
</ol>
<p>Valid version numbers are 5, 5.5, 6 and 7.      (There is support for specific version numbers such as 5.0453.)</p>
<p>For adding a style for IE v5 only:</p>
<p align="left"><code><</code>!--[if IE 5]<code>></code> <code><</code>style type="text/css"<code>></code>@import "IE5_only.css";<code><</code>/style<code>></code>      <code><</code>![endif]--<code>></code></p>
<p>Validators do not check the code inside the comments so take care.</p>
<h4 class="startitle">Internet Explorer 6 hacks</h4>
<h5 class="blogtitle">Min height fast hack ( <a href="http://www.dustindiaz.com/min-height-fast-hack/">Dustindiaz</a> )</h5>
<p>selector {<br />
min-height:500px;<br />
height:auto !important;<br />
height:500px;<br />
}</p>
<p><span id="more-17"></span></p>
<h5 class="blogtitle">Box model hack with wrapper ( <a href="http://www.webreference.com/authoring/style/sheets/layout/advanced/">www.webreference.com</a> )</h5>
<p>The IE box model problem does not affect Internet Explorer 6, which uses the standard box model (provided there exists a doctype to switch the browser into standards mode)</p>
<p>Older versions of Internet Explorer incorrectly calculate the width and height of block level items by including padding values within the boxâ€™s dimensions, rather than adding it outside the box. If you have a div validly specified like this:</p>
<p>div {_ width: 100px;_ padding: 5px;_ border: 5px solid #fff;_ }</p>
<p>The div will be 120 pixels wide in most browsers, but only 100 pixels wide in IE.</p>
<p>The easiest solutions is the box-within-a-box method, which places one div inside another:</p>
<p>div {_ width: 100px;_ }<br />
div .hack {_ padding: 5px;_ border: 5px solid #fff;_ }</p>
<p>This is applied in the following way:<br />
<code><</code>div<code>></code><br />
<code><</code>div class=â€hackâ€<code>></code><br />
Your content goes here<br />
<code><</code>/div<code>></code><br />
<code><</code>div<code>></code></p>
<p>If you've got to set the width of a box, that also needs padding or borders, separate them into two divs, not one. The rule is: For the same block element you might set horizontal margins and width or horizontal margins, horizontal borders and horizontal padding. Avoid declaring width and padding or width and borders for the same block element. Use nesting to achieve the desired visual.</p>
<p>If you want to use bottom or right properties you have to set either the width or height for the parent and it will work in IE.</p>
<p>Opera conflicts more with the W3C's CSS specification, so you need to set the width for the child if you want to use the right property, if you want to use the bottom property you have to set the height for both parent and child.</p>
<p>Floats can cause clearance problems - especially with forms. Solutions: use a DIV around the enclosing DIV set to clear to avoid this in NS6 or set the form line height to less than the DIV's height and clear the DIV below.</p>
<p>Do not use fixed heights. Version 5/6 IE browsers do not support specification of fixed heights. Also min-height is not supported, in v5/6 browsers. IE 5.5 doesn't support min-width, max-width, min-height, max-height.</p>
<p>In forms, set margin:0 for Opera and Netscape. Especially for floats, to minimize margins like IE.</p>
<h5 class="blogtitle">Autoheight and margin collapsing ( <a href="http://www.researchkitchen.de/blog/archives/css-autoheight-and-margincollapsing.php">Researchkitchen.de</a> )</h5>
<p>The Opera styles declare:</p>
<p>body {<br />
margin: 0;<br />
padding: 8px;<br />
}</p>
<p>On the other hand, Mozilla and Internet Explorer assign the following styles:</p>
<p>body {<br />
margin: 8px;<br />
padding: 0;<br />
}<br />
This is only a slight difference, but it has a lot of impact on our example design:</p>
<p>body {<br />
font: 100%/1.5 Georgia, "Times New Roman", Times, serif;<br />
margin: 0;<br />
padding: 8px;<br />
}</p>
<p>Since there is now a padding, the height of body will change. It will be now the distance from the outer top margin edge to the outer bottom margin edge of its normal-flow block-level child.</p>
<h5 class="blogtitle">Expanding box bug ( <a href="http://www.positioniseverything.net/explorer/expandingboxbug.html">Positioniseverything.net</a> )</h5>
<p>IE5/6/win will (incorrectly) expand the width or height of an div (where a fixed height or width have been specified) if the content extends beyond the specified area. (often  due to font size changes) To avoid breaking the layout you can use overflow-x or overflow-y: hidden.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.ekstasis.net/log/css/css-hacking-tips.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

