Thursday, September 13, 2012

iPhone

Once again, I realized that there is nothing better (at least currently) rather than HTC/Samsung and Android-based devices.

Anyway, want to see iPhone 6, 7, 8, 9, 10+?
Visit: www.future-iphone.com

Thursday, September 6, 2012

Mac Book Air

Is the Mac Book Air (13") is so cool looking, works real fast and is a very light/thin device?

...direction: rtl

When you output a lot of text information in HTML pages you may need to truncate some words. A smart thing to do is to use CSS3 text-overflow property. For example: to get text truncated like "Here is a long te..." you would code:

HTML
<span class="truncate">Here is a long text information.</span>

CSS
SPAN.truncate {
    width: 100px;
    overflow: hidden;
    white-space: nowrap;
    text-align: left;
}

Sometimes you may need to cut text from left side to get something like "...a long text information". This is easy to do using the "direction: rtl" CSS property. Add another class which will define alternate truncation side:

CSS
SPAN.truncate.left {
    direction: rtl;
}

Usage for the above CSS class:
<span class="truncate left">Here is a long text information.</span>

Fighting with old code

Some people prefer to use old outdated scripts even if there are good modern alternatives are available. Such code can be is very dangerous from security standpoint. Nevertheless, reasonable sense does not work for them. Today we had to fix issue with the MultiCart (http://www.iscripts.com/multicart/) script which uses session_register() function to work with sessions. The problem is that this function is not available in PHP 5.4.

Popular Posts