Today’s Agenda Advanced CSS Techniques Floating Z-index Centering Sliding Doors Fluid Layouts CSS3 Advanced CSS Lab Mini Project #2.

Slides:



Advertisements
Similar presentations
Week 10 Creating Positioned Layouts
Advertisements

CSS Layout Crash Course An Advance CSS Tutorial. Inline vs. Block Many HTML elements have a default display setting of Block. Block elements take up the.
Chapter 7 Page Layout Basics Key Concepts Copyright © 2013 Terry Ann Morris, Ed.D 1.
CIS 1310 – HTML & CSS 6 Layout. CIS 1310 – HTML & CSS Learning Outcomes  Describe & Apply the CSS Box Model  Configure Float with CSS  Designate Positioning.
Floating Elements CS380.
Tutorial 4: Creating page layout with css
CIT 256 CSS Divs & Buttons Dr. Beryl Hoffman. CSS for Layout We now can make our own divs to divide up a web page : Header Header Navigation Navigation.
Tutorial 6 Creating Fixed-Width Layouts
Basics of Web Design Chapter 6 More CSS Basics Key Concepts 1.
TUTORIAL 4: CREATING PAGE LAYOUT WITH CSS Session 4.3.
Document Layout. Creating Whitespace2 n Horizontal space –Within line of text –Netscape – – –If no room, will shorten the space to fit on current line.
CSS to Know And this is just the beginning. What to What?  Tags = regular HTML  Ids = #id, only one hashtag per page  Class =.class, many as you want.
Web Development & Design Foundations with XHTML Chapter 6 Key Concepts.
Advanced CSS - Page Layout. Advanced CSS  Compound Selectors:  Is a Dreamweaver term, not a CSS term.  Describes more advanced types of selectors such.
ITP 104.  While you can do things like this:  Better to use styles instead:
Tables Learning Web Design: Chapter 8. Overview of Tables Uses for tables How to create a table Using CSS to style a table Nested tables Advanced table.
By Tuyet Le & Madhura Pitale. Seating Chart with CSS3.
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.
Copyright © Terry Felke-Morris WEB DEVELOPMENT & DESIGN FOUNDATIONS WITH HTML5 Chapter 4 Key Concepts 1 Copyright © Terry Felke-Morris.
 Word doc for you to download › Link at the beginning of class › 10 Questions › Answers to be added inline  Post to Sakai when completed › No resubmits.
 Website development process  CSS  Javascript.
CSS - Quiz #4 Lecture Code:
CSS = Cascading Style Sheet CSS consists of rules to display, style and decorate HTML elements Why CSS ? – Separate decoration from HTML markup (Ex :,,…)
COMP213 – Web Interface Design
Tutorial #6 – Creating Fixed Width Layouts. Tutorial #5 Review – Box Model Every html element is surround by a box Content, Padding, Border, Margin Can.
Web sites Design: Cascading Style Sheet (CSS) (Cont’d) Dimensions and Position of Elements –Width and Height Space –Table Cell Padding –Left and Top Position.
Table Tables are defined with the tag. A table is divided into rows with the tag. (tr stands for table row) A row is divided into data cells with the tag.
Unit I Applying Advanced Styling CSS. CSS3 can style many aspects that in the past required integration of images New features are not supported by all.
LEARN THE QUICK AND EASY WAY! VISUAL QUICKSTART GUIDE HTML and CSS 8th Edition Chapter 14: Enhancements and Effects with CSS3.
THE BOX MODEL Putting layouts together with CSS. The Box Model  How would you describe a box?  Container?  Tags or elements are “containers”  puts.
Layout with Styles Castro Chapter 11. Tables vs. CSS You can produce “liquid layouts” (layouts that stretch as the browser is resized) using tables or.
INTRODUCTORY Tutorial 5 Using CSS for Layout and Printing.
CIS234A Lecture 5 Instructor Greg D’Andrea. Font Styles Review Font-Family: generic family, font family Font-Size: em, pt, px, %, mm, cm, in Font-Style:
11/12/2015 Box Model Reed Crouch. 11/12/2015  HTML elements can be considered as boxes. In CSS, the term "box model" is used when referring to layout.
Copyright © Osmosys O S M O S Y SO S M O S Y S D e p l o y i n g E x p e r i e n c e & E x p e r t i s e™ CSS Training.
CONTROLLING Page layout
Tutorial 4 Creating Page Layouts with CSS
CSS - Quiz #3 Lecture Code:
Today’s objectives  Announcements  Positioning  Measurement units.
CIS234A Lecture 6 Instructor Greg D’Andrea. Span and Div The span and div elements are a generic means by which we can add structure to documents. The.
Week 5.  Normal document flow  Affecting document flow with float and position properties using CSS  Using these properties to create layouts.
Understanding CSS Cascading Style Sheets control the presentation of content in HTML pages Style Sheets separate formatting from the content –Styles defined.
PERSPECTIVES: TUTORIAL 4 CREATING PAGE LAYOUTS WITH CSS.
Header, Footer, and Navigation toolbars CIS 136 Building Mobile Apps 1.
CS 120: Introduction to Web Programming Lecture 10: Extra Features and Website Design Part 1 Tarik Booker CS 120 California State University, Los Angeles.
CSCI N241: Fundamentals of Web Design Copyright ©2006  Department of Computer & Information Science Using CSS for Absolute Layouts.
Mimi Opkins.  One of the major benefits of using CSS is that you’re not forced to lay your sites out in tables.  The layout possibilities of CSS give.
Cascading Style Sheets for layout
CSS.
Laying out Elements with CSS
>> Navigation and Layouts in CSS
CS1220 Web Programming Saloni Chacha.
CIIT-Human Computer Interaction-CSC456-Fall-2015-Mr
Advanced CSS BIS1523 – Lecture 20.
Cascading Style Sheets for layout
Putting Things Where We Want Them
CSS part 2 Outro.
Objectives Create a reset style sheet Explore page layout designs
Cascading Style Sheets
Fixed Positioning.
Positioning.
Box model, spacing, borders, backgrounds
Float Property Elements that seem to “float" on the right or left side of either the browser window or another element are often configured using.
Web Development & Design Foundations with H T M L 5
SEEM4570 Tutorial 3: CSS + CSS3.0
Floating and Positioning
Positioning.
Laying out Elements with CSS
CSc 337 Lecture 5: Grid layout.
CGS 3066: Web Programming and Design Fall 2019 CSS Part 2
Presentation transcript:

Today’s Agenda Advanced CSS Techniques Floating Z-index Centering Sliding Doors Fluid Layouts CSS3 Advanced CSS Lab Mini Project #2

Web Design: Basic to Advanced Techniques Fall 2010 Mondays 7-9pm 200 Sutardja-Dai Hall Advanced CSS Techniques

Floating How can we achieve this kind of horizontal layout? (divs usually stack vertically)

Floating Floating an an element takes it out of the flow of the document and pushes it left or right CSS property float Values: right or left

Floating If you float three elements in the same direction, they will stack

Floating But, if there isn’t enough room:

Floating Important properties: Floated elements should have a specified width Floating removes the element from the flow of the layout Other elements have no idea its there (except for text) float: left;

Clearing Floats CSS property clear Set this property on the element BELOW Values: left, right: push the element down below any left/right floated elements both: push element down below any floated elements clear: left; float: left;

Z-index

Z-Index Property to specify which elements “go on top” z-index: [integer value]; z-index: 15;

Centering Centering text in a div text-align: center; Horizontally centering a div margin: auto; Vertically centering text in a div line-height: [same height as div]; hello

Background Position Specify where you want the background positioned background-position: [horizontal] [vertical]; Left/right, top/bottom, center Using percentages 50% 50% Using pixel values 10px 5px

Sliding Doors Last week: Dynamic width buttons

Sliding Doors Another technique to create dynamic width buttons Think of sliding doors that slide out to cover more space

Sliding Doors Left background image on the left element Right background image on the right element Background positioned on the top right

Fluid Layouts Layouts expand/contract fluidly with the size of the browser Percentage widths instead of using fixed pixel widths width: 100%; Fluid Layouts vs. Fixed Layouts More control over fixed layouts Fluid layouts more user-friendly because it fits the user’s screen better

CSS3 Cool effects now EASY with CSS3 Gradients Drop shadows Rounded corners Multi column layouts Media queries Transforms/Animations

CSS3 Gradients -moz-linear-gradient( [ ||,]?, [, ]* ) -webkit-gradient(, [, ]?, [, ]? [, ]*) Resources:

CSS3 Drop Shadows Box-shadows -moz-box-shadow: [horizontal] [vertical] [blur] [color]; -webkit-box-shadow: [horizontal] [vertical] [blur] [color]; Text-shadows text-shadow: [horizontal] [vertical] [blur] [color];

CSS3 Rounded Corners Border-radius property -moz-border-radius: 5px; -webkit-border-radius: 5px; border-radius: 5px; Degrades gracefully Rounded corners just don’t show up in browsers that don’t support it