Skip to main content

Posts

Showing posts from 2010

Changing selection color with CSS3

CSS3 is bringing many innovations to web design. One of these is the possibility of customizing the selection color of text, graphics and every other element of the markup. By default, on most browsers, the selection color is a blue and the color of text becomes white. It is now very easy to change this behavior and add a nice touch of color to your website. Changing the selection color can be achieved with the pseudo-element ::selection like this (a vendor prefix is still required for Firefox): ::selection {  background: rgb(131,209,222);       /* Webkit browres*/ color:#336; } ::-moz-selection { background: rgb(131,209,222);       /* Firefox */ color:#336; } This will change the default selection color to a greenish-blue and change the color of the text to a dark blue. The power of ::selection does not end there. It is of equal simplicity to define a different color for each element. In this example  the text of the first paragraph is selected in red, the text of the second

On learning the Colemak keyboard layout

Before learning the Colemak keyboard layout , I managed to write at 70wpm in English on the Slovenian QWERTZ layout. I started learning the new keyboard layout in mid September 2010, about 3 weeks before starting university. I was not interested in maintaining a skill in both layouts as I hoped to completely replace my layout as soon as possible. However it took me about a month before I reached 40wpm on the Colemak layout. This was enough to completely abandon the QWERTZ layout and since, my writing speed has been increasing slowly but steadily. US Colemak keyboard layout: Slovenian QWERTZ keyboard layout: The decision to learn Colemak was not related to writing speed, but to decrease the movement of the wrists while typing. The Colemak website claims that the fingers move 2.2 times more on a QWERY layout and that one can type 35 times more words using only the home row on Colemak. After all, hands are irreplaceable and one should take good care of them. The wrist-ache

Brake lights sensitive to braking force

Almost every time I sit in the co-driver's seat in a car, I get a feeling of fear and claustrophobia whehever the car at the front starts braking. I feel like the car in front may be braking more abruptly than the car I am sitting in. Hence, I squinch expecting a crash, which gladly has not happened yet. The red braking ligths are scary. While their purpose is to inform the drivers behind that the car is braking, it fails at telling how much it is braking. Because one can't know for sure if the car is braking abruptly or just sligthy, the back driver may push the braking pedal stronger or with less force than needed, causing a car crash. Hence, I have thougth of a solution: force sensitive braking lights . The idea is that the light is brigther when the braking force is larger and weaker when the braking force is smaller. However, it cannot be made just that simple. For the back driver to know how much the front car is braking, two characteristics are required: the current b

Digit sums of multiples of 11

"Some multiples of 11 have an even digit sum.  For example, 7*11 = 77 and 7+7 = 14, which is even; 11*11 = 121 and 1+2+1 = 4, which is even.  Do all multiples of 11 have an even digit sum?  (Prove that they do or find the smallest that does not.)"( Source ) To practice my Java programming skills (I've began learning Java about a month ago) I wrote a small program that finds all the numbers for which the statement does not hold. The output looks like this: > run Multilpe11 Some multiples of 11 have an even digit sum.  For example, 7*11 = 77 and 7+7 = 14, which is even; 11*11 = 121 and 1+2+1 = 4, which is even.   Do all multiples of 11 have an even digit sum?  (Prove that they do or find the smallest that does not.) For how many consecutive multiples of 11 would you like to check if the statement is correct:  1000 These are 36 numbers smaller than 1000, that are multiples of 11, but whose digit sum is not even. These numbers are: 209 308 319 407 418 429 506 517

The young generation doesn't know how to use email.

This story shows how the medium of large distance communication is evolving. Once people were limited to telegrams and postal letters. Then with the invention of the Internet we began using email, and nowadays its shifting to social networking websites, such as Facebook. Without further ado, the story. While browsing some albums on Facebook I found a picture I really liked. In a comment I asked the owner, a friend, whether she could send me a higher quality image by email.  She's about 10 years old. I have also attached my email address in the format username[at] gmail.com . A few seconds later I receive this reply:  " i dont have gmail... :P " The reply blew me away. It instantly imagined that she may never have used email, so I started looking at a very simple way to send me the photo. I thought that Drop.io would probably be too hard for her if she doesn't have an email. So I tried to find a way to let her upload the image to my Dropbox in one click.

Well thought heading design

Have you ever read a news article or a blog when you were in a hurry or very tired? Did it happen to you that you skipped words or read something completely different than the written text? These things happen to me quite often, as I lack the time to read carefully. Recently something similar occurred to me on the Google Apps for businesses  website. I was tired and I misread the title "More than two million businesses run Google Apps" as "More businesses than two million businesses run Google Apps".  Look at the screenshot and think about the flow of the words and how they impacted your reading. My eyes slipped from the first line to the second and then (the brain) corrected the mistake and returned to reading the first line, followed by the second, like like I am used to. Maybe textbooks would be easier to read if they weren't linear? The interesting part is that I quickly skipped to the second line, more precisely to the word "businesses".

IE9 doesn't seem to understand background-color

I have recently created my first website using HTML5. I have used some CSS3 attributes like box-shadow and border-radius , and they render correctly in all browsers except IE. IE is retarded. To enable some HTML5 features in IE I used this code snippet: <!--[if IE]> <script src="http://html5shim.googlecode.com/svn/trunk/html5.js" ></script> <![endif]--> While IE8 correctly positioned the elements, it still doesn't support CSS3. Below is a preview of IE8: However, IE9 preview, which brags about it's HTML5 support didn't even render the background-color correctly. What a shame. Surely it's a preview, but it should be better and not worse than IE8. On the bright side, the rest of the CSS, even the CSS3 tags, rendered correctly. See the rounded borders and shadow (looks like a glow) around the image: I am hoping that Microsoft fixes this bug, because regardless this bug the work they have done with hardware