Search code examples
htmlcsscross-browsermobile-application

How to make an application that works on both mobile and desktop web browsers?


I am trying to make a web-application, which I will host on a server. It should be able to be accessed by mobile browsers on all smart phones, and also on desktop web browsers.

I am pretty new to this. Checking this out on Google is confusing me a little more, because I know I can make applications in HTML5, CSS3 and JavaScript and they can be accessed on mobile browsers similarly as desktop browsers, but what I want to know is how to take care of the size and specification for the phone. The UI components should be user-friendly in mobile environment.

Is there any IDE or API that makes this possible?


Solution

  • but what i want to know is how to take care of the size and specification for the phone,

    You should be using CSS media queries for that:

    @media (max-width:480px) 
    {
      // styles for devices with width 480px or less, e.g. iPhone
    
    }
    

    MEDIA QUERIES