Short Tag – Web Development Blog

Entries for the ‘DHTML’ Category

Preload images with plain javascript

This is a continuation of my previous post, preloading images with jQuery.
More info about preloaders: here.
This articles is for those who wish to use preloaders but do not use jQuery.

function preload(images)
for (var i = 0; i < images.length; i++)

Cross-browser CSS code to disable selectable text

Maybe you created your own custom button from divs, or you just want to disable the ability to select text on an element (Usually is used for elements that act like buttons).

-webkit-user-select: none;
-khtml-user-select: none;
-moz-user-select: none;
-o-user-select: none;
user-select: none;

Use all these selectors on the element. This should work on all browsers.

UL, LI – HTML and Css lists, horizontal positioning

The HTML lists (with CSS styling) are very handy for assembling HTML designs. They are very useful when creating menus, especially for horizontal menus. You could use tables to create a horizontal menu, but tables are overrated, they load harder than divs or lists and they are not good for SEO. You could use divs, [...]