Archives for "Code"
Active State in Navigation PURE CSS!
Yes it’s old thing in web-developing, you always need a active state for menu and you do it with different ways like this but i did something today, It’s not big and new tech just what i figure it out and it’s so easy to do.
HTML
<div id=”menu_wrapper”>
<ul>
<li><span>Dashboard</span></li>
<li><a href=”#”>Content</a></li>
<li><a href=”#”>Artwork</a></li>
<li><a href=”#”>Orders</a></li>
<li><a href=”#”>Users</a></li>
<li><a href=”#”>Stats</a></li>
<li><a href=”#”>Prints</a></li>
</ul>
</div>
CSS
#menu_wrapper ul{list-style:none;}
#menu_wrapper ul li{float:left;display:block;}
#menu_wrapper ul li span{ display:block; padding:11px; background-color:#fff;height:20px; color:#323028; margin-right:10px;font-size:12px; text-decoration:none;}
#menu_wrapper ul li a{ display:block; padding:11px; background-color:#000;height:20px; color:#323028; margin-right:10px;font-size:12px; color:#fff3c8; text-decoration:none;}
#menu_wrapper ul li a:hover{ display:block; padding:11px; background-color:#fff;height:20px; color:#323028; margin-right:10px;font-size:12px; text-decoration:none;}
So let me explain it to you. So easy! like piece of cake, As you can see we have small html upthere when we want to show it as a active page menu item. We just put span around it and unlink it. And i think css code is so obvies so play with it and have fun!
ps. you need some dynamic coding too.
-Riza
Div Height problem in Firefox.

Since i start working with XHTML format, i have this problem Div acting different in FF, and sometimes i add exact height for solving that problem but now finally i found the solution. and i really love to share it with you, because i know this problem is so common to all people.
HTML CODE:
<div id=”content”></div>
CSS CODE:
#content {
display:table;
margin:0 auto;
background-color:#FFFFFF;
width:965px;
}
yes folks just put display:table; in your css.
swfobject
![]()
Flashobject is a small Javascript file used for embedding Adobe Flash content.
The script can detect the Flash plugin in all major web browsers (on Mac and PC) and is designed to make embedding Flash movies as easy as possible.
It is also very search engine friendly, degrades gracefully, can be used in valid HTML and XHTML 1.0 documents, and is forward compatible, so it should work for years to come.
<script type=”text/javascript”>
// <![CDATA[
var so = new SWFObject("sample.swf", "sotester", "100%", "100%", "9.0.115", "#000000");
so.useExpressInstall('js/expressinstall.swf');
so.addParam("scale", "noscale");
so.addParam("menu", "false");
so.addParam("allowScriptAccess", "always");
so.addParam("allowFullscreen", "true");
so.write("flashcontent");
// ]]>
</script>
you can download the latest version from : http://code.google.com/p/swfobject/
this good script is from: http://blog.deconcept.com/swfobject/
PNG in IE6
What is the PNG?
Portable Network Graphics (PNG) is a bitmapped image format that employs lossless data compression. PNG was created to improve upon and replace the GIF format, as an image-file format not requiring a patent license. PNG is pronounced /?p??/ both P-N-G and ping. The PNG initialism is optionally recursive, unofficially standing for “PNG’s Not GIF”.
I had problem with PNG in IE6, So i research about it, And find these links:
- http://www.twinhelix.com/css/iepngfix/
- http://www.mongus.net/pngInfo/
- http://www.alistapart.com/stories/pngopacity/
These are good stuff but this was a perfect one.
http://www.komodomedia.com/blog/2007/11/css-png-image-fix-for-ie/
So i use this one, and result was ok.


