Professional Documents
Culture Documents
BASIC STYLING
Mr. SAR Vathnak
May , 2018
PHNOM PENH INTERNATIONAL UNIVERSITY FACULTY OF SCIENCE AND INFORMATION TECHNOLOGY
OBJECTIVES
To run a web server locally (on PC) for connecting Web App to run
on Android phone
To prepare a separate CSS stylesheet for Android look and feel
To control the page scaling between each devices
To format basic styling for Android look and feel
To add some basic behavior with jQuery to Web App
Solution #1:
1. Host your web app on a web server running on your local computer
2. Connect your Android Phone to that web server
NOTE: This only works when your Android phone & computer are on the same WiFi network
Solution #2: In case that you don’t have Android Phone, use Google Chrome web
browser by:
1. Open your web app with Google Chrome web browser
2. Right-Click on browser and choose Inspect option
3. Click on Toggle Device Toolbar
4. Select your preferable device type
BASIC STYLING PROGRAMMING MOBILE APPLICATIONS | BY SAR VATHNAK >> 2
SOLUTION #1
IN CASE OF
HAVING ANDROID PHONE
Hosting Your Web App To IIS Web Server
Assume that you have installed/enabled IIS
web services in your local computer
Search IIS in your PC
Click on Start
SOLUTION #1
PAGE 2 OF 7
Checking Your Computer’s WiFi IP Address
Assume that your PC has already been
connected to your preferable WiFi network
SOLUTION #1
PAGE 3 OF 7
Checking Your Computer’s WiFi IP Address
Scroll to Wireless LAN adapter Wi-Fi section
In my case:
192.168.1.105
Your WiFi IP Address
SOLUTION #1
PAGE 4 OF 7
Running From Your Android Phone
SOLUTION #1
PAGE 5 OF 7
Running From Your Android Phone
SOLUTION #1
PAGE 6 OF 7
Running From Your Android Phone
SOLUTION #1
PAGE 7 OF 7
SOLUTION #2
IN CASE OF
HAVING NO ANDROID PHONE
Opening Web App With Google Chrome Web Browser
Assume that you run your web app from IIS web server in local computer
SOLUTION #2
PAGE 1 OF 5
Opening Web App With
Google Chrome
Web Browser
SOLUTION #2
PAGE 2 OF 5
Inspect in Chrome
SOLUTION #2
PAGE 3 OF 5
Using Toggle Device Toolbar
Click on option:
Toggle device toolbar
SOLUTION #2
PAGE 4 OF 5
Switching Device View
SOLUTION #2
PAGE 5 OF 5
PHNOM PENH INTERNATIONAL UNIVERSITY FACULTY OF SCIENCE AND INFORMATION TECHNOLOGY
ENABLE IIS
IN WINDOW OS
1. Go to Control Panel
▶ Programs
FIRST STEP
The first step on this journey is to
get
comfortable styling HTML to look
like
a mobile app.
So now, assume that we start
coding
our first web app like this
View in Desktop version
FIRST STEP
The first step on this journey is to
get
comfortable styling HTML to look
like
a mobile app.
So now, assume that we start
coding
our first web app like this
View in Android Phone version
To specify a stylesheet specifically for Android (also small device with iPhone
or
Windows Phone), replace the stylesheet link tag with following expressions
Added for
IE browser
Desktop browsers will ignore the viewport meta tag, so you can include it
without worrying
about the desktop version of your site.
BASIC STYLING PROGRAMMING MOBILE APPLICATIONS | BY SAR VATHNAK >> 7
PHNOM PENH INTERNATIONAL UNIVERSITY FACULTY OF SCIENCE AND INFORMATION TECHNOLOGY
First, set some general site-wide styles on the HTML body element in
android.css
Fifth, remove the footer from the Android version of the page in android.css
blur color
NOTE ON -webkit-gradient( ) CSS VALUE
the gradient type the starting point of
(either linear or radial) the gradient
left top
left bottom
right top
right bottom