CSS for Page Layout. Key Concepts

Similar documents
Chapter 7 Page Layout Basics Key Concepts. Copyright 2013 Terry Ann Morris, Ed.D

CST 150 Web Design I CSS Review - In-Class Lab

Web layout guidelines for daughter sites of Scotland s Environment

Web Design Basics. Cindy Royal, Ph.D. Associate Professor Texas State University

Development Perspective: DIV and CSS HTML layout. Web Design. Lesson 2. Development Perspective: DIV/CSS

{color:blue; font-size: 12px;}

Web Design I. Spring 2009 Kevin Cole Gallaudet University

Coding Standards for Web Development

Dreamweaver CS4 Day 2 Creating a Website using Div Tags, CSS, and Templates

How To Create A Web Page On A Windows (For Free) With A Notepad) On A Macintosh (For A Freebie) Or Macintosh Web Browser (For Cheap) On Your Computer Or Macbook (

Style & Layout in the web: CSS and Bootstrap

JJY s Joomla 1.5 Template Design Tutorial:

Kentico CMS, 2011 Kentico Software. Contents. Mobile Development using Kentico CMS 6 2 Exploring the Mobile Environment 1

Using Style Sheets for Consistency

Web Design and Databases WD: Class 7: HTML and CSS Part 3

CREATING HORIZONTAL NAVIGATION BAR USING ADOBE DREAMWEAVER CS5

Basics of HTML (some repetition) Cascading Style Sheets (some repetition) Web Design

CSS. CSS - cascading style sheets CSS - permite separar num documento HTML o conteúdo do estilo. ADI css 1/28

HTML CSS Basic Structure. HTML Structure [Source Code] CSS Structure [Cascading Styles] DIV or ID Tags and Classes. The BOX MODEL

Web Design with CSS and CSS3. Dr. Jan Stelovsky

Microsoft Expression Web Quickstart Guide

Essential HTML & CSS for WordPress. Mark Raymond Luminys, Inc mraymond@luminys.com

CHAPTER 10. When you complete this chapter, you will be able to:

How to Properly Compose HTML Code : 1

Outline of CSS: Cascading Style Sheets

Introduction to Adobe Dreamweaver CC

Mobile Web Site Style Guide

Web Design and Development ACS Chapter 9. Page Structure

MCH Strategic Data Best Practices Review

Web Building Blocks. Joseph Gilbert User Experience Web Developer University of Virginia Library

Chapter 8 More on Links, Layout, and Mobile Key Concepts. Copyright 2013 Terry Ann Morris, Ed.D

Last week we talked about creating your own tags: div tags and span tags. A div tag goes around other tags, e.g.,:

8 STEPS TO CODE KILLER RESPONSIVE S

RESPONSIVE DESIGN FOR MOBILE RENDERING

What is CSS? Official W3C standard for controlling presentation Style sheets rely on underlying markup structure

CSS 101. CSS CODE The code in a style sheet is made up of rules of the following types

Principles of Web Design 6 th Edition. Chapter 12 Responsive Web Design

Contents. Downloading the Data Files Centering Page Elements... 6

Responsive Web Design for Teachers. Exercise: Building a Responsive Page with the Fluid Grid Layout Feature

HTML5 and CSS3 Part 1: Using HTML and CSS to Create a Website Layout

CREATING A NEWSLETTER IN ADOBE DREAMWEAVER CS5 (step-by-step directions)

Fast track to HTML & CSS 101 (Web Design)

Building a Horizontal Menu in Dreamweaver CS3 Using Spry R. Berdan

Positioning Container Elements

Designing HTML s for Use in the Advanced Editor

CREATING RESPONSIVE UI FOR WEB STORE USING CSS

Further web design: Cascading Style Sheets Practical workbook

Create Your own Company s Design Theme

GUIDE TO CODE KILLER RESPONSIVE S

Basic tutorial for Dreamweaver CS5

ICE: HTML, CSS, and Validation

BASICS OF WEB DESIGN CHAPTER 2 HTML BASICS KEY CONCEPTS COPYRIGHT 2013 TERRY ANN MORRIS, ED.D

WHITEPAPER. Skinning Guide. Let s chat Velaro info@velaro.com by Velaro

Scoop Hosted Websites. USER MANUAL PART 4: Advanced Features. Phone: scoop@scoopdigital.com.au Website: scoopdigital.com.

Base template development guide

Magento Responsive Theme Design

Responsive Design

The Essential Guide to HTML Design

Web Authoring CSS. Module Descriptor

HTML TIPS FOR DESIGNING

Responsive Web Design Creative License

Cascading Style Sheets (CSS)

ITNP43: HTML Lecture 4

CSS - Cascading Style Sheets

Advanced Editor User s Guide

Course Information Course Number: IWT 1229 Course Name: Web Development and Design Foundation

Selectors in Action LESSON 3

RESPONSIVE DESIGN BY COMMUNIGATOR

Skills and Topics for KidCoder: Beginning Web Design

Web Development I & II*

Campaign Guidelines and Best Practices

Contents. Introduction Downloading the Data Files... 2

Website Login Integration

Creating a Resume Webpage with

Simply download Beepip from and run the file when it arrives at your computer.

Designing portal site structure and page layout using IBM Rational Application Developer V7 Part of a series on portal and portlet development

Web Design for Programmers. Brian Hogan NAPCS Slides and content 2008 Brian P. Hogan Do not reproduce in any form without permission

Cascading Style Sheet (CSS) Tutorial Using Notepad. Step by step instructions with full color screen shots

The Essential Guide to HTML Design

Web Design & Development - Tutorial 04

How to craft a modern, mobile-optimized HTML template. Jason Samuels, NCFR IT Manager DrupalCamp Twin Cities May 2012

SellerDeck 2014 Responsive Design Guide

Using Adobe Dreamweaver CS4 (10.0)

Dreamweaver CS5. Module 1: Website Development

Garfield Public Schools Fine & Practical Arts Curriculum Web Design

WEB DEVELOPMENT IA & IB (893 & 894)

Web publishing: An introduction to CSS

Treble: One Page Website. Step 8 - Responsive Web Design

Coding HTML Tips, Tricks and Best Practices

Creator Coding Guidelines Toolbox

<Insert Picture Here>

Transcription:

CSS for Page Layout Key Concepts

CSS Page Layout Advantages Greater typography control Style is separate from structure Potentially smaller documents Easier site maintenance Increased page layout control Increased accessibility Ability to define styles for multiple media types Support of the Semantic Web 2

CSS Page Layout Disadvantages There still remain issues with the lack of uniform browser support of CSS If you are already adept at designing page layout using XHTML tables, your productivity will temporarily drop as you learn to configure page layout with CSS. 3

Content Text & web page elements in the container Padding Area between the content and the border Border Between the padding and the margin Margin Determines the empty space between the element and adjacent elements The Box Model 4

Normal Flow Browser display of elements in the order they are coded in the Web page document Figure 6.5 Figure 6.6

Relative Positioning h1 { background-color:#cccccc; padding:5px; color: #000000; } #mycontent { position: relative; left:30px; font-family:arial,sans-serif; } Changes the location of an element in relation to where it would otherwise appear 6

Precisely specifies the location of an element in the browser window Absolute Positioning h1 { background-color:#cccccc; padding:5px; color: #000000; } #content {position: absolute; left:200; top:100; font-family:arial,sans-serif; width:300; } 7

Absolute Positioning Example

float Property h1 { background-color:#cccccc; padding:5px; color: #000000; } p { font-family:arial,sans-serif; } #yls {float:right; margin: 0 0 5px 5px; border: solid; } Elements that seem to float" on the right or left side of either the browser window or another element are often configured using the float property. 9

The h2 text is displayed in normal flow. clear Property Useful to clear or terminate a float Values are left, right, and both clear: left; was applied to the h2. Now the h2 text displays AFTER the floated image.

The background does not extend as far as you d expect. overflow Property Intended to configure the display of elements on a Web page. However, it is useful to clear or terminate a float before the end of a container element Values are auto, hidden, and scroll overflow: auto; was applied to the div that contains the image and paragraph. Now the background extends and the h2 text displays AFTER the floated image.

Display Property Configures how and if an element is displayed display:none ; The element will not be displayed. display:block ; The element is rendered as a block element even if it is actually an inline element, such as a hyperlink. display:inline; The element will be rendered as an inline element even if it is actually a block element such as a <li>. You ll work with the display property in Hands-On Practice 6.6 and in Chapter 7. 12

Z-Index Property Modifies the stacking order of elements on a Web page. default z-index value is 0 Elements with higher z-index values will appear stacked on top of elements with lower z- index values rendered on the same area of the page. 13

CSS Page Layout Example Except for imagelogo, all elements on this page follow normal flow

Two Column Page Layout wrapper contains the two columns sets default background color Left-column navigation float: left; width:100px; Right-column content margin-left: 100px; floatright (flower photo) float: right; 15

body {margin: 0; font-family: Verdana, Arial, sans-serif; } #wrapper { background-color :#e8b9e8; color: #000066; width: 100%; min-width :800px; } #leftcolumn { float: left; width: 100px; } #rightcolumn { margin-left :100px; background-color :#ffffff; color :#000000; } #logo { background-color :#eeeeee; color: #cc66cc; font-size :x-large; border-bottom: 1px solid #000000; padding: 10px; }.content {padding :20px 20px 0 20px; } #floatright {margin :10px; float: right; } #footer {font-size: xx-small; text-align: center; clear: right; padding-bottom: 20px; } div#leftcolumn a { text-decoration :none; Two Column Page Layout margin: 15px; display :block; } 16

Deciding to Configure a class or id Configure a class: If the style may apply to more than one element on a page Use the. (dot) notation in the style sheet. Use the class attribute in the XHTML. Configure an id: If the style is specific to only one element on a page Use the # notation in the style sheet. Use the id attribute in the XHTML. 17

Choosing a Name for a class or an id A class or id name should be descriptive of the purpose: such as nav, news, footer, etc. Bad choice for a name: redtext, bolded, blueborder, etc. The the 10 most commonly used class names are: footer, menu, title, small, text, content, header, nav, copyright, and button Source: http://code.google.com/webstats 18

CSS Debugging Tips Manually check syntax errors Use W3C CSS Validator to check syntax errors http://jigsaw.w3.org/css-validator/ Configure temporary background colors Configure temporary borders Use CSS comments to find the unexpected /* the browser ignores this code */ Don t expect your pages to look exactly the same in all browsers! Be patient! 19

CSS Page Layout Resources For additional study: http://glish.com/css/ Large collection of CSS page layouts and links to tutorials http://www.websitetips.com/css/index.shtml Comprehensive list of tutorials and CSS-related sites http://www.meyerweb.com/eric/css/ The web site of Eric Meyer, a leading-edge web developer http://www.w3.org/style/css/learning W3C s list of CSS resources http://www.bluerobot.com/web/layouts/ A reservoir of CSS page layouts http://www.blooberry.com/indexdot/css/ CSS syntax reference list 20