Search code examples
htmlioscssbackground-colorplatform

CSS Buttons on different platforms


CSS Buttons when viewed on windows desktop or apple mac have a default background color of grey (#DDD) but when viewed on ios mobile, the default background color is transparent. This can be fixed by manually adding css background color as #DDD but still why does this happen? Any Ideas?


Solution

  • They look different because browsers have different renderings of CSS.

    I recommend to use -webkit and -moz to avoid this type of problem.

    .btn{
      -webkit-background-color: #DDD;
      -moz-background-color: #DDD;
       background-color: #DDD;
     }