Home > UI/UX Development > CSS > How to set background image position for all browsers in CSS? Specially for Safari browser.

How to set background image position for all browsers in CSS? Specially for Safari browser.

CSS:

div{

                   width:600px;

                   height:400px;

                   border:5px solid black;

                   background-image: url(‘image.jpg’);                        /*Add your image path here*/

                   background-repeat: no-repeat;

                   background-position: right 75% center;                   /*For all browser except Safari*/

                   background-position-x: 25%;                                      /*For support all browsers with Safari browser*/

                  background-position-y: 50%;                                      /*For support all browsers with Safari browser*/

                  margin:0 auto;

}

DEMO

This Article is TAGGED in . BOOKMARK THE permalink.

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code class="" title="" data-url=""> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong> <pre class="" title="" data-url=""> <span class="" title="" data-url="">