Aug
16
2011

Some Cross Browser Css techniques

Post in CSS by Ayush Singh @ 2 Comments | Permalink

In CSS there is some CSS tricks are obscure for some web developers. and in this post i am going to tell some of Cross Browser techniques which you may don’t know.

Disable Textarea resizing


This CSS code will remove realizable arrow from all textarea. Work in Firefox, Chrome and Safari.

textarea {
      resize: none;
}

Cross browser rounded corners


This CSS code will add round corner. Work in Firefox, Chrome, Safari, Opera and IE9.

.roll {
     border-radius: 8px; /* Opera, CSS3 */
    -moz-border-radius:8px; /* Firefox */
    -webkit-border-radius: 8px; /* Safari, Chrome */
    -khtml-border-radius: 8px; /*  Konqueror */
}

Cross browser transparency

This CSS code will add transparency to HTML elements . Work in IE, Opera, Firefox, Safari, Chrome, Konqueror.

.trans {
	filter:alpha(opacity=50); /* IE */
	-moz-opacity:0.5; /* Firefox  */
	-khtml-opacity: 0.5; /* Konqueror  */
	opacity: 0.5; /* CSS */
}

Cross browser change selected text color


This CSS code will change selected text color. Work in Firefox, Safari, Chrome and Opera.

    ::selection {
    background:#F579D8;
    color:#520043;
    }
 
    ::-moz-selection {
    background:#F579D8;
    color:#520043;
    }
 
    ::-webkit-selection {
    background:#F579D8;
    color:#520043;
    }

Discussion 2 Comments

Says:
August 16, 2011 @ 5:48 pm

Great! Thanks!

Says:
August 18, 2011 @ 12:46 pm

Realy informative :D

Millions thanx :D

Regards
Tracy!

Add a Comment

   
My Mood Status
Mood : Moody
Thinking of writing one new plugin for wordpress.
idea is also there just need to start. if you guys have any idea share with me :).
Latest Comments
Recent Comments
Get in Touch