Post Thumbnail

Some Cross Browser Css techniques

Aug162011
2

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;
    }

Comments

2 Comment(s) to "Some Cross Browser Css techniques"

  1. Tracy says:
    August 18, 2011 at 12:46 pm

    Realy informative :D

    Millions thanx :D

    Regards
    Tracy!

     

Leave your words

Oh Cmon Don't Be Shy.
(required)

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong> <pre lang="" line="" escaped="" highlight="">