Using CSS for Page Layout. Types of HTML Elements Block-Level Element –Creates blocks of content e.g. div, h1..h6, p, ul, ol, li, table, form –They start.

Slides:



Advertisements
Similar presentations
Copenhagen, 6 December 2004 Modern CSS Principles Miruna Bădescu Finsiel Romania.
Advertisements

Week 10 Creating Positioned Layouts
15 LAYOUT Controlling the position of elements Creating site layouts Designing for different sized screens.
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.
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.
Today CSS HTML A project.
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.
With CSS, a color is most often specified by: a HEX value - like "#ff0000" an RGB value - like "rgb(255,0,0)" a color name - like "red“ Example h1.
CIS 1310 – HTML & CSS 6 Layout. CIS 1310 – HTML & CSS Learning Outcomes  Describe & Apply the CSS Box Model  Configure Float with CSS  Designate Positioning.
Tutorial 6 Creating Fixed-Width Layouts
CS4370/6370 Web Development Cascading Style Sheets (CSS)
Web Design & Development Cascading Style Sheets (CSS)
CS134 Web Design & Development Cascading Style Sheets (CSS) Mehmud Abliz.
XP 1 Working with Cascading Style Sheets Creating a Style for Online Scrapbooks Tutorial 7.
MORE Cascading Style Sheets (The Positioning Model)
CM143 Week 4 Introducing CSS. Cascading Style Sheets A definition for the style in which an element of the webpage will be displayed Border width, colour,
CSS (Cascading Style Sheets): How the web is styled Create Rules that specify how the content of an HTML Element should appear. CSS controls how your web.
Svetlin Nakov Telerik Web Design Course html5course.telerik.com Manager Technical Training
TECH2018 Multimedia and the Internet More about CSS and Page Layouts.
Working with Cascading Style Sheets. Introducing Cascading Style Sheets Style sheets are files or forms that describe the layout and appearance of a document.
Cascading Style Sheet Basics Pepper. Looking at the HTML See the surrounding tags See head, body, paragraph, header See the ending tags See the list.
LING 408/508: Programming for Linguists
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.
Cascading Style Sheets CSS. CSS Positioning Normal Flow Top -> bottom | left -> right Arranged in the order they appear in the code make room for one.
Cascading Style Sheets CSS. div … Used like a container to group content Gives context to the elements in the grouping Give it a descriptive name with.
Cascading Style Sheets. Defines the presentation of one or more web pages Similar to a template Can control the appearance of an entire web site giving.
Copyright © Terry Felke-Morris CSS Flow & Positioning 1 Copyright © Terry Felke-Morris.
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.
Neal Stublen Course Road Map  Create web page layouts using CSS  Manage CSS  Test website validity  Create navigation menus using.
Lecture 2 - HTML and CSS Review SFDV3011 – Advanced Web Development 1.
DIV, Span, CSS.
Course created by Sarah Phillips BBCD Melbourne BAPDCOM Version 1 – April 2013.
LING 408/508: Programming for Linguists Lecture 10 September 30 th.
Cascading Style Sheets (CSS) Part II IT210: Web-based IT.
Web Technologies Beginning Cascading Style Sheets (CSS) 1Copyright © Texas Education Agency, All rights reserved.
CSS Positioning & Layout Creating layouts and controlling elements.
MTA EXAM HTML5 Application Development Fundamentals.
CSS: Cascading Style Sheets Part II. Style Syntax.
IN THE DOCUMENT OBJECT MODEL, EACH LINE OF HTML IS AN ELEMENT (AN OBJECT), ABLE TO HAVE ATTRIBUTES, PROPERTIES AND VALUES. CSS TELLS THE BROWSER HOW TO.
- WE’LL LOOK AT THE POSITION PROPERTY AND HOW CSS RESOLVES CONFLICTS BETWEEN STYLING INSTRUCTIONS The position property; CSS specificity hierarchy.
Today’s objectives  Announcements  Positioning  Measurement units.
THE NORMAL DOCUMENT FLOW from Quick Tip: Utilizing Normal Document Flow by Alex Rodrigues on Web tuts.
Elements & Attributes. There are different types of elements, but the 2 most important ones are BLOCK and INLINE. Block elements flow from top to bottom.
CHAPTER 15 Floating and Positioning. FLOAT VS. POSITION  Floating an element moves it to the left or right, allowing the following text to wrap around.
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.
WebD Introduction to CSS By Manik Rastogi.
Cascading Style Sheets Layout
Semester - Review.
CSS Layouts: Grouping Elements
Unit 3 - Review.
Webpage layout using CSS
Cao Yuewen SEEM4570 Tutorial 03: CSS Cao Yuewen
Floating & Positioning
The Internet 10/25/11 XHTML Tables
CSS Applications to XML 19-Sep-18.
IS333: MULTI-TIER APPLICATION DEVELOPMENT
Styles and the Box Model
MORE Cascading Style Sheets (The Positioning Model)
DynamicHTML Cascading Style Sheet Internet Technology.
Cascading Style Sheets™ (CSS)
DynamicHTML Cascading Style Sheet Internet Technology.
More CSS 22-Feb-19.
Floating and Positioning
The Internet 10/20/11 CSS Layout
CSS Applications to XML 20-May-19.
CSc 337 Lecture 5: Grid layout.
Cascading Style Sheets
CSS Applications to XML 3-Jul-19.
Positioning Boxes Using CSS
Presentation transcript:

Using CSS for Page Layout

Types of HTML Elements Block-Level Element –Creates blocks of content e.g. div, h1..h6, p, ul, ol, li, table, form –They start a new line when you use them –Can contain other blocks, inline elements, text, or data Inline Element –Define text or data e.g. span, a, img, br –They do not start a new line –Usually contain other inline tags, text, or data Non-display elements –Tags that aren’t meant to be displayed (e.g. head & style tags)

Div Tag The div tag groups block-elements in your HTML file You can apply styles using CSS to the elements between the opening and closing div tags

Span Tag The span tag groups inline-elements in your HTML file You can apply styles using CSS to the elements between the opening and closing span tags

Div Versus Span Since span groups inline-elements, only use span when using inline styles You should use div tags with class or id attributes and external styles sheets

Layout with Div and CSS Within HTML you can define different area of your page with div tags With a stylesheet you can control various properties of these divisions Some properties are: –Background –Size –Position –Float

Background Property The background of each division can be modified individually

Size Properties You can control the size of a division with the width and height properties The possible values are: –Auto (browser calculates) –xxx% (xxx is a value from 0-100) –Length (in px, cm, etc…)

Position Property ValueDescription StaticDefault. An element with position: static always has the position the normal flow of the page gives it (a static element ignores any top, bottom, left, or right declarations) RelativeAn element with position: relative moves an element relative to its normal position, so "left:20" adds 20 pixels to the element's LEFT position AbsoluteAn element with position: absolute is positioned at the specified coordinates relative to its containing block. The element's position is specified with the "left", "top", "right", and "bottom" properties FixedAn element with position: fixed is positioned at the specified coordinates relative to the browser window. The element's position is specified with the "left", "top", "right", and "bottom" properties. The element remains at that position regardless of scrolling. Works in IE7 (strict mode)

Float Property This property will allow you to set how a division with “float” next to another division Values are: –Left –Right –None