Cascading Style Sheets

Slides:



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

Week 10 Creating Positioned Layouts
15 LAYOUT Controlling the position of elements Creating site layouts Designing for different sized screens.
Web Pages Week 10 This week: CSS Next week: CSS – Part 2.
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.
Chapter 7 Page Layout Basics Key Concepts Copyright © 2013 Terry Ann Morris, Ed.D 1.
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.
Cascading Style Sheets By: Valerie Kuna. What are Cascading Style Sheets? Cascading Style Sheets (CSS) are a standard for specifying the presentation.
Session 4: CSS Positioning Fall 2006 LIS Web Team.
Advance CSS (Menu and Layout) Miftahul Huda. CSS Navigation MENU It's truly remarkable what can be achieved through CSS, especially with navigation menus.
WEB DESIGN Multimedia and Web. Today’s Objectives  Quick review selector types  Layout and positioning.
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.
Web-based Application Development Lecture 9 February 7, 2006 Anita Raja.
Lecture Cascading Style Sheets (CSS) Internal Style Sheets Classes.
MORE Cascading Style Sheets (The Positioning Model)
4.01 Cascading Style Sheets
Chapter 6 Working with Frames.
TUTORIAL 8: Enhancing a Web Site with Advanced CSS
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.
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.
CSCE 102 – Chapter 6 (Web Design and Layout) CSCE General Applications Programming Benito Mendoza Benito Mendoza 1 By Benito Mendoza.
Lecture 2 - HTML and CSS Review SFDV3011 – Advanced Web Development 1.
INTRODUCTORY Tutorial 5 Using CSS for Layout and Printing.
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.
Web Design (12) CSS Introduction. Cascading Style Sheets - Defined CSS is the W3C standard for defining the presentation of documents written in HTML.
Web Technologies Beginning Cascading Style Sheets (CSS) 1Copyright © Texas Education Agency, All rights reserved.
CIT 256 CSS Intro & Dreamweaver Built-in Layouts Dr. Beryl Hoffman.
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.
Styles for webpages. Multi-column layout #navcol {position: absolute; top: 5px; left: 5px; width:260px; background-color: black; border:none; z-Index:0}
5 th ed: Chapter 4 4 th ed: Chapter 5 SY306 Web and Databases for Cyber Operations SlideSet #5: Advanced CSS.
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.
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.
Creating Web Documents CSS examples (do more later) Lab/Homework: Read chapters 15 & 16. Work on Project 3, do postings.
WebD Introduction to CSS By Manik Rastogi.
Laying out Elements with CSS
Cascading Style Sheets Layout
4.01 Cascading Style Sheets
CSS Layouts: Positioning and Navbars
The Box Model in CSS Web Design – Sec 4-8
CSS Layouts: Grouping Elements
Webpage layout using CSS
Cascading Style Sheets
Cao Yuewen SEEM4570 Tutorial 03: CSS Cao Yuewen
>> The “Box” Model
Floating & Positioning
Programming the Web using XHTML and JavaScript
>> CSS Layouts.
IS333: MULTI-TIER APPLICATION DEVELOPMENT
Styles and the Box Model
Positioning.
MORE Cascading Style Sheets (The Positioning Model)
Cascading Style Sheets
DynamicHTML Cascading Style Sheet Internet Technology.
HTML – Organizing Page Content
Web Programming Language
DynamicHTML Cascading Style Sheet Internet Technology.
SEEM4570 Tutorial 3: CSS + CSS3.0
Floating and Positioning
Web Page Layout Imran Rashid CTO at ManiWeber Technologies.
Positioning.
Laying out Elements with CSS
4.01 Cascading Style Sheets
The div Element and CSS for layout
CSc 337 Lecture 5: Grid layout.
Positioning Boxes Using CSS
Presentation transcript:

Cascading Style Sheets Advanced Styles

Positioning Static – normal flow order Absolute – rel. to 1st positioned ancestor Fixed – rel. to browser window Relative – relative to "normal" position "left:20" adds 20 pixels to left margin © 2012 D. J. Foreman

Movement Controllable with JavaScript X, Y and Z axis movement Not required for pre-defined layouts Uses position properties left, right, top & bottom © 2012 D. J. Foreman

Multi-column layouts Create a style for each column Apply it to a div tag as an ID Add the ID attribute for JavaScript (if used) © 2012 D. J. Foreman

Example –the styles #leftcol {position: absolute; top: 5px; left: 1%; width:16%; background-color: black; border:5px blue solid} #mymaincol {position: absolute; top: 5px; left: 20%; height: 550px; width:58%} #rtcol {position:absolute; top: 5px; left: 80%; border:5px purple solid} © 2012 D. J. Foreman

Example - usage <div id='leftcol'> </div> My links for site navigation go here </div> <div id='mymaincol'> Document html & data goes here <div id='rtcol'> Miscellaneous data goes here © 2012 D. J. Foreman

What the %'s do First col is 1% from edge of window and 16% of window width. Total=17% Main col starts 20% from left edge (=> 3 % column margin). Uses 58% of window. (So 58%+20% = 78% used) Rtcol is 80% from left edge (2% col margin). Uses remaining width (22%) © 2012 D. J. Foreman

Diagram 80% 20% 16% 3% 58% 2% 1% © 2012 D. J. Foreman

Problems can occur Nothing prevents overlapping Text could be larger than layer Overflow:scroll allows for scrolling of layers w/o JavaScript © 2012 D. J. Foreman