Web Design & Development

Slides:



Advertisements
Similar presentations
HTML and CSS. HTML Hyper Text Markup Language Tells browser how to display text and images.
Advertisements

1 Cascading Style Sheets Continued Different kinds of selectors in a style sheet –Simple- Pseudo-Class –Contextual- Pseudo-Element –Class Image Styles.
Chapter 7 Page Layout Basics Key Concepts Copyright © 2013 Terry Ann Morris, Ed.D 1.
Very quick intro HTML and CSS. Sample html A Web Title.
Part 5 Introduction to CSS. CSS Display - Block and Inline Elements A block element is an element that takes up the full width available, and has a line.
Advance CSS (Menu and Layout) Miftahul Huda. CSS Navigation MENU It's truly remarkable what can be achieved through CSS, especially with navigation menus.
Diliev.com & pLOVEdiv.com  DIliev.com.
Class four: the box model and positioning. is an HTML tag which allows you to create an element out of inline text. It doesn’t mean anything! try it:
Unit 20 - Client Side Customisation of Web Pages
CGS 3175: Internet Applications (CSS – Page Layout) Page 1 © Mark Llewellyn CGS 3175: Internet Applications Fall 2008 Cascading Style Sheets – Page Layout.
CSS provides a way to stray away from the traditional methods of using tables to lay out pages. Success with this technique depends on understanding of.
Technologies for web publishing Ing. Václav Freylich Lecture 6.
WEB DESIGN Multimedia and Web. Today’s Objectives  Quick review selector types  Layout and positioning.
External style rules for HTML Organization web sites can share a style sheet Layout of pages using positioning Absolute & Relative Positioning Cascading.
External Style rules for HTML Standardize organization web sites Page Layout using positioning Absolute & Relative Positioning of Elements Cascading Style.
Web Development & Design Foundations with XHTML Chapter 6 Key Concepts.
Web Development & Design Foundations with XHTML Chapter 6 Key Concepts.
ITP 104.  While you can do things like this:  Better to use styles instead:
MCS 270 Cascading Style Sheets (CSS) Gustavus Adolphus College.
CSS Netcentric. What is CSS O CSS stands for Cascading Style Sheets O Styles define how to display HTML elements O Styles were added to HTML 4.0 to solve.
 This presentation introduces the following: › 3 types of CSS › CSS syntax › CSS comments › CSS and color › The box model.
FTS: The Perils and Promise of Computing Cascading Style Sheets (CSS) Gustavus Adolphus College Fall 2012.
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.
Part 4 Introduction to CSS. CSS Table Table Borders table, td, th { border:1px solid black; } Firstname Lastname Bader Ali Paul Manuel The example below.
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.
Today’s objectives Layouts | floats Measurement units Type properties
Web Development & Design Foundations with XHTML Chapter 6 Key Concepts.
CONTROLLING Page layout
Positioning Elements CHAPTER 3 1 CHARLES WYKE-SMITH: STYLIN’ WITH CSS: A DESIGNER’S GUIDE (3 ND EDITION)
CS134 Web Design & Development Web Page Layout Mehmud Abliz.
Week 5.  Normal document flow  Affecting document flow with float and position properties using CSS  Using these properties to create layouts.
Simple Website Layout Tutorial Using HTML 5 and CSS 3 Ref: layout-tutorial-html-5-css-3/
Web Page Layout. table vs. div table –Pros: supported by all browsers –Cons: bind style to content; hard to maintain div –Pros: easy to maintain –Cons:
Cascading Styles Sheets Positioning HTML elements.
Laying out Elements with CSS
CSS Box Model.
Web Development & Design Foundations with XHTML
Google fonts CSS box model
Advanced CSS & CSS3.
Creating Your Book Review Web Site
Box model.
Cascading Style Sheets (Layout)
CS3220 Web and Internet Programming Page Layout with CSS
CS3220 Web and Internet Programming Page Layout with CSS
Chapter 7 Page Layout Basics Key Concepts
Cascading Style Sheets
COMP 101 Review.
Chapter 6 More CSS Basics Key Concepts
Creating Layouts Using CSS
Fixed Positioning.
HTML5 Session III Chapter 5 - How to Use the CSS Box Model for Spacing, Borders, and Backgrounds Chapter 6 - How to use CSS for page.
CSS Box Model.
Positioning.
MORE Cascading Style Sheets (The Positioning Model)
DynamicHTML Cascading Style Sheet Internet Technology.
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.
Grids, Floats & Flex Boxes
Book / movie report Web design.
DynamicHTML Cascading Style Sheet Internet Technology.
How to use the CSS box model for spacing, borders, and backgrounds
CS3220 Web and Internet Programming Page Layout with CSS
Web Development & Design Foundations with XHTML
CSS and Class Tools.
Positioning.
Laying out Elements with CSS
Advanced CSS.
CSS Box Model.
CSS Box Model.
Cascading Style Sheets
Cascading Style Sheets
Presentation transcript:

Web Design & Development Web Page Layout

We recommend – div, reasons: table vs. div table Pros: supported by all browsers Cons: bind style to content; hard to maintain div Pros: easy to maintain Cons: not supported by all browsers We recommend – div, reasons: CSS is to separate structure from content. Supporting most common/popular browsers are enough. May be it’s time for some people to upgrade their browsers.

Variable width content: Common Layouts Variable width content: 2 columns - left menu 2 columns - right menu 3 columns Centered (fixed width content): 2 columns 4 columns (fluid/variable width) Many other …

2 columns - left menu

2 columns - left menu #Header { margin:50px 0px 10px 0px; padding:17px 0px 0px 20px; border:1px dashed #999; background-color:#eee; } #Content { margin:0px 50px 50px 200px; padding:10px; background-color: #eee; #Menu { position:absolute; top:100px; left:20px; width:150px;

2 columns – centered, static width

2 columns – centered, static width body { margin:0px; padding:0px; text-align: center; } #Wrapper { width:700px; margin-right:auto; margin-left:auto; border:1px dashed #999; #Header { background: #eee;

2 columns – centered, static width #Menu { float:right; width:200px; background: #eee; } #Content { float:left; width:500px; background: #666; #Footer { clear: both;

2 columns - right menu

2 columns - right menu #Header { margin:50px 0px 10px 0px; padding:17px 0px 0px 20px; border:1px dashed #999; background-color:#eee; } #Content { margin:0px 200px 50px 50px; padding:10px; background-color: #eee; #Menu { position:absolute; top:100px; right:20px; width:150px;

3 columns - flanking menu

3 columns - flanking menu .content { position:relative; width:auto; min-width:120px; margin:0px 210px 20px 170px; border:1px solid black; padding:10px; z-index:3; /* This allows the content to overlap the right menu in narrow windows in good browsers. */ } #navAlpha { position:absolute; width:128px; top:20px; left:20px; border:1px dashed black; background-color:#eee; z-index:2;

3 columns - flanking menu #navBeta { position:absolute; width:168px; top:20px; right:20px; border:1px dashed black; background-color:#eee; padding:10px; z-index:1; }

z-index (or stack level) z-index: auto | <integer> | inherit Z-axis positions are particularly relevant when boxes overlap visually. In addition to their horizontal and vertical positions, boxes lie along a "z-axis" and are formatted one on top of the other. Boxes with higher z-index stacked on top of the boxes with lower z-index. Boxes with the z-index are stacked back-to-front according to document tree order.

3 columns – centered, static width

3 columns – centered, static width body { text-align:center; margin:0px; padding:0px; font:12px verdana, arial, helvetica, sans-serif; } #frame { width:750px; margin-right:auto; margin-left:auto; margin-top:10px; text-align:left; border:1px dashed #999; background-color: yellow; #topcontent { background-color: #eee;

3 columns – centered, static width #centercontent { float:left; width:400px; background-color: green; } #leftcontent { width:175px; background-color: red; #rightcontent { #bottomcontent { background-color:#eee; text-align:center;

4 columns - variable width

4 columns - variable width #topcontent { background-color: yellow; } #leftcontent { position: absolute; left:1%; width:20%; top:50px; background:#fff; #centerleft { left:22%; width:28%;

4 columns - variable width #centerright { position: absolute; left:51%; width:28%; top:50px; background:#fff; } #rightcontent { left:80%; width:19%;