Tutorial 4: Creating page layout with css

Slides:



Advertisements
Similar presentations
Cascading Style Sheets Color and Background Controls Border and Margin Controls (Boxes)
Advertisements

9-May-15 More CSS. 2 A different emphasis CSS is the same for XML as it is for HTML and XHTML, but-- XML contains no display information If you want your.
Today’s objectives Site performance Padding, Margins, Borders
Week 9 Using the Box Properties. 9-2 The CSS Visual Formatting Model Describes how the element content boxes should be displayed by the browser –Based.
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.
Tutorial 5 Working with the Box Model. XP Objectives Understand the box model Create padding, margins, and borders Wrap text around an image Float a block-level.
CSS: Class 1 Background Images, Controlling Position of Background Images, Add Padding to Page Elements, Add Borders to Elements on a Page.
 2003 Prentice Hall, Inc. All rights reserved. Chapter 6 - Cascading Style Sheets™ (CSS) Outline 6.1 Introduction 6.2 Inline Styles 6.3 Embedded Style.
CSS. What does it stand for? Cascading Style Sheets.
Basics of Web Design Chapter 6 More CSS Basics Key Concepts.
1 Lesson Style Sheets Box Model Content (text,image,table) Margin Padding Border Box.
Basics of Web Design Chapter 6 More CSS Basics Key Concepts 1.
Cascading Style Sheets Part 3 Fall, 2007 Modified by Linda Kenney Nov. 12, 2007.
CSS Box Model margin border padding content 23. Box Model Properties PropertyValid valuesExample border-widththin, medium, thick, numberborder-width:
An Introduction to Cascading Style Sheets CSS Layout, and the CSS Box Model Nick Foxall SM5312 week 9: CSS Layout.
14-Jul-15 CSS Applications to XML. 2 A different emphasis CSS is the same for XML as it is for HTML, but-- HTML already does a pretty good job of layout.
1 CS428 Web Engineering Lecture 10 Images, Tables, Forms, Border-Radius (CSS – V)
Slide 1 of 83 Table Borders To specify table borders in CSS, use the border property. The example below specifies a black border for table, th, and td.
Dreamweaver -- CSS. Dreamweaver -- MX New icons are added in MX Most of the features commonly used in web design, and are same as FrontPage. New feature.
Cascading Style Sheets CSS. CSS - Structure Declaration block Property: identifies what to change Value: how to change it Selector – example h1{ font-size:
Copyright © Terry Felke-Morris WEB DEVELOPMENT & DESIGN FOUNDATIONS WITH HTML5 7 TH EDITION Chapter 6 Key Concepts 1 Copyright © Terry Felke-Morris.
CSS The Definitive Guide Chapter 8.  Allows one to define borders for  paragraphs  headings  divs  anchors  images  and more.
CIS 1315 – Web Development for Educators CIS 1315 HTML Tutorials 3 & 4: Working With CSS.
CSS Border.
Today’s objectives  Assignment 1  Padding, Margins, Borders  Fluid Layout page  Building accessible Table  Element size with padding and border 
INTRODUCTION TO WEB DEVELOPMENT AND HTML Lecture 10: A Deeper Look at CCS- Spring 2011.
COMP213 – Web Interface Design
LITTLE BOXES Controlling size of boxes Box model for borders, margin and padding Displaying and hiding boxes.
Tutorial #6 – Creating Fixed Width Layouts. Tutorial #5 Review – Box Model Every html element is surround by a box Content, Padding, Border, Margin Can.
Chcslonline.org Text –wrapping around Images. chcslonline.org To wrap text around an image, lets set up a style in our style sheet. open a new notepad.
Copyright © Terry Felke-Morris WEB DEVELOPMENT & DESIGN FOUNDATIONS WITH HTML5 7 TH EDITION Chapter 6 Key Concepts 1 Copyright © Terry Felke-Morris.
Cascading Style Sheets Chapters 5-6 Color and Background Controls Border and Margin Controls.
Copyright © Terry Felke-Morris WEB DEVELOPMENT & DESIGN FOUNDATIONS WITH HTML5 Chapter 6 Key Concepts 1 Copyright © Terry Felke-Morris.
Cascading Style Sheets Part 3 Spring, 2008 Modified by Linda Kenney April 21, 2008.
Web Foundations THURSDAY, OCTOBER 3, 2013 LECTURE 6: CSS CONTINUED.
>> The “Box” Model. Pre-requisite Create a new project in Netbeans called Week5 Create a new html file and name it box.html Create a new css file and.
 2004 Prentice Hall, Inc. All rights reserved. Chapter 6 - Cascading Style Sheets™ (CSS) Outline 6.1 Introduction 6.2 Inline Styles 6.3 Embedded Style.
 Cascading Style Sheets (CSS) ◦ Used to specify the presentation of elements separately from the structure of the document.  Inline style ◦ declare.
1 CS428 Web Engineering Lecture 08 Border, Margin, Padding … (CSS - III)
CSS Layout Cascading Style Sheets. Lesson Overview  In this lesson, you will learn:  CSS Box Model  CSS properties for border  CSS properties for.
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.
3.2 Cascading Style Sheets. 2 Positioning Elements Normally, elements are laid out on the page in the order that they are defined in the XHTML document.
Table Styling. Using CSS to Style Tables: So far, our table styling - such has "width" and "border" - has not used CSS. CSS provides us with many tools.
Extra-simplified.  Only truly happen when the CSS and HTML are defined as separate files (external style sheet) Introduction The main idea of CSS is.
Tutorial 4 Creating Page Layouts with CSS
Department of Computer Science, Florida State University CGS 3066: Web Programming and Design Spring 2016 CSS Positioning 1.
Doncho Minkov Telerik School Academy schoolacademy.telerik.com Technical Trainer
HTML and Dreamweaver November 11th. Agenda Box Model Displaying and positioning elements – Padding – Margin – Float – Display – Position HTML Demo.
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.
CSS Box Model. What is the Box Model? Each XHTML element appearing on our page takes up a "box" or "container" of space. Each box size is affected not.
End User Computing Applied CSS: Building our course homepage Sujana Jyothi Department of Computer Science
CIS 228 The Internet 10/18/11 Grouping XHTML. CSS Selectors Rule: selector-group { property-declaration* } Selector-group: selector *, Selector: simple-selector.
Tutorial #5 Working with the Box Model. Tutorial #4 Review - CSS Create a homework page Final Project Discussion Exam on Blackboard Styling Lists (List-style-type,
Chapter 7.  Change body and link styles  Create a drop-down menu  Change color and font styles in the menu  Create a pop-up effect using CSS  Utilize.
CS 120: Introduction to Web Programming Lecture 10: Extra Features and Website Design Part 1 Tarik Booker CS 120 California State University, Los Angeles.
Unit 3 - Review. Topics 1. Tag, Attribute, Value 2. CSS Rule Syntax + link 3. Categories of Selectors 4. Inline vs Block Tags 5. CSS Layout 6. CSS Box.
CSS. What does it stand for? ___________________.
CSS. What does it stand for? Cascading Style Sheet.
Cascading Style Sheets Boxes
Table Styling.
Table Styling.
Table Styling.
>> The “Box” Model
Cascading Style Sheets
CSS Borders and Margins.
HTML5 Level I Session III
HTML5 Level I Session III
More CSS Page layout Boriana Koleva Room: C54
CSS Boxes CS 1150 Fall 2016.
ITI 133: HTML5 Desktop and Mobile Level I
Presentation transcript:

Tutorial 4: Creating page layout with css Session 4.1

Objectives Setting Margin in the Box Model Setting Padding in the Box Model Working with Borders Creating Rounded Corners Adding an Outline

The CSS Box Model

Setting Margin in the Box Model To set the margin space around an element, use margin: length; where length is the size of the margin using one of the CSS units of measure To set a margin or padding for one side of the box model only, specify the direction (top, bottom, left, or right). margin-top: length; margin-bottom: length; margin-left: length; margin-right: length;

Setting Margin in the Box Model To set multiple margin spaces, specify the values in a space-separated list starting from the top and moving clockwise around the element. For example, the style margin: top right bottom left;

Setting Padding in the Box Model To set the padding space inside an element, use padding: length; where length is the size of the padding using one of the CSS units of measure To set padding for one side of the box model only, specify the direction (top, bottom, left, or right). padding-top: length; padding-bottom: length; padding-left: length; padding-right: length;

Setting Padding in the Box Model To set multiple padding spaces, specify the values in a space-separated list starting from the top and moving clockwise around the element. For example, the style padding: top right bottom left;

Practice - Margin and Padding For the default style: Set the margin space to 0 pixel Set the padding space to 0 pixel For the style rule of the header element, add a 500-pixel padding space to the bottom of the element. For list items within the horizontal navigation list, set the upper and lower padding space to 5 pixels. If the list item of the vertical navigation list belongs to the newgroup class, add a top padding space of 25 pixels to add a bigger gap between that list and the previous list item. Add the following styles to the main section of the page: Set the size of the left margin to 21% Set the size of the top margin to 20 pixels

Working with Borders To set the border width, use the property border-width: width; where width is the thickness of the border using one of the CSS units of measure. To set the border color, use border-color: color; where color is a color name or value.

Working with Borders To set the border design, use border-style: style; where style is none, solid, dashed, dotted, double, outset, inset, groove, or ridge

Working with Borders To set all of the border options in one style, use the following: border: width color style;

Creating Rounded Corners Rounded corners can be applied to any of the four corners of a block element using the styles border-top-left-radius: radius; border-top-right-radius: radius; border-bottom-right-radius: radius; border-bottom-left-radius: radius; border-radius: top-left top-right bottom-right bottom-left;

Creating Rounded Corners

Creating Rounded Corners

Practice – Borders and Rounded Corners For the aside element, create a style to: Add a 3-pixel solid border with the color value (149, 91, 42) and set the text color to the value (149, 91, 42) Add a rounded border with a radius of 30 pixels. For the inline images within the figure box: Set the margin to 10 pixels Add rounded corner with a radius of 10 pixels

Adding an Outline To add an outline around an element, use the style property outline: width color style; where width, color, and style are the outline width, outline color, and outline style, respectively

Adding an Outline

Practice - An Outline For the hover of every hypertext link within the vertical navigation list, add a 2-pixel solid outline with the color value (215, 181, 151).