SlideShare a Scribd company logo
Responsive Layouts
There are different modes based upon screen
resolution of device
320px - Smart phones in portrait mode
480px - Smart phones in landscape mode
720px - For tablets in portrait mode
960px - For tablets in landscape mode and desktop browsers
 Alloy UI Viewport
 Media Queries
 JavaScript tools (Bootstrap)
 Device Recognition (WURFL)
Responsive Layouts Using
different types
Alloy UI Viewport
How to Use Alloy UI Viewport
Add this line in main.js in your theme
Alloy UI Viewport works
It adds a few classes to the HTML element based on the width of the device’s window
Based on these class, we need create selectors which match some devices only.
Example of AUI Viewport
AUI().use('aui-viewport')
<html class="aui-view-gt320 aui-view-gt480 aui-view-gt720 auiview-gt960 aui-view-960">
#navigation li { display: inline; float:left;}
.aui-view-lt720 #navigation li, .aui-view-gt480 #navigation li,.aui-view-gt320 #navigation li
{ display: block; float:none;}
.aui-view-gt320 #navigation li { display: block; float:none;margin:0px;}
Media Queries
How to Use Media Queries
Add this meta in portal_normal.vm inside the head tag
Add this line in portal_normal.vm inside the head tag.
Or
We could add in our custom style sheets import css file
Also we could write css
<link rel="stylesheet" type="text/css" media="screen and (max-device-width: 480px)"
href="moblie480.css" />
@import url("moblie480.css") screen and (max-device-width: 480px);
@media screen and (max-width: 720px) {
.column {float: none; }
}
@media screen and (min-width: 480px) {
.column {float: none; }
}
@media screen and (width: 320px) {
.column {float: none; }
}
@media (min-width: 768px) and (max-width: 979px) {
.column {float: none; }
}
<meta name="viewport" content="width=device-width, initial-scale=1">
JavaScript tools (Bootstrap)
Create theme in this structure.
Include bootstrap.css and bootstrap-responsive.css in main.css
Include bootstrap.js and bootstrap.min.js in portal_normal.vm before closing body tag.
Change all css and div of portal_normal.vm and navigation.vm
Based on your layouts.
Responsive css will take care of bootstrap if you wants to customize use media queries.
You could customize css and JavaScript using bootstrap tools.
URL: http://twitter.github.io/bootstrap/
Device Recognition (WURFL)
Download Device Recognition (WURFL) in market place.
Add mobile Device rules then select rule group in site pages
Then goto manage actions click on add actions select type theme modification. Select
your mobile customize theme. We can also create moblie themes using jqtouch, jquery
mobile.

More Related Content

PDF
20160109 設計師順手這樣做,工程師感謝你
PDF
Adaptive layouts - standards>next Manchester 23.03.2011
PDF
The Future of CSS with Web Components
DOC
WebAPI Odata Knockout
PPTX
Html canvas
DOCX
Java script slideshow by karan chanana
PDF
Liferay architecture By Navin Agarwal
PDF
Dynamic User Interfaces for Desktop and Mobile
20160109 設計師順手這樣做,工程師感謝你
Adaptive layouts - standards>next Manchester 23.03.2011
The Future of CSS with Web Components
WebAPI Odata Knockout
Html canvas
Java script slideshow by karan chanana
Liferay architecture By Navin Agarwal
Dynamic User Interfaces for Desktop and Mobile

Similar to Responsive layouts by Maqbool (20)

PDF
Responsive Websites
PPTX
Create Responsive Website Design with Bootstrap 3
PDF
Adaptive Layouts - standards>next London 28.05.2011
PDF
Responsive Web Design e a Ubiquidade da Web
PDF
The specs behind the sex, mobile-friendly layout beyond the desktop
PPTX
Lect-4-Responsive-Web-06032024-082044am.pptx
PDF
Responsive design: techniques and tricks to prepare your websites for the mul...
PDF
Twitter Bootstrap
PDF
Responsive Design: Mehr als CSS
PDF
Introduction to Responsive Web Design
PPTX
Bootstrap 3
PDF
Vaadin Components
PDF
Adapt and respond - mobile-friendly layouts beyond the desktop - standards>ne...
PPTX
Layouts Part 2
PDF
Building the new AppExchange using Responsive Design
PPTX
Presentation of bootstrap
PDF
Adaptive theming using compass susy grid
PDF
Intro to @viewport & other new Responsive Web Design CSS features
PDF
Bootstrap Study Share
PDF
"Conditionally adaptive" Vadim Makeev
Responsive Websites
Create Responsive Website Design with Bootstrap 3
Adaptive Layouts - standards>next London 28.05.2011
Responsive Web Design e a Ubiquidade da Web
The specs behind the sex, mobile-friendly layout beyond the desktop
Lect-4-Responsive-Web-06032024-082044am.pptx
Responsive design: techniques and tricks to prepare your websites for the mul...
Twitter Bootstrap
Responsive Design: Mehr als CSS
Introduction to Responsive Web Design
Bootstrap 3
Vaadin Components
Adapt and respond - mobile-friendly layouts beyond the desktop - standards>ne...
Layouts Part 2
Building the new AppExchange using Responsive Design
Presentation of bootstrap
Adaptive theming using compass susy grid
Intro to @viewport & other new Responsive Web Design CSS features
Bootstrap Study Share
"Conditionally adaptive" Vadim Makeev
Ad

Recently uploaded (20)

PDF
Zenith AI: Advanced Artificial Intelligence
PPTX
SOPHOS-XG Firewall Administrator PPT.pptx
PDF
Hindi spoken digit analysis for native and non-native speakers
PDF
Agricultural_Statistics_at_a_Glance_2022_0.pdf
PPTX
A Presentation on Touch Screen Technology
PPTX
TechTalks-8-2019-Service-Management-ITIL-Refresh-ITIL-4-Framework-Supports-Ou...
PPTX
Programs and apps: productivity, graphics, security and other tools
PDF
Web App vs Mobile App What Should You Build First.pdf
PPTX
Tartificialntelligence_presentation.pptx
PDF
ENT215_Completing-a-large-scale-migration-and-modernization-with-AWS.pdf
PDF
From MVP to Full-Scale Product A Startup’s Software Journey.pdf
PDF
Mushroom cultivation and it's methods.pdf
PDF
gpt5_lecture_notes_comprehensive_20250812015547.pdf
PDF
Profit Center Accounting in SAP S/4HANA, S4F28 Col11
PDF
DP Operators-handbook-extract for the Mautical Institute
PDF
project resource management chapter-09.pdf
PDF
Microsoft Solutions Partner Drive Digital Transformation with D365.pdf
PDF
Univ-Connecticut-ChatGPT-Presentaion.pdf
PDF
A comparative study of natural language inference in Swahili using monolingua...
PDF
Assigned Numbers - 2025 - Bluetooth® Document
Zenith AI: Advanced Artificial Intelligence
SOPHOS-XG Firewall Administrator PPT.pptx
Hindi spoken digit analysis for native and non-native speakers
Agricultural_Statistics_at_a_Glance_2022_0.pdf
A Presentation on Touch Screen Technology
TechTalks-8-2019-Service-Management-ITIL-Refresh-ITIL-4-Framework-Supports-Ou...
Programs and apps: productivity, graphics, security and other tools
Web App vs Mobile App What Should You Build First.pdf
Tartificialntelligence_presentation.pptx
ENT215_Completing-a-large-scale-migration-and-modernization-with-AWS.pdf
From MVP to Full-Scale Product A Startup’s Software Journey.pdf
Mushroom cultivation and it's methods.pdf
gpt5_lecture_notes_comprehensive_20250812015547.pdf
Profit Center Accounting in SAP S/4HANA, S4F28 Col11
DP Operators-handbook-extract for the Mautical Institute
project resource management chapter-09.pdf
Microsoft Solutions Partner Drive Digital Transformation with D365.pdf
Univ-Connecticut-ChatGPT-Presentaion.pdf
A comparative study of natural language inference in Swahili using monolingua...
Assigned Numbers - 2025 - Bluetooth® Document
Ad

Responsive layouts by Maqbool

  • 1. Responsive Layouts There are different modes based upon screen resolution of device 320px - Smart phones in portrait mode 480px - Smart phones in landscape mode 720px - For tablets in portrait mode 960px - For tablets in landscape mode and desktop browsers
  • 2.  Alloy UI Viewport  Media Queries  JavaScript tools (Bootstrap)  Device Recognition (WURFL) Responsive Layouts Using different types
  • 3. Alloy UI Viewport How to Use Alloy UI Viewport Add this line in main.js in your theme Alloy UI Viewport works It adds a few classes to the HTML element based on the width of the device’s window Based on these class, we need create selectors which match some devices only. Example of AUI Viewport AUI().use('aui-viewport') <html class="aui-view-gt320 aui-view-gt480 aui-view-gt720 auiview-gt960 aui-view-960"> #navigation li { display: inline; float:left;} .aui-view-lt720 #navigation li, .aui-view-gt480 #navigation li,.aui-view-gt320 #navigation li { display: block; float:none;} .aui-view-gt320 #navigation li { display: block; float:none;margin:0px;}
  • 4. Media Queries How to Use Media Queries Add this meta in portal_normal.vm inside the head tag Add this line in portal_normal.vm inside the head tag. Or We could add in our custom style sheets import css file Also we could write css <link rel="stylesheet" type="text/css" media="screen and (max-device-width: 480px)" href="moblie480.css" /> @import url("moblie480.css") screen and (max-device-width: 480px); @media screen and (max-width: 720px) { .column {float: none; } } @media screen and (min-width: 480px) { .column {float: none; } } @media screen and (width: 320px) { .column {float: none; } } @media (min-width: 768px) and (max-width: 979px) { .column {float: none; } } <meta name="viewport" content="width=device-width, initial-scale=1">
  • 5. JavaScript tools (Bootstrap) Create theme in this structure. Include bootstrap.css and bootstrap-responsive.css in main.css Include bootstrap.js and bootstrap.min.js in portal_normal.vm before closing body tag.
  • 6. Change all css and div of portal_normal.vm and navigation.vm Based on your layouts. Responsive css will take care of bootstrap if you wants to customize use media queries. You could customize css and JavaScript using bootstrap tools. URL: http://twitter.github.io/bootstrap/
  • 7. Device Recognition (WURFL) Download Device Recognition (WURFL) in market place. Add mobile Device rules then select rule group in site pages Then goto manage actions click on add actions select type theme modification. Select your mobile customize theme. We can also create moblie themes using jqtouch, jquery mobile.