<?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>ADM Blog &#187; firefox</title> <atom:link href="http://blog.another-d-mention.ro/tag/firefox/feed/" rel="self" type="application/rss+xml" /><link>http://blog.another-d-mention.ro</link> <description>No matter how you see things, reality changes when you reach understanding</description> <lastBuildDate>Fri, 22 Jul 2011 06:56:49 +0000</lastBuildDate> <language>en</language> <sy:updatePeriod>hourly</sy:updatePeriod> <sy:updateFrequency>1</sy:updateFrequency> <generator>http://wordpress.org/?v=3.1</generator> <item><title>Read/Load files from ZIP in JavaScript</title><link>http://blog.another-d-mention.ro/programming/read-load-files-from-zip-in-javascript/</link> <comments>http://blog.another-d-mention.ro/programming/read-load-files-from-zip-in-javascript/#comments</comments> <pubDate>Fri, 01 Oct 2010 10:40:05 +0000</pubDate> <dc:creator>admin</dc:creator> <category><![CDATA[Java Script]]></category> <category><![CDATA[Programming]]></category> <category><![CDATA[chrome]]></category> <category><![CDATA[firefox]]></category> <category><![CDATA[ie]]></category> <category><![CDATA[javascript]]></category> <category><![CDATA[load]]></category> <category><![CDATA[opera]]></category> <category><![CDATA[parse]]></category> <category><![CDATA[read]]></category> <category><![CDATA[safari]]></category> <category><![CDATA[zip]]></category> <guid
isPermaLink="false">http://blog.another-d-mention.ro/?p=837</guid> <description><![CDATA[At work we do a lot of JavaScript applications that have little to no HTML files (beside the index), everything is generated by JavaScript and we have tons of .js files that load at runtime and to reduce the size we have to minify them and that is really hard to debug and watch in [...]
Related posts:<ol><li><a
href='http://blog.another-d-mention.ro/programming/java-script/open-and-save-files-to-desktop-without-going-to-server/' rel='bookmark' title='Permanent Link: Open and Save files to Desktop without going to Server'>Open and Save files to Desktop without going to Server</a></li><li><a
href='http://blog.another-d-mention.ro/programming/java-script/read-data-directly-from-base64-without-decoding/' rel='bookmark' title='Permanent Link: Read data directly from base64 without decoding'>Read data directly from base64 without decoding</a></li><li><a
href='http://blog.another-d-mention.ro/programming/javascript-object-oriented-programming-oop-jclass/' rel='bookmark' title='Permanent Link: JavaScript Object-Oriented Programming (OOP) &#8211; jClass'>JavaScript Object-Oriented Programming (OOP) &#8211; jClass</a></li></ol>]]></description> <content:encoded><![CDATA[<p>At work we do a lot of JavaScript applications that have little to no HTML files (beside the index), everything is generated by JavaScript and we have tons of .js files that load at runtime and to reduce the size we have to minify them and that is really hard to debug and watch in the browser if something goes wrong. So I've made this JavaScript class that comes to help. What can you do is Zip up all your assets (js, images, css) and use ZipLoader class to read the zip and unpack your resources whenever you need them. It's small (10KB), easy to use and quite fast considering the extraction is made by JavaScript.</p><div
class="wp_syntax"><table><tr><td
class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
</pre></td><td
class="code"><pre class="javascript" style="font-family:monospace;">   <span style="color: #006600; font-style: italic;">// loads and caches the zip file</span>
   <span style="color: #003366; font-weight: bold;">var</span> loader <span style="color: #339933;">=</span> <span style="color: #003366; font-weight: bold;">new</span> ZipLoader<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'files.zip'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
   <span style="color: #006600; font-style: italic;">// creates a style node in the document header and appends the style</span>
   loader.<span style="color: #660066;">LoadCSS</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'files.zip://style.css'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
   <span style="color: #006600; font-style: italic;">// creates a script node in the document header and appends the script</span>
   loader.<span style="color: #660066;">loadScript</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'files.zip://jquery.js'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
   <span style="color: #006600; font-style: italic;">// returns the file content</span>
   <span style="color: #003366; font-weight: bold;">var</span> someFileYouNeed <span style="color: #339933;">=</span> loader.<span style="color: #660066;">load</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;files.zip://myFile.txt&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
   <span style="color: #006600; font-style: italic;">// returns the base64 encoded image usable as img source</span>
   $<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;#logo&quot;</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">attr</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'src'</span><span style="color: #339933;">,</span> loader.<span style="color: #660066;">loadImage</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'files.zip://images/logo.png'</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></td></tr></table></div><p>The level of compression using zip surpasses the js and css minification in all the ways possible. For example, My current application has 79 files (js, and few css) and they all sum up to 924KB in size. Zipping all those 96 files using Ultra compression level gives me 1 file of 126 KB => 1 server request. That's something.</p><p>The best performance is made Opera (strangely), then Firefox, Crome, Safari and last IE (no surprise here, I was expecting it before I even started).</p><p><del
datetime="2010-10-04T10:42:19+00:00">It's a V 1.0 that still needs some work and it doesn't work in IE because that stupid browser overrides the mime type and at first null character in the reading of the zip, the content ends. I will fix this eventually <img
src='http://blog.another-d-mention.ro/wp-includes/images/smilies/icon_smile.gif' alt="icon smile Read/Load files from ZIP in JavaScript" class='wp-smiley' title="Read/Load files from ZIP in JavaScript" /> </del> I will also include this as a <a
href="http://code.google.com/p/adm-jclass/">jClass</a> library soon.</p><p><strong>Update:</strong> Fixed it so it works in IE as well. There is a performance issue still. Will fix that too.</p><p>Till then, <a
href="http://another-d-mention.ro/apps/download.php?app=archive">HERE</a> are the sources and a demo.</p><p>The zip in the demo is made using <a
href="http://www.7-zip.org/">7Zip</a> with Ultra Compression level.</p><p>Happy codding.</p><p><a
class="FlattrButton" style="display:none;" href="http://blog.another-d-mention.ro/programming/read-load-files-from-zip-in-javascript/"></a><br
/> <noscript><a
href="http://flattr.com/thing/183347/ReadLoad-files-from-ZIP-in-JavaScript" target="_blank"><br
/> <img
src="http://api.flattr.com/button/flattr-badge-large.png" alt="flattr badge large Read/Load files from ZIP in JavaScript" title="Flattr this" border="0" /></a></noscript></p><p><script type="text/javascript">google_ad_client = "ca-pub-3771432957882119";
/* InsidePost */
google_ad_slot = "9112434755";
google_ad_width = 468;
google_ad_height = 60;</script><br
/> <script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js"></script></p><p>Related posts:<ol><li><a
href='http://blog.another-d-mention.ro/programming/java-script/open-and-save-files-to-desktop-without-going-to-server/' rel='bookmark' title='Permanent Link: Open and Save files to Desktop without going to Server'>Open and Save files to Desktop without going to Server</a></li><li><a
href='http://blog.another-d-mention.ro/programming/java-script/read-data-directly-from-base64-without-decoding/' rel='bookmark' title='Permanent Link: Read data directly from base64 without decoding'>Read data directly from base64 without decoding</a></li><li><a
href='http://blog.another-d-mention.ro/programming/javascript-object-oriented-programming-oop-jclass/' rel='bookmark' title='Permanent Link: JavaScript Object-Oriented Programming (OOP) &#8211; jClass'>JavaScript Object-Oriented Programming (OOP) &#8211; jClass</a></li></ol></p>]]></content:encoded> <wfw:commentRss>http://blog.another-d-mention.ro/programming/read-load-files-from-zip-in-javascript/feed/</wfw:commentRss> <slash:comments>50</slash:comments> </item> <item><title>10 Firefox add-ons for web designers</title><link>http://blog.another-d-mention.ro/misc/10-firefox-add-ons-for-web-designers/</link> <comments>http://blog.another-d-mention.ro/misc/10-firefox-add-ons-for-web-designers/#comments</comments> <pubDate>Fri, 08 May 2009 18:28:13 +0000</pubDate> <dc:creator>admin</dc:creator> <category><![CDATA[Misc]]></category> <category><![CDATA[Software]]></category> <category><![CDATA[add-ons]]></category> <category><![CDATA[designer]]></category> <category><![CDATA[extensions]]></category> <category><![CDATA[firefox]]></category> <category><![CDATA[web]]></category> <guid
isPermaLink="false">http://blog.another-d-mention.ro/?p=344</guid> <description><![CDATA[Firefox has emerged victorious from the Great Browser War - at least as far as web developers are concerned. While it may not be the most-used browser for the everyday web surfer, Firefox is clearly the first choice of developers for a few very simple reasons. Its support for web standards is legendary, but the [...]
Related posts:<ol><li><a
href='http://blog.another-d-mention.ro/misc/really-useful-firefox-keyboard-shortcuts/' rel='bookmark' title='Permanent Link: Really useful firefox keyboard shortcuts'>Really useful firefox keyboard shortcuts</a></li><li><a
href='http://blog.another-d-mention.ro/misc/firefox-and-user-agent-switcher/' rel='bookmark' title='Permanent Link: Firefox and User Agent Switcher'>Firefox and User Agent Switcher</a></li><li><a
href='http://blog.another-d-mention.ro/misc/visual-versioning-for-designers/' rel='bookmark' title='Permanent Link: Visual versioning for designers'>Visual versioning for designers</a></li></ol>]]></description> <content:encoded><![CDATA[<p>Firefox has emerged victorious from the Great Browser War - at least as far as web developers are concerned. While it may not be the most-used browser for the everyday web surfer, Firefox is clearly the first choice of developers for a few very simple reasons. Its <a
href="http://www.mozilla.com/en-US/firefox/features/#standards">support for web standards</a> is legendary, but the real super powers come from <a
href="http://www.mozilla.com/en-US/firefox/features/#customization">Firefox’s extensibility</a>. With a plethora of <a
href="https://addons.mozilla.org/en-US/firefox/">add-ons and extensions</a>, created for developers by developers, Firefox becomes much more than just a browser and turns into an essential part of your toolbox. Rather than digging through your source code with squinted eyes, use Firefox add-ons to pinpoint Javascript errors and debug them like a pro. Use add-ons to measure areas of your page, select colors directly from the site or view the specific CSS assigned to a pesky</p><div>element. You can even get a leg up on assuring your sites are accessible and use valid markup - all thanks to Firefox’s add-ons.</p><p>Here are 10 free add-ons covering everything from DOM inspection to screenshots, making designing and developing with Firefox a breeze.</p><h2><strong>1. Firebug + Firecookie + Codeburner</strong></h2><p>The first on our list of 10 is actually 3 separate add-ons but they are all meant to work together, and when combined they form one of the most powerful development tools available.</p><p><img
class="alignright size-full wp-image-345" title="11-150x150" src="http://cache.another-d-mention.ro/images/wp-content/uploads/2009/05/11-150x150.jpg" alt="11 150x150 10 Firefox add ons for web designers" width="150" height="150" />First and foremost, if you’re doing any sort of Javascript development <strong>Firebug</strong> is essential. Otherwise you’re really just stumbling around in the dark when it comes to debugging. Firebug not only gives you a robust error console, but also lets you add breakpoints in your code. Firebug’s HTML and CSS inspector gives you the freedom to either browse your source code in a collapsible tree, or click an element within the page to see its markup. Firebug also lets you edit your “live” HTML and CSS and instantly displays the results for you to review - no reloading, no saving.</p><p><img
class="alignright size-full wp-image-346" title="12-150x150" src="http://cache.another-d-mention.ro/images/wp-content/uploads/2009/05/12-150x150.jpg" alt="12 150x150 10 Firefox add ons for web designers" width="150" height="150" />Install the <strong>Firecookie</strong> add-on and Firebug gets a new super-power: complete cookie viewing and management. You can view the full content of each cookie, and even edit and delete them all from Firebug’s window.</p><p><strong>Codeburner</strong> then rounds out the Firebug setup by adding a compete W3C reference lookup with search-as-you-type on HTML elements &amp; attributes as well as CSS properties. Ever wonder which browsers support the text-transform CSS atrtribute? Codeburner will tell you that it’s buggy in IE7, but has full support in Firefox 3, Safari 3 and Opera 9.<br
/> Here are 10 free add-ons covering everything from DOM inspection to screenshots, making designing and developing with Firefox a breeze.</p><p><strong>Download:</strong> <a
href="https://addons.mozilla.org/en-US/firefox/addon/1843" target="_blank">Firebug</a>, <a
href="https://addons.mozilla.org/en-US/firefox/addon/6683" target="_blank">Firecookie</a>, <a
href="https://addons.mozilla.org/en-US/firefox/addon/10273" target="_blank">Codburner</a></div><h2 style="margin-top:10px; clear:both"><strong>2. Web Developer Toolbar</strong></h2><p>If writing Javascript without Firebug is like fumbling in the dark, building a site without the Web Developer Toolbar is like blindfolding yourself, tieing your hands and and trying to run through the woods without hitting a tree. Disable your cache, images and cookies, switch style sheets by media type, auto-fill forms with temp data, outline certain element types, resize the browser window to common sizes and validate your markup - all from within one toolbar. The Web Developer Toolbar does a whole lot more and is always the first add-on I install in Firefox. Give it a try and you’ll wonder how you ever got along without it.</p><p><img
class="aligncenter size-full wp-image-347" title="21" src="http://cache.another-d-mention.ro/images/wp-content/uploads/2009/05/21.jpg" alt="21 10 Firefox add ons for web designers" width="500" height="28" /><br
/> <strong>Download:</strong> <a
href="https://addons.mozilla.org/en-US/firefox/addon/60" target="_blank">Web Developer Toolbar</a></p><h2 style="margin-top:10px; clear:both"><strong>3. Measure It</strong></h2><p><img
class="alignright size-full wp-image-348" title="3-150x150" src="http://cache.another-d-mention.ro/images/wp-content/uploads/2009/05/3-150x150.jpg" alt="3 150x150 10 Firefox add ons for web designers" width="150" height="150" />Ever need to know just how much space you have for a photo, or how wide a dynamically sized column is? This handy little guy lets you measure, in pixels, any area on the page. Super simple and super helpful.</p><p><strong>Download:</strong> <a
href="https://addons.mozilla.org/en-US/firefox/addon/539" target="_blank">Measure It</a></p><h2 style="margin-top:10px; clear:both"><strong>4. Colorzilla</strong></h2><p>Another very simple but very useful add-on that displays the RGB and HTML color codes directly beneath your cursor. With a click, Colorzilla will copy the HTML color code to your clipboard for use in your favorite editor.</p><p><img
class="aligncenter size-full wp-image-349" title="4" src="http://cache.another-d-mention.ro/images/wp-content/uploads/2009/05/4.jpg" alt="4 10 Firefox add ons for web designers" width="330" height="36" /></p><p><strong>Download:</strong> <a
href="https://addons.mozilla.org/en-US/firefox/addon/271" target="_blank">Colorzilla</a></p><h2 style="margin-top:10px; clear:both"><strong>5. CSS Viewer</strong></h2><p><img
class="alignright size-full wp-image-350" title="5-150x150" src="http://cache.another-d-mention.ro/images/wp-content/uploads/2009/05/5-150x150.jpg" alt="5 150x150 10 Firefox add ons for web designers" width="150" height="150" />CSS Viewer takes one of the features in the Web Developer Toolbar and makes it a little easier. Just point your cursor at any element on the page and CSS Viewer will show you all of its CSS attributes, from size and position to fonts and colors, all in an easy to read overlay.</p><p><strong>Download:</strong> <a
href="https://addons.mozilla.org/en-US/firefox/addon/2104" target="_blank">CSS Viewer</a></p><h2 style="margin-top:10px; clear:both"><strong>6. ScreenGrab</strong></h2><p><img
class="alignright size-full wp-image-351" title="6-150x141" src="http://cache.another-d-mention.ro/images/wp-content/uploads/2009/05/6-150x141.jpg" alt="6 150x141 10 Firefox add ons for web designers" width="150" height="141" />A simple screenshot tool, Screengrab will save the visible area or the complete page as a file on your desktop. You can choose to save as a png or jpg, and even auto-add a datestamp to the file name</p><p><strong>Download: </strong><a
href="https://addons.mozilla.org/en-US/firefox/addon/1146" target="_blank">ScreenGrab</a></p><h2 style="margin-top:10px; clear:both"><strong>7. Gridfox</strong></h2><p><img
class="alignright size-full wp-image-352" title="gridfox-150x150" src="http://cache.another-d-mention.ro/images/wp-content/uploads/2009/05/gridfox-150x150.jpg" alt="gridfox 150x150 10 Firefox add ons for web designers" width="150" height="150" />If you use <a
href="http://en.wikipedia.org/wiki/Grid_%28page_layout%29" target="_blank">grid layouts</a> or want to learn how, Gridfox is for you. It displays a simple overlay on your page to help you align elements to both vertical and horizontal grid lines. You can easily set the column and row sizes and spacing, choose from left-aligned, right-aligned or centered layouts and set the opacity of the overlay.</p><p><strong>Download:</strong> <a
href="http://www.puidokas.com/portfolio/gridfox/" target="_blank">Gridfox</a></p><h2 style="margin-top:10px; clear:both"><strong>8. User Agent Switcher</strong></h2><p><img
class="alignright size-full wp-image-353" title="9-150x150" src="http://cache.another-d-mention.ro/images/wp-content/uploads/2009/05/9-150x150.jpg" alt="9 150x150 10 Firefox add ons for web designers" width="150" height="150" />If you swap style sheets or display alternate content based on which browser the user is viewing your site with, this add-on will tell Firefox to pretend it is another browser. Choose from Opera, Internet Explorer, or add your own custom <a
href="http://www.user-agents.org/" target="_blank">user-agents</a> to the list.</p><p><strong>Download:</strong> <a
href="https://addons.mozilla.org/en-US/firefox/addon/59" target="_blank">User Agent Switcher</a></p><h2 style="margin-top:10px; clear:both"><strong>9. PageDiff</strong></h2><p><img
class="alignright size-full wp-image-354" title="10-150x150" src="http://cache.another-d-mention.ro/images/wp-content/uploads/2009/05/10-150x150.jpg" alt="10 150x150 10 Firefox add ons for web designers" width="150" height="150" />Those of you familiar with the linux/unix “diff” command will instantly understand what this add-on does. Compare the source code of any two pages and see where they differ. This is very useful when comparing staging and production environments, or comparing a backup to a current deployment before restoring any code.</p><p><strong>Download:</strong> <a
href="https://addons.mozilla.org/en-US/firefox/addon/4274" target="_blank">PageDiff</a></p><h2 style="margin-top:10px; clear:both"><strong>10.  Cache View and Cache Status</strong></h2><p><img
class="alignright size-full wp-image-355" title="1208087359" src="http://cache.another-d-mention.ro/images/wp-content/uploads/2009/05/1208087359.png" alt="1208087359 10 Firefox add ons for web designers" width="195" height="150" /><strong>CacheView</strong> is a GUI Front-end of "about:cache" that allows searching,sorting and saveing memory and disk cache files. Very usefull when 1) You want to see what is in your cache and 2) Save things from memory or disk cache since firefox has a very cryptic way of storing it's cache.</p><p><strong>Cache Status</strong> is a customizable presence to your browser window's statusbar that gives you up-to-date information on your browser's cache usage, both RAM and the hard drive. The presence also has a right-click context menu, where you can easily clear your <img
class="size-full wp-image-356 alignright" title="943948800" src="http://cache.another-d-mention.ro/images/wp-content/uploads/2009/05/943948800.png" alt="943948800 10 Firefox add ons for web designers" width="200" height="150" />browser's cache. It can also automatically clean your cache when it reaches a specified level, through its Options.</p><p><strong>Download:</strong> <a
href="https://addons.mozilla.org/en-US/firefox/addon/2489" target="_blank">Cache Viewer</a>, <a
href="https://addons.mozilla.org/en-US/firefox/addon/1881" target="_blank">Cache Status</a></p><p>Related posts:<ol><li><a
href='http://blog.another-d-mention.ro/misc/really-useful-firefox-keyboard-shortcuts/' rel='bookmark' title='Permanent Link: Really useful firefox keyboard shortcuts'>Really useful firefox keyboard shortcuts</a></li><li><a
href='http://blog.another-d-mention.ro/misc/firefox-and-user-agent-switcher/' rel='bookmark' title='Permanent Link: Firefox and User Agent Switcher'>Firefox and User Agent Switcher</a></li><li><a
href='http://blog.another-d-mention.ro/misc/visual-versioning-for-designers/' rel='bookmark' title='Permanent Link: Visual versioning for designers'>Visual versioning for designers</a></li></ol></p>]]></content:encoded> <wfw:commentRss>http://blog.another-d-mention.ro/misc/10-firefox-add-ons-for-web-designers/feed/</wfw:commentRss> <slash:comments>0</slash:comments> </item> <item><title>Really useful firefox keyboard shortcuts</title><link>http://blog.another-d-mention.ro/misc/really-useful-firefox-keyboard-shortcuts/</link> <comments>http://blog.another-d-mention.ro/misc/really-useful-firefox-keyboard-shortcuts/#comments</comments> <pubDate>Mon, 23 Mar 2009 11:17:02 +0000</pubDate> <dc:creator>admin</dc:creator> <category><![CDATA[Internet]]></category> <category><![CDATA[Misc]]></category> <category><![CDATA[firefox]]></category> <category><![CDATA[keyboard]]></category> <category><![CDATA[shortcuts]]></category> <guid
isPermaLink="false">http://blog.another-d-mention.ro/?p=246</guid> <description><![CDATA[1. Automatically complete .org and .net addresses Yes, we know that if we type ‘google’ in the address bar and press Ctrl+Enter it directly goes to www.google.com . But what about .org and .net addresses? . In Firefox, Shift+Enter takes you to .net And Ctrl+Shift+Enter takes you to .org addresses automatically . 2. Alt + [...]
Related posts:<ol><li><a
href='http://blog.another-d-mention.ro/misc/10-firefox-add-ons-for-web-designers/' rel='bookmark' title='Permanent Link: 10 Firefox add-ons for web designers'>10 Firefox add-ons for web designers</a></li><li><a
href='http://blog.another-d-mention.ro/misc/firefox-and-user-agent-switcher/' rel='bookmark' title='Permanent Link: Firefox and User Agent Switcher'>Firefox and User Agent Switcher</a></li><li><a
href='http://blog.another-d-mention.ro/misc/eee-pc/reset-system-password-for-eeepc/' rel='bookmark' title='Permanent Link: Reset system password for EeePC'>Reset system password for EeePC</a></li></ol>]]></description> <content:encoded><![CDATA[<p><strong><img
class="alignleft size-full wp-image-247" style="margin: 10px;" title="firefox-shortcuts-mark" src="http://cache.another-d-mention.ro/images/wp-content/uploads/2009/03/firefox-shortcuts-mark.jpg" alt="firefox shortcuts mark Really useful firefox keyboard shortcuts" width="220" height="217" />1. Automatically complete .org and .net addresses</strong></p><p>Yes, we know that if we type ‘google’ in the address bar and press Ctrl+Enter it directly goes to www.google.com . But what about .org and .net addresses? .</p><p>In Firefox, Shift+Enter takes you to .net</p><p>And Ctrl+Shift+Enter takes you to .org addresses automatically .</p><p><strong>2. Alt + D or F6</strong></p><p>You can use this to navigate directly to the browser address bar of firefox. Very useful.</p><p><strong>3. Ctrl+T and Ctrl+Shift+T</strong></p><p>Ctrl+T helps you to open a new tab and Ctrl+Shift+T reopens the last closed tab.<br
/> This comes quite handy in case you accidently close a tab. Another way to do this would be go to History -&gt; Recently closed tabs.</p><p><strong>4. Alt+Enter</strong></p><p>This can be an extremely useful shortcut. It automatically opens a website in another tab when you highlight it in the autocomplete list. For example you want to go to Facebook and you start typing www.face…, in the address bar and it starts showing the list below. You just need to use the down arrow key to highlight the selection (facebook.com in this case ) and press Alt+Enter so that it opens in a new tab.</p><p><strong>5. Use of Delete Key</strong></p><p>The Delete key can be pretty useful because it helps you delete specific addresses in browser history or autocomplete forms.  If I want to delete the 2nd entry from autocomplete history, I’ll just point to it and press Delete key. Simple, isn’t it .</p><p><strong>6. Ctrl+Tab</strong></p><p>Ctrl+tab helps you to navigate between different firefox tabs quite easily.</p><p><strong>7. Ctrl+[1,2….9]</strong></p><p>Ctrl+tab can help you navigate alternate tabs but if you are a heavy tab user like me and want to go to a specific tab then just use Ctrl+corresponding tab number. Ex:To go to the 3rd tab use Ctrl+3.</p><p><strong>8. Spacebar and Shift+Spacebar OR PageDown and PageUp</strong></p><p>Spacebar or PageDown key scrolls down the webpage you’re on and Shift+Spacebar or PageUp scrolls up the webpage you’re on.</p><p><strong>9. The Middle Mouse Button</strong></p><p>This is not a keyboard shortcut but it is an excellent shortcut. Just point to a link anywhere on a webpage and press the middle mouse(scroll) button. It opens the page in a new tab .Also middle-clicking a tab with the mouse closes the tab.</p><p><strong>10. / Button</strong></p><p>This (backslash) if you hit that once will bring a quick find option. We dont have to puch CTRL+F for searching.</p><p>I hope these shortcuts will enhance your browsing productivity with Firefox. Share your other interesting shortcuts which I may have missed....!</p><p>Related posts:<ol><li><a
href='http://blog.another-d-mention.ro/misc/10-firefox-add-ons-for-web-designers/' rel='bookmark' title='Permanent Link: 10 Firefox add-ons for web designers'>10 Firefox add-ons for web designers</a></li><li><a
href='http://blog.another-d-mention.ro/misc/firefox-and-user-agent-switcher/' rel='bookmark' title='Permanent Link: Firefox and User Agent Switcher'>Firefox and User Agent Switcher</a></li><li><a
href='http://blog.another-d-mention.ro/misc/eee-pc/reset-system-password-for-eeepc/' rel='bookmark' title='Permanent Link: Reset system password for EeePC'>Reset system password for EeePC</a></li></ol></p>]]></content:encoded> <wfw:commentRss>http://blog.another-d-mention.ro/misc/really-useful-firefox-keyboard-shortcuts/feed/</wfw:commentRss> <slash:comments>3</slash:comments> </item> <item><title>How To &#8211; get Cross Browser Compatibility Every Time</title><link>http://blog.another-d-mention.ro/programming/css/how-to-get-cross-browser-compatibility-every-time/</link> <comments>http://blog.another-d-mention.ro/programming/css/how-to-get-cross-browser-compatibility-every-time/#comments</comments> <pubDate>Fri, 20 Feb 2009 17:15:05 +0000</pubDate> <dc:creator>admin</dc:creator> <category><![CDATA[CSS]]></category> <category><![CDATA[How To's]]></category> <category><![CDATA[chrome]]></category> <category><![CDATA[comaptibility]]></category> <category><![CDATA[firefox]]></category> <category><![CDATA[ie6]]></category> <category><![CDATA[ie7]]></category> <category><![CDATA[ie8]]></category> <category><![CDATA[opera]]></category> <guid
isPermaLink="false">http://blog.another-d-mention.ro/?p=37</guid> <description><![CDATA[Working with Internet Explorer can be a pain for the everyday web designer. But it doesn't have to be. Many, if not all, of the bugs can be fixed quickly and easily by understanding how the occur. I've put together a list of the major problems beginners have with cross browser compatibility. I'm only going [...]
Related posts:<ol><li><a
href='http://blog.another-d-mention.ro/programming/cross-browser-inline-block/' rel='bookmark' title='Permanent Link: Cross browser inline-block'>Cross browser inline-block</a></li><li><a
href='http://blog.another-d-mention.ro/programming/cheeky-little-tips-that-will-help-against-email-harvesting/' rel='bookmark' title='Permanent Link: Cheeky little tips that will help against email harvesting'>Cheeky little tips that will help against email harvesting</a></li><li><a
href='http://blog.another-d-mention.ro/programming/use-any-font-with-cufon/' rel='bookmark' title='Permanent Link: Use any Font with Cufon'>Use any Font with Cufon</a></li></ol>]]></description> <content:encoded><![CDATA[<p>Working with Internet Explorer can be a pain for the everyday web designer. But it doesn't have to be. Many, if not all, of the bugs can be fixed quickly and easily by understanding how the occur. I've put together a list of the major problems beginners have with cross browser compatibility.</p><p>I'm only going to be concerned with the major browsers - Firefox 2+, Safari 3+ and Internet Explorer 6+. IE6 is slowly declining.  If you know the IE6 bugs you can generally know if your site will break before you even check it in a browser. This isn't an article for the super-experienced web designer, but hopefully will give some insight to some people who don't understand the mysteries of IE6 and cross browser compatibility.</p><h2>Summary</h2><p>Here is a quick summary for those of you who don't want to read the whole article:</p><ul><li>Always use strict doctype and standards-compliant HTML/CSS</li><li>Always use a reset at the start of your css</li><li>Use -moz-opacity:0.99 on text elements to clean up rendering in Firefox, and text-shadow: #000 0 0 0 in Safari</li><li>Never resize images in the CSS or HTML</li><li>Check font rendering in every browser. Don't use Lucida</li><li>Size text as a % in the body, and as em's throughout</li><li>All layout divs that are floated should include display:inline and overflow:hidden</li><li> Containers should have overflow:auto and trigger hasLayout via a width or height</li><li>Don't use any fancy CSS3 selectors</li><li>Don't use transparent PNG's unless you have loaded the alpha</li></ul><h2>Element Inconsistencies</h2><p>Every browser renders particular elements differently - different amounts of padding, margins, borders etc. This means your site can look different in every browser if you use default styles.</p><p><strong>Solution</strong></p><p>The first thing you should do, which most people most likely know about, is to reset your styles. A reset is some css you place at the start of your styles that removes the padding, margin, border and other inconsistencies from elements, and rebuilds them in a standard way.</p><p>Download Eric Meyer's <a
href="http://meyerweb.com/eric/thoughts/2008/01/15/resetting-again/">reset.css</a> and place the code at the start of your styles. Bam! Clean, cross browser styles.</p><h2>Image Rendering</h2><p>IE6 and IE7 both render resized images extremely badly. When you change the size of an image with CSS or in the HTML, it appears blocky and edgy.<br
/> <strong>Solution</strong></p><p>Don't do it. Always size your images to your desired size before you use them on your site</p><h2>Font Rendering</h2><p>I told you not all issues were with IE. Safari 3+ has an issue with the way it renders light type on a dark background. Some would argue whether this is good or bad, but there's a way to make it appear lighter. Here's an example of standard white on black text rendering in Safari 3.1:</p><p><img
class="alignnone size-full wp-image-38" style="border: 1px solid black; padding: 3px;" title="safari-before" src="http://cache.another-d-mention.ro/images/wp-content/uploads/2009/02/safari-before.png" alt="safari before How To   get Cross Browser Compatibility Every Time" width="351" height="165" /></p><p><strong>Solution</strong><br
/> Easy fix. You need to add this to your code.</p><div
class="wp_syntax"><div
class="code"><pre class="css" style="font-family:monospace;">p <span style="color: #00AA00;">&#123;</span>
   <span style="color: #000000; font-weight: bold;">text-shadow</span><span style="color: #00AA00;">:</span> <span style="color: #cc00cc;">#000</span> <span style="color: #cc66cc;">0</span> <span style="color: #cc66cc;">0</span> <span style="color: #cc66cc;">0</span><span style="color: #00AA00;">;</span>
<span style="color: #00AA00;">&#125;</span></pre></div></div><p>Where #000 is your background colour. You will probably have to be more specific with the elements you select. I wouldn't suggest using this fix on the body tag. Other elements you might need to fix are the li, dt, dd, blockquote etc. Use this on any text element you want to appear 'thinner'</p><p>To make this fix in Firefox, you use the opacity fix:</p><div
class="wp_syntax"><div
class="code"><pre class="css" style="font-family:monospace;">p <span style="color: #00AA00;">&#123;</span>
    -moz-opacity<span style="color: #00AA00;">:</span> <span style="color: #cc66cc;">0.99</span><span style="color: #00AA00;">;</span>
<span style="color: #00AA00;">&#125;</span></pre></div></div><p>You need to be careful with this fix, as it will break any Flash element that it touches in Firefox. There appears to be no workaround for it.</p><p>The type will now be rendered like this:</p><p><img
class="alignnone size-full wp-image-46" style="border: 1px solid black; padding: 3px;" title="safari-after" src="http://cache.another-d-mention.ro/images/wp-content/uploads/2009/02/safari-after.png" alt="safari after How To   get Cross Browser Compatibility Every Time" width="336" height="157" /></p><h2>Font Selection</h2><p>There are common web fonts that we use - Arial, Georgia, Verdana etc. But there are some fonts that are common to both PC and Mac and can be used - Century Gothic, Arial Narrow etc. However, different browsers and OS's render type different, and you need to be aware of these differences, as your site could look dam ugly if you use the wrong font.</p><p><strong>Solution</strong></p><p>The font you choose is ultimately up to you. As long as it's a safe font you will be fine. However you should be aware of these rendering issues. One font you should probably not use is Lucida Grande/Sans. It renders awful in IE. Take a look at its rendering in Safari(Mac):</p><p><img
class="alignnone size-full wp-image-47" style="border: 1px solid black; padding: 3px;" title="safari-lucida" src="http://cache.another-d-mention.ro/images/wp-content/uploads/2009/02/safari-lucida.png" alt="safari lucida How To   get Cross Browser Compatibility Every Time" width="600" height="120" /></p><p>Looks nice doesn't it? Too bad it looks like this in Internet Explorer(PC):</p><p><img
class="alignnone size-full wp-image-48" style="border: 1px solid black; padding: 3px;" title="ie6-lucida" src="http://cache.another-d-mention.ro/images/wp-content/uploads/2009/02/ie6-lucida.png" alt="ie6 lucida How To   get Cross Browser Compatibility Every Time" width="600" height="120" /></p><p>Some people have stated that Lucida Sans will look fine in IE with ClearType, and others have said that it still looks bad. A smart alternative is to just not use Lucida Sans as your 'fallback font', and instead use Arial or another san-serif font.</p><h2>Font Sizing</h2><p>The ability to resize text differs amongst browsers and OS's. IE won't resize text thats set in pixels. If we set all text in em's, IE will exaggerate the text sizes when resized.</p><p><strong>Solution</strong></p><p>The best reference for font sizing is the article <a
href="http://www.alistapart.com/articles/howtosizetextincss">How to Size Type in CSS</a> by Richard Rutter. The results - You need to specify the size as a percentage in the body element, and then size it in em's through the rest of the sheet. For line height, you need to define it in em's, rather than pixels, for consistent rendering.<br
/> One thing to remember is that the default font size is 16px. So to resize our type to 12px we use:</p><div
class="wp_syntax"><div
class="code"><pre class="css" style="font-family:monospace;">body <span style="color: #00AA00;">&#123;</span>
   <span style="color: #000000; font-weight: bold;">font-size</span><span style="color: #00AA00;">:</span> <span style="color: #933;">75%</span><span style="color: #00AA00;">;</span>
   <span style="color: #000000; font-weight: bold;">line-height</span><span style="color: #00AA00;">:</span> <span style="color: #933;">1.5em</span><span style="color: #00AA00;">;</span>
<span style="color: #00AA00;">&#125;</span></pre></div></div><p>Now you can size your type in em's like so:</p><div
class="wp_syntax"><div
class="code"><pre class="css" style="font-family:monospace;">h1<span style="color: #00AA00;">&#123;</span>
   <span style="color: #000000; font-weight: bold;">font-size</span><span style="color: #00AA00;">:</span> <span style="color: #933;">3em</span><span style="color: #00AA00;">;</span>
<span style="color: #00AA00;">&#125;</span></pre></div></div><p>Another suggested technique is to resize it down to 10px, which makes it easier to size upwards in em's. For example.</p><div
class="wp_syntax"><div
class="code"><pre class="css" style="font-family:monospace;">body <span style="color: #00AA00;">&#123;</span>
     <span style="color: #000000; font-weight: bold;">font-size</span><span style="color: #00AA00;">:</span> <span style="color: #933;">62.5%</span><span style="color: #00AA00;">;</span>
     <span style="color: #000000; font-weight: bold;">line-height</span><span style="color: #00AA00;">:</span> <span style="color: #933;">1.5em</span><span style="color: #00AA00;">;</span>
<span style="color: #00AA00;">&#125;</span>
&nbsp;
h1 <span style="color: #00AA00;">&#123;</span>
      <span style="color: #000000; font-weight: bold;">font-size</span><span style="color: #00AA00;">:</span> <span style="color: #933;">1.8em</span><span style="color: #00AA00;">;</span> <span style="color: #808080; font-style: italic;">/* 18px */</span>
<span style="color: #00AA00;">&#125;</span>
&nbsp;
p <span style="color: #00AA00;">&#123;</span>
      <span style="color: #000000; font-weight: bold;">font-size</span><span style="color: #00AA00;">:</span> <span style="color: #933;">1.2em</span><span style="color: #00AA00;">;</span> <span style="color: #808080; font-style: italic;">/* 12px */</span>
<span style="color: #00AA00;">&#125;</span></pre></div></div><p>here is an issue with this however, if people use small font option in Internet Explorer, it could be so small that it's unreadable. It's only a small chance. But worth noting.</p><h2>Double Margins on Floats</h2><p>We create CSS layouts by floating div's up against each other, like some form of horizontal tetris. When it reaches the end of a row, it drops down to the next. The common method for creating a grid is this:</p><div
class="wp_syntax"><div
class="code"><pre class="css" style="font-family:monospace;"><span style="color: #cc00cc;">#content</span> <span style="color: #00AA00;">&#123;</span>
     <span style="color: #000000; font-weight: bold;">float</span><span style="color: #00AA00;">:</span><span style="color: #000000; font-weight: bold;">right</span><span style="color: #00AA00;">;</span>
     <span style="color: #000000; font-weight: bold;">width</span><span style="color: #00AA00;">:</span> <span style="color: #933;">300px</span><span style="color: #00AA00;">;</span>
     <span style="color: #000000; font-weight: bold;">margin-right</span><span style="color: #00AA00;">:</span> <span style="color: #933;">10px</span><span style="color: #00AA00;">;</span>
<span style="color: #00AA00;">&#125;</span>
&nbsp;
<span style="color: #cc00cc;">#sidebar</span> <span style="color: #00AA00;">&#123;</span>
     <span style="color: #000000; font-weight: bold;">float</span><span style="color: #00AA00;">:</span><span style="color: #000000; font-weight: bold;">right</span><span style="color: #00AA00;">;</span>
     <span style="color: #000000; font-weight: bold;">width</span><span style="color: #00AA00;">:</span> <span style="color: #933;">100px</span><span style="color: #00AA00;">;</span>
<span style="color: #00AA00;">&#125;</span></pre></div></div><p>This is what it should look like in a browser:</p><p><img
class="alignnone size-medium wp-image-58" style="border: 1px solid black; padding: 3px;" title="doublemargin-ff" src="http://cache.another-d-mention.ro/images/wp-content/uploads/2009/02/doublemargin-ff-300x264.png" alt="doublemargin ff 300x264 How To   get Cross Browser Compatibility Every Time" width="300" height="264" /></p><p>This is what IE does to it:</p><p><img
class="alignnone size-full wp-image-59" style="border: 1px solid black; padding: 3px;" title="doublemargin-ie" src="http://cache.another-d-mention.ro/images/wp-content/uploads/2009/02/doublemargin-ie.png" alt="doublemargin ie How To   get Cross Browser Compatibility Every Time" width="400" height="353" /></p><p>The margin width is doubled. Any margin that is on the same side as the float will be doubled. Don't ask why. It's just IE. This means the element on the left will have that margin stretched out to 20px, which will probably break the layout.</p><p><strong>Solution</strong></p><p>To fix it, all you need to do is put display:inline on your layout divs.</p><div
class="wp_syntax"><div
class="code"><pre class="css" style="font-family:monospace;"><span style="color: #cc00cc;">#content</span> <span style="color: #00AA00;">&#123;</span>
     <span style="color: #000000; font-weight: bold;">float</span><span style="color: #00AA00;">:</span><span style="color: #000000; font-weight: bold;">right</span><span style="color: #00AA00;">;</span>
     <span style="color: #000000; font-weight: bold;">width</span><span style="color: #00AA00;">:</span> <span style="color: #933;">300px</span><span style="color: #00AA00;">;</span>
     <span style="color: #000000; font-weight: bold;">margin-right</span><span style="color: #00AA00;">:</span> <span style="color: #933;">10px</span><span style="color: #00AA00;">;</span>
     <span style="color: #000000; font-weight: bold;">display</span><span style="color: #00AA00;">:</span><span style="color: #993333;">inline</span><span style="color: #00AA00;">;</span>
<span style="color: #00AA00;">&#125;</span>
&nbsp;
<span style="color: #cc00cc;">#sidebar</span> <span style="color: #00AA00;">&#123;</span>
     <span style="color: #000000; font-weight: bold;">float</span><span style="color: #00AA00;">:</span><span style="color: #000000; font-weight: bold;">right</span><span style="color: #00AA00;">;</span>
     <span style="color: #000000; font-weight: bold;">width</span><span style="color: #00AA00;">:</span> <span style="color: #933;">100px</span><span style="color: #00AA00;">;</span>
     <span style="color: #000000; font-weight: bold;">display</span><span style="color: #00AA00;">:</span><span style="color: #993333;">inline</span><span style="color: #00AA00;">;</span>
<span style="color: #00AA00;">&#125;</span></pre></div></div><p>Now that margin bug is all fixed. Even though it only effects margins on the same side as the float, it can still be useful to include this fix. You never know when you might use a margin on the float side. It won't effect any other browser, so you can use it safely.</p><h2>Expanding Box</h2><p>The expanding box problem is a big issue with many css layouts. When you have a standard layout, with floats sitting next to each other, with set widths, but an image or long string of text is longer than this width, the layout will break in IE6. Take a look at this example:</p><div
class="wp_syntax"><div
class="code"><pre class="css" style="font-family:monospace;"><span style="color: #cc00cc;">#content</span> <span style="color: #00AA00;">&#123;</span>
     <span style="color: #000000; font-weight: bold;">float</span><span style="color: #00AA00;">:</span><span style="color: #000000; font-weight: bold;">left</span><span style="color: #00AA00;">;</span>
     <span style="color: #000000; font-weight: bold;">width</span><span style="color: #00AA00;">:</span> <span style="color: #933;">300px</span><span style="color: #00AA00;">;</span>
     <span style="color: #000000; font-weight: bold;">margin-right</span><span style="color: #00AA00;">:</span> <span style="color: #933;">10px</span><span style="color: #00AA00;">;</span>
     <span style="color: #000000; font-weight: bold;">display</span><span style="color: #00AA00;">:</span><span style="color: #993333;">inline</span><span style="color: #00AA00;">;</span>
<span style="color: #00AA00;">&#125;</span>
&nbsp;
<span style="color: #cc00cc;">#sidebar</span> <span style="color: #00AA00;">&#123;</span>
     <span style="color: #000000; font-weight: bold;">float</span><span style="color: #00AA00;">:</span><span style="color: #000000; font-weight: bold;">left</span><span style="color: #00AA00;">;</span>
     <span style="color: #000000; font-weight: bold;">width</span><span style="color: #00AA00;">:</span> <span style="color: #933;">100px</span><span style="color: #00AA00;">;</span>
     <span style="color: #000000; font-weight: bold;">display</span><span style="color: #00AA00;">:</span><span style="color: #993333;">inline</span><span style="color: #00AA00;">;</span>
<span style="color: #00AA00;">&#125;</span></pre></div></div><p>This will render like in this most browsers:</p><p><img
class="alignnone size-full wp-image-63" style="border: 1px solid black; padding: 3px;" title="expandingbox" src="http://cache.another-d-mention.ro/images/wp-content/uploads/2009/02/expandingbox.png" alt="expandingbox How To   get Cross Browser Compatibility Every Time" width="400" height="353" /></p><p>However, in IE6, it will break like so:</p><p><img
class="alignnone size-full wp-image-64" style="border: 1px solid black; padding: 3px;" title="expandingbox-ie" src="http://cache.another-d-mention.ro/images/wp-content/uploads/2009/02/expandingbox-ie.png" alt="expandingbox ie How To   get Cross Browser Compatibility Every Time" width="400" height="353" /></p><p><strong>Solution</strong></p><p>The solution is to use the overflow property. If you place overflow:hidden; into the layout divs, the layout won't break in IE6.</p><div
class="wp_syntax"><div
class="code"><pre class="css" style="font-family:monospace;"><span style="color: #cc00cc;">#content</span> <span style="color: #00AA00;">&#123;</span>
     <span style="color: #000000; font-weight: bold;">float</span><span style="color: #00AA00;">:</span><span style="color: #000000; font-weight: bold;">left</span><span style="color: #00AA00;">;</span>
     <span style="color: #000000; font-weight: bold;">width</span><span style="color: #00AA00;">:</span> <span style="color: #933;">300px</span><span style="color: #00AA00;">;</span>
     <span style="color: #000000; font-weight: bold;">margin-right</span><span style="color: #00AA00;">:</span> <span style="color: #933;">10px</span><span style="color: #00AA00;">;</span>
     <span style="color: #000000; font-weight: bold;">display</span><span style="color: #00AA00;">:</span><span style="color: #993333;">inline</span><span style="color: #00AA00;">;</span>
     <span style="color: #000000; font-weight: bold;">overflow</span><span style="color: #00AA00;">:</span><span style="color: #993333;">hidden</span><span style="color: #00AA00;">;</span>
<span style="color: #00AA00;">&#125;</span>
&nbsp;
<span style="color: #cc00cc;">#sidebar</span> <span style="color: #00AA00;">&#123;</span>
     <span style="color: #000000; font-weight: bold;">float</span><span style="color: #00AA00;">:</span><span style="color: #000000; font-weight: bold;">left</span><span style="color: #00AA00;">;</span>
     <span style="color: #000000; font-weight: bold;">width</span><span style="color: #00AA00;">:</span> <span style="color: #933;">100px</span><span style="color: #00AA00;">;</span>
     <span style="color: #000000; font-weight: bold;">display</span><span style="color: #00AA00;">:</span><span style="color: #993333;">inline</span><span style="color: #00AA00;">;</span>
     <span style="color: #000000; font-weight: bold;">overflow</span><span style="color: #00AA00;">:</span><span style="color: #993333;">hidden</span><span style="color: #00AA00;">;</span>
<span style="color: #00AA00;">&#125;</span></pre></div></div><p>This could, however, cause some issues with layouts depending on how complex they are. It also won't cause the text to wrap, and it will just remain hidden. It's unlikely you'll have a string long enough to break a layout, but it could happen. Another option is to use word-wrap: break-word; in an IE specific stylesheet. This won't effect images though, so you'll have to make a choice about with method is appropriate for your situation.</p><h2>Clearing Floats</h2><p>What we mean when we talk about clearing floats, is when a container or wrapper div doesn't correctly wrap around the containing divs. Take a look at this example:</p><p><img
class="alignnone size-full wp-image-66" style="border: 1px solid black; padding: 3px;" title="clearing" src="http://cache.another-d-mention.ro/images/wp-content/uploads/2009/02/clearing.png" alt="clearing How To   get Cross Browser Compatibility Every Time" width="400" height="353" /></p><p>See how the container is correctly containing the div's? This is what should happen. However, sometimes it does not clear correctly, like so:</p><p><img
class="alignnone size-full wp-image-67" style="border: 1px solid black; padding: 3px;" title="noclearing" src="http://cache.another-d-mention.ro/images/wp-content/uploads/2009/02/noclearing.png" alt="noclearing How To   get Cross Browser Compatibility Every Time" width="400" height="353" /></p><p>The container isn't correctly wrapping around it. You probably won't notice this until you try and put a background on your container.</p><p><strong>Solution</strong></p><p>There are a few different solutions for clearing. The best solution however, is a simple <strong>overflow:auto</strong> or <strong>overflow:hidden</strong> in your container</p><div
class="wp_syntax"><div
class="code"><pre class="css" style="font-family:monospace;"><span style="color: #cc00cc;">#container</span> <span style="color: #00AA00;">&#123;</span>
     <span style="color: #000000; font-weight: bold;">width</span><span style="color: #00AA00;">:</span> <span style="color: #933;">966px</span><span style="color: #00AA00;">;</span>
     <span style="color: #000000; font-weight: bold;">margin</span><span style="color: #00AA00;">:</span> <span style="color: #cc66cc;">0</span> <span style="color: #993333;">auto</span><span style="color: #00AA00;">;</span>
     <span style="color: #000000; font-weight: bold;">overflow</span><span style="color: #00AA00;">:</span><span style="color: #993333;">auto</span><span style="color: #00AA00;">;</span>
<span style="color: #00AA00;">&#125;</span></pre></div></div><p>You need to keep in mind that overflow:auto might cause some issues in Firefox. If you do have any issues, use overflow:hidden instead. If this is still causing issues, take a look at <a
href="http://www.sitepoint.com/blogs/2005/02/26/simple-clearing-of-floats/">some other forms of clearing floats</a>. Apart from just adding this, you'll need to make sure hasLayout is triggered in IE6. You can do this by specifying a width or height. If you don't have a width in your container, you can use height:1% to trigger it, or zoom:1; if you can't afford to give it a height.</p><h2>CSS Selectors</h2><p>Although we would like to use all the brand spanking new CSS3 selectors, IE6 doesn't support all of the major ones. There are also still some CSS2 child and sibling selectors you simply shouldn't use if you want to support IE6:</p><ul><li>E &gt; F</li><li>E + F</li><li>E ~ F</li><li>:root</li><li>:last-child</li><li> <img
src='http://blog.another-d-mention.ro/wp-includes/images/smilies/icon_surprised.gif' alt="icon surprised How To   get Cross Browser Compatibility Every Time" class='wp-smiley' title="How To   get Cross Browser Compatibility Every Time" /> nly-child</li><li>:nth-child()</li><li>:nth-last-child()</li><li>:first-of-type</li><li>:last-of-type</li><li> <img
src='http://blog.another-d-mention.ro/wp-includes/images/smilies/icon_surprised.gif' alt="icon surprised How To   get Cross Browser Compatibility Every Time" class='wp-smiley' title="How To   get Cross Browser Compatibility Every Time" /> nly-of-type</li><li>:nth-of-type()</li><li>:nth-last-of-type()</li><li>:empty</li><li>:not()</li><li>:target</li><li>:enable</li><li>:disabled</li><li>:checked</li><li>Any of the E[attribute] Selectors</li><li>:first-child</li><li>:lang()</li><li>:before</li><li>::before</li><li>:after</li><li>::after</li></ul><p>f course, a lot of these selectors aren't supported by even Firefox 3. For a full list of supported selectors, check out evotech.net's post on <a
href="http://www.evotech.net/blog/2008/05/browser-css-selector-support/">browser css selector support</a></p><p><strong>Solution</strong></p><p>Stick to your standard selectors. Nothing fancy. Only use E + F, E &gt; F, E ~ F when it won't make a huge difference in IE. If you really need to use these selectors, you should look at using IE8.js which gives IE6 better selector support. However this will slow down your site. But we don't really care about IE6 users do we?</p><h2>PNG Transparency</h2><p>IE6 doesn't support alpha transparency in PNG's. This is possibly the most annoying bug/issue with IE.</p><p><strong>Solution</strong></p><p>There are a few solutions for this problem. You can either use AlphaImageLoader in an IE specific stylesheet, link to a behaviour file in an IE specific stylesheet or use JS to fix the issue. Not matter which way you choose, there is no way to have transparent repeating background images.<br
/> To use AlphaImageLoader, it's a little bit tricky. Add these properties to any png image you want to have transparency. (You need to put this code in an IE specific stylesheet if you want your CSS to validate)</p><div
class="wp_syntax"><div
class="code"><pre class="css" style="font-family:monospace;"><span style="color: #6666ff;">.trans</span> <span style="color: #00AA00;">&#123;</span>
     <span style="color: #000000; font-weight: bold;">background-image</span><span style="color: #00AA00;">:</span> <span style="color: #993333;">none</span><span style="color: #00AA00;">;</span>
     filter<span style="color: #00AA00;">:</span> progid<span style="color: #3333ff;">:DXImageTransform</span><span style="color: #6666ff;">.Microsoft</span>.AlphaImageLoader<span style="color: #00AA00;">&#40;</span>src<span style="color: #00AA00;">=</span><span style="color: #ff0000;">'/images/transparent.png'</span><span style="color: #00AA00;">,</span> sizingMethod<span style="color: #00AA00;">=</span><span style="color: #ff0000;">'image/scale/crop'</span><span style="color: #00AA00;">&#41;</span><span style="color: #00AA00;">;</span>
<span style="color: #00AA00;">&#125;</span></pre></div></div><p>Let's say you've given all your png image tags a class "trans", you select them with your css and use the filter property. You need to create a 1x1 transparent png file and link to it in the src attribute.</p><p>An even better way to do this is via a behaviour. It's similar to the AlphaImageLoader, except that you link to a behaviour script that triggers the transparency.</p><p>The third method is to use IE8.js which I mentioned earlier. It's even safer than the previous method, and you are very unlikely to run into any problems. Link to the script in your HTML, and it will make any png ending in -trans alpha-capable. eg. myimage-trans.png.</p><p><strong>With all this methods, you need to be aware that you might still run into problems with transparent pngs. Make sure you test it in IE6 extensively</strong></p><p>Related posts:<ol><li><a
href='http://blog.another-d-mention.ro/programming/cross-browser-inline-block/' rel='bookmark' title='Permanent Link: Cross browser inline-block'>Cross browser inline-block</a></li><li><a
href='http://blog.another-d-mention.ro/programming/cheeky-little-tips-that-will-help-against-email-harvesting/' rel='bookmark' title='Permanent Link: Cheeky little tips that will help against email harvesting'>Cheeky little tips that will help against email harvesting</a></li><li><a
href='http://blog.another-d-mention.ro/programming/use-any-font-with-cufon/' rel='bookmark' title='Permanent Link: Use any Font with Cufon'>Use any Font with Cufon</a></li></ol></p>]]></content:encoded> <wfw:commentRss>http://blog.another-d-mention.ro/programming/css/how-to-get-cross-browser-compatibility-every-time/feed/</wfw:commentRss> <slash:comments>5</slash:comments> </item> </channel> </rss>
