<?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>~ overflow ~ &#187; html</title>
	<atom:link href="http://www.overflow.biz/blog/lang/en-us/tag/html/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.overflow.biz/blog</link>
	<description>Coding and Internet Randomness</description>
	<lastBuildDate>Sun, 08 Jan 2012 23:34:17 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en-us</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Gracefully overriding fixed width/height divs</title>
		<link>http://www.overflow.biz/blog/lang/en-us/2010/02/25/gracefully-overriding-fixed-widthheight-divs?utm_source=rss&amp;utm_medium=rss&amp;utm_campaign=gracefully-overriding-fixed-widthheight-divs</link>
		<comments>http://www.overflow.biz/blog/lang/en-us/2010/02/25/gracefully-overriding-fixed-widthheight-divs#comments</comments>
		<pubDate>Thu, 25 Feb 2010 18:03:57 +0000</pubDate>
		<dc:creator>z3n</dc:creator>
				<category><![CDATA[Coding]]></category>
		<category><![CDATA[Tips & Hints]]></category>
		<category><![CDATA[div]]></category>
		<category><![CDATA[fixed]]></category>
		<category><![CDATA[html]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[jQuery]]></category>
		<category><![CDATA[li]]></category>
		<category><![CDATA[overriding things]]></category>
		<category><![CDATA[tableless]]></category>

		<guid isPermaLink="false">http://www.overflow.biz/blog/?p=327</guid>
		<description><![CDATA[Problem:
It&#8217;s like a industry standard now having everthing tableless, although i still thinking that EVERYTHING is too much, this been like the motto of many programmers around. But let&#8217;s skip the blablaing about this and go straight to the point:
You have 2 fixed width div/li `rows` on a site, they are nested and inside the [...]]]></description>
			<content:encoded><![CDATA[<p><strong>Problem:</strong></p>
<p>It&#8217;s like a industry standard now having everthing tableless, although i still thinking that EVERYTHING is too much, this been like the motto of many programmers around. But let&#8217;s skip the blablaing about this and go straight to the point:</p>
<p>You have 2 fixed width div/li `rows` on a site, they are nested and inside the content, due the complex nature of the layout, there&#8217;s some other complications. All of sudden the client decides that he wants to ruin your layout adding a long, waaaaaaaaay long, horizontal listing, which not also overlapps the width of your left column but mostly like will make user&#8217;s screen to horizontally scroll.</p>
<p><strong>Solution:</strong></p>
<p>As much i like to discuss with client, it&#8217;s useless and i will be just wasting my time. This is also a tricky thing to fix since the column sizes are fixed, i would need to make the whole content column bigger, ruining the rest of the top elements. Let&#8217;s take a look on the example:</p>
<blockquote><p>&#60;div style=&#8221;width:600px&#8221;&#62;</p>
<p>content div header code here</p>
<p>&#60;div style=&#8221;width:2000px&#8221;&#62;</p>
<p>way long client designed div to ruin layouts</p>
<p>&#60;/div&#62;</p>
<p>&#60;/div&#62;</p></blockquote>
<p>(styles are just to simplifly)</p>
<p>so the solution (1) would be something like this:</p>
<blockquote><p>&#60;div style=&#8221;width:600px&#8221;&#62;</p>
<p>content div header code here</p>
<p>&#60;div style=&#8221;width:2000px;<strong>position:absolute;</strong>&#8220;&#62;</p>
<p>way long client designed div to ruin layouts</p>
<p>&#60;/div&#62;</p>
<p><strong>&#60;img src=&#8221;blank_image.gif&#8221; width=1 height=</strong><em>same height as the long width div</em><strong>&#62;</strong></p>
<p>&#60;/div&#62;</p></blockquote>
<p>solution (2), if your abomination div is also height dynamic:</p>
<blockquote><p>&#60;div style=&#8221;width:600px&#8221; <strong>id=&#8221;container&#8221;</strong>&#62;</p>
<p>content div header code here</p>
<p>&#60;div style=&#8221;width:2000px;<strong>position:absolute;</strong>&#8221; <strong>id=&#8221;abomination&#8221;</strong>&#62;</p>
<p>way long client designed div to ruin layouts</p>
<p>&#60;/div&#62;</p>
<p>&#60;/div&#62;</p>
<p><strong>&#60;script type=&#8221;text/javascript&#8221;&#62;</strong></p>
<p><strong>// after loading all the content of the abomination div, also assuming that you&#8217;re using jquery<br />
</strong></p>
<p><strong>$(&#8220;#container&#8221;).height(parseFloat($(&#8220;#abomination&#8221;).height()+50)+&#8221;px&#8221;);<br />
</strong></p>
<p><strong>&#60;/script&#62;</strong></p></blockquote>
]]></content:encoded>
			<wfw:commentRss>http://www.overflow.biz/blog/lang/en-us/2010/02/25/gracefully-overriding-fixed-widthheight-divs/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>A different way to change css opacity</title>
		<link>http://www.overflow.biz/blog/lang/en-us/2009/11/10/a-different-way-to-change-css-opacity?utm_source=rss&amp;utm_medium=rss&amp;utm_campaign=a-different-way-to-change-css-opacity</link>
		<comments>http://www.overflow.biz/blog/lang/en-us/2009/11/10/a-different-way-to-change-css-opacity#comments</comments>
		<pubDate>Tue, 10 Nov 2009 21:46:32 +0000</pubDate>
		<dc:creator>z3n</dc:creator>
				<category><![CDATA[Coding]]></category>
		<category><![CDATA[Tips & Hints]]></category>
		<category><![CDATA[alpha]]></category>
		<category><![CDATA[CSS]]></category>
		<category><![CDATA[filter:alpha]]></category>
		<category><![CDATA[html]]></category>
		<category><![CDATA[opacity]]></category>

		<guid isPermaLink="false">http://www.overflow.biz/blog/?p=272</guid>
		<description><![CDATA[I was looking around to fix bugs on IE opacity settings and found out this article, although the rgba don&#8217;t work on ie6 &#60;= , it seemed pretty good for me, not only because it&#8217;s less code, but it&#8217;s smarter; and it&#8217;s also an old thing!
On this sample i will have an some_css class with [...]]]></description>
			<content:encoded><![CDATA[<p>I was looking around to fix bugs on IE opacity settings and found out <a href="http://www.domedia.org/oveklykken/css-transparency.php" target="_blank">this</a> article, although the <em>rgba</em> don&#8217;t work on ie6 &#60;= , it seemed pretty good for me, not only because it&#8217;s less code, but it&#8217;s smarter; and it&#8217;s also an old thing!</p>
<p>On this sample i will have an <em>some_css </em>class with 50% transparency, on the usual method you need to do lots of statements to be compatible with all major browsers, not only that but this makes things harder when you have elements inside the parent element that shouldn&#8217;t be transparent.</p>
<p><strong>Problem:</strong></p>
<p>.some_css {</p>
<p><code>filter:alpha(opacity=<em>50</em>);<br />
opacity:<em>0.5</em>;<br />
-moz-opacity:<em>0.5</em>;<br />
position:relative;</code></p>
<p>}</p>
<p><strong>Solution:</strong></p>
<p>.some_css {</p>
<p>background-color:rgba(0,0,0,<strong>0.5</strong>);</p>
<p>}</p>
<p><strong>Source:</strong></p>
<p><a href="http://www.domedia.org/oveklykken/css-transparency.php" target="_blank">Ove Klykken</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.overflow.biz/blog/lang/en-us/2009/11/10/a-different-way-to-change-css-opacity/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Alternate method for background images</title>
		<link>http://www.overflow.biz/blog/lang/en-us/2009/05/20/alternate-method-for-background-images?utm_source=rss&amp;utm_medium=rss&amp;utm_campaign=alternate-method-for-background-images</link>
		<comments>http://www.overflow.biz/blog/lang/en-us/2009/05/20/alternate-method-for-background-images#comments</comments>
		<pubDate>Wed, 20 May 2009 20:38:17 +0000</pubDate>
		<dc:creator>z3n</dc:creator>
				<category><![CDATA[Tips & Hints]]></category>
		<category><![CDATA[alternate]]></category>
		<category><![CDATA[background]]></category>
		<category><![CDATA[CSS]]></category>
		<category><![CDATA[html]]></category>
		<category><![CDATA[image]]></category>
		<category><![CDATA[picmap]]></category>
		<category><![CDATA[site optmization]]></category>

		<guid isPermaLink="false">http://overflow.biz/blog/?p=108</guid>
		<description><![CDATA[Problem:
When you need to build up a page with lots of little images , like the borders, gradients, different backgrounds , slideshows etc. All into the same page.
You probably will have lots of images on the same page, specially if you cut them to save much bytes as you can, however, you might fall into [...]]]></description>
			<content:encoded><![CDATA[<p><strong>Problem:</strong></p>
<p>When you need to build up a page with lots of little images , like the borders, gradients, different backgrounds , slideshows etc. All into the same page.</p>
<p>You probably will have lots of images on the same page, specially if you cut them to save much bytes as you can, however, you might fall into a different issue:</p>
<p>Too many images will make the load slow as well, since browser will open only 2 connections at same time with the server (every connection takes a while to actually start downloading something since it needs to go thuru all the hops and reach the server etc etc), meaning that all that nice optmization you did worth nothing since you got lots of images.</p>
<p>No good!</p>
<p><strong>Solution:</strong></p>
<p>I&#8217;ve seen this only one time at <em><a href="http://www.hesido.com/web.php?page=customscrollbar" target="_blank">fleXcroll</a></em> script, and many times on old games textures.</p>
<p>The technique used on both is the same, although might not ring a bell for you it&#8217;s pretty simple to use, a little complicated to add on css, but will do the work.</p>
<div class="wp-caption alignleft" style="width: 394px"><img title="Pic Map example" src="http://www.overflow.biz/blog/picmap.jpg" alt="picmap.jpg example" width="384" height="516" /><p class="wp-caption-text">picmap png file zoomed</p></div>
<p>This is a zoomed version of a picmap (I don&#8217;t really know a formal name for this that&#8217;s how i will call it) png I did, you can see it got transparency and stuff.</p>
<p>The different colors and green lines are just to highlight the different images i merged here, they will be used all in background at the css, meaning that i can have the position easily set.</p>
<p>As you can see on the bottom there&#8217;s 2 huge blocks, this is for the horizontal repeat, since i can&#8217;t define a fixed area on the image for the browser to pick as pattern for <em>repeat-x</em> (for example) I need to do this. You may think that it would be a waste, since usually, you can do a 1px width image for this type of thing, however, when you merge pictures toguether you&#8217;re not only saving the connection delay time, but for some image formats you have a header on the file or a color index that, when merged, became smaller than the separated files.</p>
<p>In the original <em>2,65kb</em> png, I managed to merge 17 different pictures, that separated were <em>4,79kb</em>, and yet you can see that there still some space left to add more things if i wanted to.</p>
<p>The css for the top circle (which is actually 4 corners) would look like this:</p>
<blockquote><p>.bB,.bC,.bD,.bE{height:9px;width:9px;font-size:1px;}</p>
<p>.bB{background:url(img/b.png) 0px 0px;}<br />
.bC{background:url(img/b.png) -9px 0px;}<br />
.bD{background:url(img/b.png) -9px -9px;}<br />
.bE{background:url(img/b.png) 0px -9px;}</p></blockquote>
<p>Note that all the positions are negative.</p>
<p>Depending on the usage of your picmap you might want to have <em>repeat-y</em>&#8217;s for example, so you need to rethink the layout in order to take maximum of it.</p>
<p>For me, i only have <em>repeat-x</em> backgrounds, so I broke it in different formats, <strong>gif</strong>, <strong>png</strong> and <strong>jpg</strong>, doing that I could take the best of each.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.overflow.biz/blog/lang/en-us/2009/05/20/alternate-method-for-background-images/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>document.onLoad and  difference</title>
		<link>http://www.overflow.biz/blog/lang/en-us/2008/11/05/documentonload-and-difference?utm_source=rss&amp;utm_medium=rss&amp;utm_campaign=documentonload-and-difference</link>
		<comments>http://www.overflow.biz/blog/lang/en-us/2008/11/05/documentonload-and-difference#comments</comments>
		<pubDate>Wed, 05 Nov 2008 13:33:54 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Coding]]></category>
		<category><![CDATA[html]]></category>
		<category><![CDATA[javascript]]></category>

		<guid isPermaLink="false">http://overflow.biz/blog/?p=17</guid>
		<description><![CDATA[document.onLoad works faster, and apparently, if you put it on a separated .js file, it will refeer only to the .js file itself not the whole html page, while body onLoad will run only when the whole thing is loaded, which is better, for my case it&#8217;s the solution since other .js had to load [...]]]></description>
			<content:encoded><![CDATA[<p>document.onLoad works faster, and apparently, if you put it on a separated .js file, it will refeer only to the .js file itself not the whole html page, while body onLoad will run only when the whole thing is loaded, which is better, for my case it&#8217;s the solution since other .js had to load first.</p>
<p>so,</p>
<p>issue:</p>
<p>document.onLoad causes an error (this can only be noticed online when things aren&#8217;t loaded instant)</p>
<p>solution:</p>
<p>body onLoad tag among with a little timer to display the div i want.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.overflow.biz/blog/lang/en-us/2008/11/05/documentonload-and-difference/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Javascript Argument Handling</title>
		<link>http://www.overflow.biz/blog/lang/en-us/2008/10/31/javascript-argument-handling?utm_source=rss&amp;utm_medium=rss&amp;utm_campaign=javascript-argument-handling</link>
		<comments>http://www.overflow.biz/blog/lang/en-us/2008/10/31/javascript-argument-handling#comments</comments>
		<pubDate>Fri, 31 Oct 2008 16:22:48 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Coding]]></category>
		<category><![CDATA[html]]></category>
		<category><![CDATA[javascript]]></category>

		<guid isPermaLink="false">http://overflow.biz/blog/?p=16</guid>
		<description><![CDATA[Problem:
yourhappyhtml.html?argument=xxx
Solution:
function d(){var x=window.location.search.split(&#8216;?&#8217;);if(isset(x[1])){setTimeout(&#8220;z(&#8220;+x[1]+&#8221;)&#8221;,200);}}
Explanation:
this will call a function z that will show a specific hidden div depending on the parameter sent, due random crappyness on onload function i added a timer as a workaround, to call this in a bare way you should do ?number , and nothing else, x[0] is always null, isset() is:
function isset(v) [...]]]></description>
			<content:encoded><![CDATA[<p>Problem:</p>
<p>yourhappyhtml.html?argument=xxx</p>
<p>Solution:</p>
<p>function d(){var x=window.location.search.split(&#8216;?&#8217;);if(isset(x[1])){setTimeout(&#8220;z(&#8220;+x[1]+&#8221;)&#8221;,200);}}</p>
<p>Explanation:</p>
<p>this will call a function z that will show a specific hidden div depending on the parameter sent, due random crappyness on onload function i added a timer as a workaround, to call this in a bare way you should do ?number , and nothing else, x[0] is always null, isset() is:</p>
<p>function isset(v) { return ((v == undefined) &#124;&#124; (v == &#8220;&#8221;)) ? false : true; }</p>
<p>to send more than one argument you will need to split the &#8220;=&#8221; as well inside the x[1], since javascript will take the whole query as a variable.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.overflow.biz/blog/lang/en-us/2008/10/31/javascript-argument-handling/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Javascript to Replace Accent Chars</title>
		<link>http://www.overflow.biz/blog/lang/en-us/2008/10/18/javascript-to-replace-accent-chars?utm_source=rss&amp;utm_medium=rss&amp;utm_campaign=javascript-to-replace-accent-chars</link>
		<comments>http://www.overflow.biz/blog/lang/en-us/2008/10/18/javascript-to-replace-accent-chars#comments</comments>
		<pubDate>Sat, 18 Oct 2008 12:40:18 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Coding]]></category>
		<category><![CDATA[accent]]></category>
		<category><![CDATA[html]]></category>
		<category><![CDATA[javascript]]></category>

		<guid isPermaLink="false">http://overflow.biz/blog/?p=14</guid>
		<description><![CDATA[Problem:
convert accent html encoded chars, like &#38;#231; , to their real values in javascript
Solution:

var _chr=[];var _etn=[];for(var x=0;x&#60;95;x++){_chr[x]=(x+161);_etn[x]="&#38;#"+(x+161)+";";} // replacing all chars could be slow you would like to restrict it to only the accent chars or the ones that you like
function chr(x){return String.fromCharCode(x);} function e2c(s){for(var x=0;x&#60;95;x++){var m=s.indexOf(_etn[x]);while(m!=-1){s=s.replace(_etn[x],chr(_chr[x]));m=s.indexOf(_etn[x]);}}return s;}
you can test by:
alert(e2c(&#8220;&#38;#161;&#38;#161;&#38;#161;&#38;#161;&#38;#162;&#38;#231;&#38;#231;&#38;#227;&#38;#164;&#38;#165;&#38;#191;&#8221;));
to do the reverse just [...]]]></description>
			<content:encoded><![CDATA[<p>Problem:</p>
<p>convert accent html encoded chars, like &#38;#231; , to their real values in javascript</p>
<p>Solution:</p>
<p><code><br />
var _chr=[];var _etn=[];for(var x=0;x&#60;95;x++){_chr[x]=(x+161);_etn[x]="&#38;#"+(x+161)+";";} // replacing all chars could be slow you would like to restrict it to only the accent chars or the ones that you like<br />
function chr(x){return String.fromCharCode(x);}</code><code> function e2c(s){for(var x=0;x&#60;95;x++){var m=s.indexOf(_etn[x]);while(m!=-1){s=s.replace(_etn[x],chr(_chr[x]));m=s.indexOf(_etn[x]);}}return s;}</code></p>
<p>you can test by:</p>
<p>alert(e2c(&#8220;&#38;#161;&#38;#161;&#38;#161;&#38;#161;&#38;#162;&#38;#231;&#38;#231;&#38;#227;&#38;#164;&#38;#165;&#38;#191;&#8221;));</p>
<p>to do the reverse just change the order of the replace vars</p>
<p>note that javascript is lame and don&#8217;t have array replace and it will only replace a single char on the string (even if there&#8217;s more) so lots of loops had to be added to it, this might be a drawback if you use this too many times into a same page or into very large texts.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.overflow.biz/blog/lang/en-us/2008/10/18/javascript-to-replace-accent-chars/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

