Web Client Side Technologies Raneem Qaddoura

Slides:



Advertisements
Similar presentations
Coding a Responsive HTML
Advertisements

Use Tables for Layout Control Day 7. You will learn to: Understand Tables Create a Simple Table Modify Your Tables Appearance Create Page Layouts with.
Responsive Web Design Design websites so that they can adapt to different devices seamlessly. Image by Muhammed RafizeldiMuhammed Rafizeldi.
RESPONSIVE DESIGN Sources: Kadlec, T. (2012). Implementing responsive design. Berkeley, California: New Riders Publishing. MarcotteMarcotte, E. (2010).
LEARN THE QUICK AND EASY WAY! VISUAL QUICKSTART GUIDE HTML and CSS 8th Edition Chapter 12: Building Responsive Webpages.
TUTORIAL 8: Enhancing a Web Site with Advanced CSS
WDV 331 Dreamweaver Applications Designing Websites for Mobile Devices Dreamweaver CS6 Chapter 11.
And Mobile Web Browsers
DEVELOPING FOR MOBILE Jackie Calapristi. AGENDA  Why you should go mobile  Mobile Design Options  Responsive Design  Tips & Tools to Help You Build.
Using Styles and Style Sheets for Design
Basic Responsive Design Techniques. Let’s take a look at this basic layout. It has a header and two columns of text, in a box that is centered on the.
CONCEPTS FOR FLUID LAYOUT Web Page Layout. Website Layouts Most websites have organized their content in multiple columns (formatted like a magazine or.
Responsive design - Bedrock to our site Responsive site templates included.
Chapter 2 Developing a Web Page. A web page is composed of two distinct sections: – The head content – The body Creating Head Content and Setting Page.
Designing a Web Page with Tables. A text table: contains only text, evenly spaced on the Web page in rows and columns uses only standard word processing.
GO MOBILE. GO RESPONSIVE. 185 mil mobile internet users in India
Positioning Objects with CSS and Tables
 An HTML, CSS, Javascript framework you can use as a basis for creating web sites  Uses CSS settings, fundamental HTML elements styled and enhanced.
BEGINNER WEB DESIGN. INTRODUCTION Vocabulary Design Tools of the Trade HTML CSS.
1 Company Confidential Need a Mobile DotNetNuke Site? Get One the Quick and Easy Way Using CSS Media Queries Amelia Marschall Partner & Creative Director.
Fundamentals of Web DevelopmentRandy Connolly and Ricardo Hoar Textbook to be published by Pearson Ed in early Bootstrap.
Tutorial 4 Using CSS for Page Layout. Objectives Session 4.1 – Explore CSS layout – Compare types of floating layouts – Examine code for CSS layouts –
And Mobile Web Browsers
Front-end framework 1.
Laying out Elements with CSS
Working with Cascading Style Sheets
Bootstrap KS Technologies.
CSCI 1720 W3.CSS – Part 1 East Tennessee State University Department of Computing CSCI 1720 Intermediate Web Design.
CNIT131 Internet Basics & Beginning HTML
Implementing Responsive Design UNIT I.
Implementing Responsive Design
CSS Layouts: Grouping Elements
A better approach to mobile
Concepts for fluid layout
Positioning Objects with CSS and Tables
CIIT-Human Computer Interaction-CSC456-Fall-2015-Mr
Web Browsers & Mobile Web Browsers.
Programming the Web using XHTML and JavaScript
CS 0134 (term 2181) Jarrett Billingsley
RESPONSIVE WEB DESIGN.
CS3220 Web and Internet Programming Introduction to Bootstrap
IS1500: Introduction to Web Development
>> CSS Layouts.
Objectives Create a media query Work with the browser viewport
CSS part 2 Outro.
Responsive Design.
APTECH JANAKPURI INSTITUTE PROVIDING WEB DESIGNING COURSES Address:- J-1,2nd Floor, Opp Metro Pillar No – 559, Janakpuri East, Delhi /42.
Objectives Create a reset style sheet Explore page layout designs
Responsive Web Design (RWD)
Controlling Layout with Style Sheets
MORE Cascading Style Sheets (The Positioning Model)
Robert Kiffe Senior Customer Support Engineer
Responsive Web Design (RWD)
Responsive Framework.
DHTML tidbits.
Responsive Grid Layout with Bootstrap
Responsive Web Design (RWD)
Floating and Positioning
CS3220 Web and Internet Programming Introduction to Bootstrap
Web Page Layout Imran Rashid CTO at ManiWeber Technologies.
Web Client Side Technologies Raneem Qaddoura
Concepts for fluid layout
And Mobile Web Browsers
Web Client Side Technologies Raneem Qaddoura
Positioning Objects with CSS and Tables
Web Client Side Technologies Raneem Qaddoura
And Mobile Web Browsers
Various mobile devices
17 RESPONSIVE WEB DESIGN.
Christopher Harrison Jeremy Foster
Presentation transcript:

Web Client Side Technologies 0780341 Raneem Qaddoura CSS Web Client Side Technologies 0780341 Raneem Qaddoura

What is Responsive Web Design? Responsive web design makes your web page look good on all devices. Responsive web design uses only HTML and CSS. Responsive web design is not a program or a JavaScript. Web pages can be viewed using many different devices: desktops, tablets, and phones. Your web page should look good, and be easy to use, regardless of the device.

Designing For The Best Experience For All Users Web pages should not leave out information to fit smaller devices, but rather adapt its content to fit any device: https://www.w3schools.com/css/tryit.asp?filename=tryresponsive_col-s

The Viewport The viewport is the user's visible area of a web page. The viewport varies with the device, and will be smaller on a mobile phone than on a computer screen. Before tablets and mobile phones, web pages were designed only for computer screens, and it was common for web pages to have a static design and a fixed size. Then, when we started surfing the internet using tablets and mobile phones, fixed size web pages were too large to fit the viewport. To fix this, browsers on those devices scaled down the entire web page to fit the screen. This was not perfect!! But a quick fix.

Setting The Viewport HTML5 introduced a method to let web designers take control over the viewport, through the <meta> tag. You should include the following <meta> viewport element in all your web pages: A <meta> viewport element gives the browser instructions on how to control the page's dimensions and scaling. The width=device-width part sets the width of the page to follow the screen-width of the device (which will vary depending on the device). The initial-scale=1.0 part sets the initial zoom level when the page is first loaded by the browser. <meta name="viewport" content="width=device-width, initial-scale=1.0">

Setting The Viewport Here is an example of a web page without the viewport meta tag, and the same web page with the viewport meta tag:

Size Content to The Viewport Users are used to scroll websites vertically on both desktop and mobile devices - but not horizontally! So, if the user is forced to scroll horizontally, or zoom out, to see the whole web page it results in a poor user experience. Some additional rules to follow: Do NOT use large fixed width elements - For example, if an image is displayed at a width wider than the viewport it can cause the viewport to scroll horizontally. Remember to adjust this content to fit within the width of the viewport. Do NOT let the content rely on a particular viewport width to render well - Since screen dimensions and width in CSS pixels vary widely between devices, content should not rely on a particular viewport width to render well. Use CSS media queries to apply different styling for small and large screens - Consider using relative width values, such as width: 100%.

Grid-View Many web pages are based on a grid-view, which means that the page is divided into columns: A responsive grid-view often has 12 columns, and has a total width of 100%, and will shrink and expand as you resize the browser window.

Grid-View Using a grid-view is very helpful when designing web pages. It makes it easier to place elements on the page. https://www.w3schools.com/css/tryresponsive_grid.htm

Building a Responsive Grid-View First ensure that all HTML elements have the box-sizing property set to border-box. This makes sure that the padding and border are included in the total width and height of the elements (CSS Box Sizing). Add the following code in your CSS: * {   box-sizing: border-box; }

Example Example 1 shows a simple responsive web page, with two columns:

Examples The example above is fine if the web page only contains two columns. However, we want to use a responsive grid-view with 12 columns, to have more control over the web page. First we must calculate the percentage for one column: 100% / 12 columns = 8.33%. Then we make one class for each of the 12 columns, class=“col-” and a number defining how many columns the section should span. All these columns should be floating to the left, and have a padding of 15px Each row should be wrapped in a <div> . The number of columns inside a row should always add up to 12. The columns inside a row are all floating to the left, and are therefore taken out of the flow of the page, and other elements will be placed as if the columns do not exist. To prevent this, we will add a style that clears the flow. Example 2 shows an updated responsive web page, with two columns.

Examples Example 3 adds some styles and colors to make it look better Notice that the webpage in the example does not look good when you resize the browser window to a very small width. We will learn how to fix that.

Media Query Media query is a CSS technique introduced in CSS3. It uses the @media rule to include a block of CSS properties only if a certain condition is true. Width In this Example, if the browser window is 600px or smaller, the background color will be lightblue: This Example hides elements with media queries This Example changes the font size of an element Orientation Media queries can also be used to change layout of a page depending on the orientation of the browser. You can have a set of CSS properties that will only apply when the browser window is wider than its height, a so called "Landscape" orientation (See this Example).

Media Query Add a Breakpoint In Example 3, it did not look good on a small screen. Media queries can help with that. We can add a breakpoint where certain parts of the design will behave differently on each side of the breakpoint. In Example 4, We use a media query to add a breakpoint at 768px. Always for Mobile First Design Mobile First means designing for mobile before designing for desktop or any other device (This will make the page display faster on smaller devices). This means that we must make some changes in our CSS. Instead of changing styles when the width gets smaller than 768px, we should change the design when the width gets larger than 768px. Example 5 makes the design Mobile First.

Media Query Another Breakpoint You can add as many breakpoints as you like. We will also insert a breakpoint between tablets and mobile phones. We do this by adding one more media query (at 600px), and a set of new classes for devices larger than 600px (but smaller than 768px). Note that in Example 6 the two sets of classes are almost identical, the only difference is the name (col- and col-s). Typical Device Breakpoints There are tons of screens and devices with different heights and widths, so it is hard to create an exact breakpoint for each device. To keep things simple you could target five groups (See this Example).

Images Using The width Property If the width property is set to a percentage and the height is set to "auto", the image will be responsive and scale up and down (See this Example). Example 7 adds an image to Example 6. Using The max-width Property If the max-width property is set to 100%, the image will scale down if it has to, but never scale up to be larger than its original size (See this Example) Different Images for Different Devices Why load a large image when you have to scale it down anyway? To reduce the load, or for any other reasons, you can use media queries to display different images on different devices. This Example displays one large image and one smaller image on different devices. This Example uses the media query min-device-width, instead of min-width, which checks the device width, instead of the browser width. The image will not change when you resize the browser window.

picture HTML5 introduced the <picture>  element, which lets you define more than one image. The <picture> element works similar to the <video> and <audio> elements. This Example sets up different sources, and the first source that fits the preferences is the one being used. The srcset attribute is required, and defines the source of the image. The media attribute is optional, and accepts the media. You should also define an <img> element for browsers that do not support the <picture> element.

Video Using The width Property If the width property is set to 100%, the video player will be responsive and scale up and down (See this Example) Notice that in the example above, the video player can be scaled up to be larger than its original size. A better solution, in many cases, will be to use the max-width property instead (See this Example). Example 8 adds a video to Example 6.

CSS Libraries What is a Software library? A software library is a collection of files, programs, routines, scripts, or functions that can be referenced in the programming, scripting, or markup languages. What is a CSS library? Set of tags and classes with predefined set of CSS properties which are defined in one or more css files. The css files can be added inside the <head> section of HTML files which allow the front end developers to style the HTML elements of their web pages.

CSS Libraries List of notable CSS libraries Bootstrap: Responsive, mobile-first projects on the web with bootstrap library. Font-Awesome: The iconic font and CSS toolkit W3.css: W3.CSS supports responsive mobile first design to speed up and simplify web development animate: A cross-browser library of CSS animations normalize: A collection of HTML element and attribute style-normalizations Effeckt: A Performant Transitions and Animations Library hint: A CSS only tooltip library for your lovely websites.

What is Bootstrap? What is Bootstrap? Bootstrap is a free front-end framework for faster and easier web development Bootstrap includes HTML and CSS based design templates for typography, forms, buttons, tables, navigation, modals, image carousels and many other, as well as optional JavaScript plugins Bootstrap also gives you the ability to easily create responsive designs Why Use Bootstrap? Easy to use: Anybody with just basic knowledge of HTML and CSS can start using Bootstrap Responsive features: Bootstrap's responsive CSS adjusts to phones, tablets, and desktops Mobile-first approach: In Bootstrap, mobile-first styles are part of the core framework Browser compatibility: Bootstrap 4 is compatible with all modern browsers (Chrome, Firefox, Internet Explorer 10+, Edge, Safari, and Opera)

What is Font-Awesome? What is Font-Awesome? Font-awesome is the web's most popular vector icon and social logos set that can be placed on your website. Why use Font-Awesome? Professionally Designed + Pixel-Perfect: Each and every symbol is designed from scratch against guidelines and standards forged from years of experience of illustrating and designing icons. The result is a consistent look and feel that spans thousands of icons across three unique styles. Near-Infinite Icons: Font Awesome has grown to have over 5,000 icons and continues to add the most popular and needed icons. Stop hunting down missing icons you need, combining from multiple sets, or finding that company's official logo in a dirty corner of the internet. Play with Our Icons: Our icons are easy to use on the web out of the box. And that box includes support styling to help you size, place, style, and even animate any icon. See what you can do with one line of our easy to remember code.

References https://www.w3schools.com/ Sharma, P. (2013). Introduction to Web Technology. SK Kataria and Sons. Peterson, C. (2014). Learning responsive web design: a beginner's guide. " O'Reilly Media, Inc.".