mbe.ro
<h2>What is this web-site?</h2> <br/> <start_coding(); //just some tips and tricks for web programmers<br/>echo "Hope this is helpful to you";<br/>?>

Cross-browser Custom Scrollbar

February 25, 2009 at 6:06 PM

There is a newer version of this here.

Sometimes the design simply needs a custom scrollbar. I really don’t reccomend using one but if you must, you must…

I made one using prototype and scriptuaculous.

You cand download it from here (link updated) or view an example here. It works in all browsers (tested it in IE6, IE7, FF3, Safari, Opera, Chrome).

Prototype 1.6.0 is somewhat better than 1.6.0.3…

at 5:22 AM

…because in version 1.6.0 the function which returns the document height (document.viewport.getHeight()) works in IE while in version 1.6.0.3 document.viewport.getHeight() returns only 0;

Some must-haves on a web-site

February 24, 2009 at 9:54 PM

Should you need some special fonts you have sIFR or Facelift (I recommend Facelift as it produces images, not flash content).

As a JS framework, I recommend jQuery (as it is small and easy to use). Also, if you need something like Lightbox, I recommend using Fancybox (looks better, is smaller and acts better).

For HTML and SEO, I always forget to put some meta tags and stuff, so I made myself a default HTML scheme (which to use for any website): Read more…

Firefox 2 inline-block

at 9:33 PM

I’m sure most of you are aware of the display:inline-block. It behaves as an inline and displays as a block (you can set width and height).

The problem is that firefox 2 does not support inline-block. The fix to this issue would be: display:-moz-inline-box.

To make it work in any browser you need to have both. So: display: inline-block; display:-moz-inline-box; is cross-browser.

Most common IE bug: double margin

at 9:29 PM

In IE6 and IE7, for those that don’t know, margin-left and margin-right are doubled. If you should have this problem here are some bug fixes:

1. The element which has margin-left and margin-right set to let’s say 10px, add display:inline to it (if you can). If you want it to have width and height as well add float:left or float:right to it.

2. If you cannot afford to add display:inline (it would be too much for the style view), just add _margin-left and _margin-right to the css. These are only compiled by IE. (just about anything with and underline in front of it is compiled just by IE)