Archive for May, 2011

 

Common JavaScript/jQuery bugs in IE6-7-8

I always write my JavaScript scripts in Firefox, I test them in Firefox and then I move to Opera and Chrome/Safari. After my script works in all above browsers I try to make it work in IE at least version 8 (but sometimes also 7 and even 6).
Usually there are none to very little changes needed to port a script from Firefox to Opera & Chrome/Safari. Especially when I use jQuery library, but IE… that’s a different story.

PHP Error: unserialize() [function.unserialize]: Error at offset 118 of 512

Lately I got this error in my script while trying to decode serialized UTF-8 string:

unserialize() [function.unserialize]: Error at offset 118 of 512

Here’s a simple solution I found.

Gradient-filled colorful boxes – in CSS

Want to make a nice gradient colored box without using ugly background images? Just apply this set of rules to any element, like DIV:
         
   

background-color: #00FF00;
background-image: -moz-linear-gradient(top, #00FF00, #FFFF00); /* Firefox */
background-image: -ms-linear-gradient(top, #00FF00, #FFFF00); /* IE10 */
background-image: -o-linear-gradient(top, #00FF00, #FFFF00); /* Opera */
background-image: -webkit-gradient(linear, left top, left bottom, from(#00FF00), to(#FFFF00)); /* Safari/Chrome */
background-image: -webkit-linear-gradient(top, [...]

Rotating elements in CSS aka How to make diagonal line in CSS

If you want to make a diagonal line in CSS you can just draw a rectangle with height so small it’s almost a line and then rotate it a bit.

 
TopOfBlogs Web Development & Design Blogs