CSS: make divs auto adjust automatically to different heights on the container div

Basically you put a clear:both at the bottom of the floated elements, to pull the height of the container div down: <html> <head> <style type=”text/css” media=”screen”> #container { background-color:#CCCC99; width:50%; } </style> </head> <body> <div id=”container”> <div id=”left” style=”float:left;background-color:#CCCCCC; width: 40px;”>Too much content it goes off the background of the container div, how do I […]

CSS Sprites

How to generate them. The easiest way is to use SpriteMe generator: http://spriteme.org/ Add it to your browser as a bookmarklet, when you are in the website you want a sprite for click on the bookmark, and click on the “sprite images” button to autogenerate it. You can also get the CSS for it on […]

Javascript: Closures / object / function in javascript

Functions are first-class objects, i.e. they are objects and can be manipulated and passed around like just like any other object. Specifically, they are Function objects. A closure is an expression (typically an inner function) that can have free variables together with an environment that binds those variables (that “closes” the expression). Inner functions have […]