CSS part 2 Outro.

Slides:



Advertisements
Similar presentations
LIS650 lecture 4 Thomas Krichel today Advice CSS Properties –Box properties-- List properties –Table properties-- Classification properties.
Advertisements

LIS650 lecture 4 Thomas Krichel today CSS Properties –Box properties-- List properties –Table properties-- Classification properties –(Audio.
LIS650 lecture 4 Thomas Krichel today Advice CSS Properties –Box properties –List properties –Classification properties Fun with selectors.
Copyright © Terry Felke-Morris WEB DEVELOPMENT & DESIGN FOUNDATIONS WITH HTML5 Chapter 7 Key Concepts 1 Copyright © Terry Felke-Morris.
Layout using CSS. Using multiple classes In the head:.important{font-style:italic;}.title{color:red;} In the body: Here's a type of paragraph that is.
Web Pages and Style Sheets Bert Wachsmuth. HTML versus XHTML XHTML is a stricter version of HTML: HTML + stricter rules = XHTML. XHTML Rule violations:
XP 1 Working with Cascading Style Sheets Creating a Style for Online Scrapbooks Tutorial 7.
RESPONSIVE DESIGN Sources: Kadlec, T. (2012). Implementing responsive design. Berkeley, California: New Riders Publishing. MarcotteMarcotte, E. (2010).
TUTORIAL 8: Enhancing a Web Site with Advanced CSS
CIT 256 Mobile Web Development Dr. Beryl Hoffman.
CIS 1310 – HTML & CSS 7 More on Links, Layout & Mobile.
Page Layout & Mobile Web Using columns, grid systems, etc… to layout sites for desktops and mobile.
Tutorial 4: Using CSS for Page Layout. 2 Objectives Session 4.1 Explore CSS layout Compare types of floating layouts Examine code for CSS layouts View.
Professor Waterman Cascading Style Sheets (CSS) is a language that works with HTML documents to define the way content is presented. The presentation.
CSS BEST PRACTICES.
Copyright © Terry Felke-Morris WEB DEVELOPMENT & DESIGN FOUNDATIONS WITH HTML5 Chapter 7 Key Concepts 1 Copyright © Terry Felke-Morris.
CONTROLLING Page layout
Tutorial 4 Creating Page Layouts with CSS
Positioning Objects with CSS and Tables
Understanding CSS Cascading Style Sheets control the presentation of content in HTML pages Style Sheets separate formatting from the content –Styles defined.
CSS.
Laying out Elements with CSS
Working with Cascading Style Sheets
Web Development & Design Foundations with HTML5
CSCI 1720 W3.CSS – Part 1 East Tennessee State University Department of Computing CSCI 1720 Intermediate Web Design.
Implementing Responsive Design UNIT I.
>> Navigation and Layouts in CSS
Implementing Responsive Design
A better approach to mobile
Responsive Web Design (RWD)
CS 321: Human-Computer Interaction Design
CIIT-Human Computer Interaction-CSC456-Fall-2015-Mr
Tables and Frames.
Web Development & Design Foundations with HTML5
Programming the Web using XHTML and JavaScript
Web Systems & Technologies
CS 0134 (term 2181) Jarrett Billingsley
CS3220 Web and Internet Programming Page Layout with CSS
RESPONSIVE WEB DESIGN.
CS3220 Web and Internet Programming Page Layout with CSS
>> CSS Layouts.
7 More on Links, Layout & Mobile.
Objectives Create a media query Work with the browser viewport
The Internet 10/25/11 XHTML Tables
Cascading Style Sheets
IS333: MULTI-TIER APPLICATION DEVELOPMENT
Responsive Design.
CSS BEST PRACTICES.
2017, Fall Pusan National University Ki-Joune Li
Objectives Create a reset style sheet Explore page layout designs
Responsive Web Design (RWD)
Styles and the Box Model
CSS Borders and Margins.
MORE Cascading Style Sheets (The Positioning Model)
Responsive Web Design (RWD)
SEEM4570 Tutorial 3: CSS + CSS3.0
How to use the CSS box model for spacing, borders, and backgrounds
Responsive Web Design (RWD)
CSS level 3.
Floating and Positioning
CS3220 Web and Internet Programming Page Layout with CSS
Web Page Layout Imran Rashid CTO at ManiWeber Technologies.
Laying out Elements with CSS
Web Client Side Technologies Raneem Qaddoura
Web Development & Design Foundations with HTML5
CSS Layout: Flexbox.
Web Client Side Technologies Raneem Qaddoura
Web Programming and Design
17 RESPONSIVE WEB DESIGN.
CGS 3066: Web Programming and Design Fall 2019 CSS Part 2
Presentation transcript:

CSS part 2 Outro

Some CSS Properties z-index: auto | <integer> Controls stacking elements position: fixed | absolute | static | relative | sticky Sticky is experimental (for now) clear: none | left | right| both

Multiple Column Layout Use floats for layout Use divs with explicit widths and floats specified to achieve multiple column layout Use percentages to achieve fluid design Use max-width and min-width to restrict stretching and shrinking of content Use margin to center divs

Transitions State changes usually occur instantly Transitions exist to smooth out the change Four properties need to be defined: CSS property to change (transition-property) How long transition takes (transition-duration) How the transition accelerates (transition-timing-function) Whether there’s a pause before transition starts (transition-delay)

Transitions Shorthand syntax: transition: property duration timing-function delay; Transition multiple properties by separating values for each property with a comma

Transform

Transform Transform: rotate(angledeg) | translate(xpx,ypx) | scale(z) | skew(xdeg,ydeg); You can apply multiple transfroms by spacing functions, eg: transform: rotate(90deg) scale(1.5) skew(30deg, 40deg);

Keyframes Animation Transitions define two states (start and end) only Intermediate states calculated automatically Programmer can explicitly define intermediate states using @keyframes rule Example: DO IT YOURSELF

CSS Reset Browsers (User Agents) provide their own style sheet Users may want to override this style sheet for consistency This is achieved using a ‘CSS Reset’ Many reset style sheets exist. Find some

CSS Image Replacement Replace text with image when no appropriate font exists Multiple approaches exist #tmp{ Text-indent: 100%; overflow: hidden; whitespace: nowrap; }

CSS Sprites Use image replacement technique to improve page performance Load one large image instead of loading several smaller ones Use bakcground-position property and image replacement techniques to display the correct image Example: Do it yourself

SASS & LESS Extension to CSS language Add variables, maths, nesting and mixing in rules Need to be compiled to native css Reduce production SASS; sass-lang.com LESS; lesscss.org

Styling Forms Forms using HTML exclusively are ugly Little CSS is enough to see a drastic improvement Properly aligned forms increase user engagement

Styling Forms Start with basic style: block level properties, clearing floats Align labels by using float, text-align, and making the label block-level Fix fieldsets (eg removing border) and style buttons appropriately

Styling tables border-collapse: separate | collapse border-spacing: horizontalpx verticalpx empty-cells: show | hide | inherit Individual cells can be styled as necessary

Responsive Web Design Page layout adapts to available screen size

Responsive Web Design Fluid Layout Flexible images Media Queries Use percentage when defining widths Flexible images Img{max-width: 100%;} Media Queries Deliver styles based on media (screen, mobile,…)

Responsive Web Design Start with setting viewport in head element using meta tag <meta name="viewport" content="width=device-width, initial-scale=1"> This sets the viewport to the width of the device (mobile or desktop)

Responsive Web Design Media Queries start with @media followed by media, like screen, followed by condition @media screen and (min-width:480px;){ /*mobile specific styles here*/ } This media query targets screens that have a viewport min-width of 480px (bigger than mobile devices)

Responsive Web Design Strategies: Mobile first approach; design for mobile and style to scale Usually RWD have two layouts; mobile and desktop. Some include a 3rd for tablets There is an increasing array of devices with different widths. This is why developers are moving away from px in favour of em when defining media queries (Future proofing)

Conclusions CSS is sometimes enough for RWD, other times JavaScript may be necessary When the user experience varies greatly between mobile and desktop, developing two different sites may be better than RWD This is an introduction. The web is the ultimate resource for knowledge expansion