 Website development process  CSS  Javascript.

Slides:



Advertisements
Similar presentations
LIS650 lecture 4 Thomas Krichel today CSS Properties –Box properties-- List properties –Table properties-- Classification properties –(Audio.
Advertisements

LIS650 lecture 4 Thomas Krichel today Advice CSS Properties –Box properties –List properties –Classification properties Fun with selectors.
Week 10 Creating Positioned Layouts
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.
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.
Floating Elements CS380.
Tutorial 4: Creating page layout with css
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.
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 6 Creating Fixed-Width Layouts
TUTORIAL 4: CREATING PAGE LAYOUT WITH CSS Session 4.3.
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.
An Introduction to Cascading Style Sheets CSS Layout, and the CSS Box Model Nick Foxall SM5312 week 9: CSS Layout.
XP 1 Working with Cascading Style Sheets Creating a Style for Online Scrapbooks Tutorial 7.
MORE Cascading Style Sheets (The Positioning Model)
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.
CSS to Know And this is just the beginning. What to What?  Tags = regular HTML  Ids = #id, only one hashtag per page  Class =.class, many as you want.
Svetlin Nakov Telerik Web Design Course html5course.telerik.com Manager Technical Training
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.
UNIT 3 DYNAMIC WEBSITES WITH CSS AND JAVASCRIPT. OBJECTIVES  CO4 Apply style to a website using CSS.  CO5 Describe the use of scripting when creating.
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.
The Missing Manual MARGINS, PADDING, & BORDERS—CHAPTER 7.
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.
Page Layout with CSS Learning Web Design: Chapter 16.
CSS = Cascading Style Sheet CSS consists of rules to display, style and decorate HTML elements Why CSS ? – Separate decoration from HTML markup (Ex :,,…)
WEB DESIGN AND PROGRAMMING Advanced CSS Techniques.
Doncho Minkov Telerik Web Design Course html5course.telerik.com Technical Trainer
Floating Elements CS The CSS float property (reference) 2 img.headericon { float: right; width: 130px; } CSS  removed from normal document flow;
CSS Layout Arrangement and Positioning of the HTML Elements Svetlin Nakov Technical Trainer Software University
Svetlin Nakov Telerik Corporation
 Cascading Style Sheets (CSS) ◦ Used to specify the presentation of elements separately from the structure of the document.  Inline style ◦ declare.
THE BOX MODEL Putting layouts together with CSS. The Box Model  How would you describe a box?  Container?  Tags or elements are “containers”  puts.
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.
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 Foundations MONDAY, OCTOBER 7, 2013 LECTURE 7: CSS LINK COLORS, INTERMEDIATE CSS.
Cascading Style Sheets (CSS) Part II IT210: Web-based IT.
CONTROLLING Page layout
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.
- WE’LL LOOK AT THE POSITION PROPERTY AND HOW CSS RESOLVES CONFLICTS BETWEEN STYLING INSTRUCTIONS The position property; CSS specificity hierarchy.
Understanding CSS Cascading Style Sheets control the presentation of content in HTML pages Style Sheets separate formatting from the content –Styles defined.
CS 120: Introduction to Web Programming Lecture 10: Extra Features and Website Design Part 1 Tarik Booker CS 120 California State University, Los Angeles.
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.
Tutorial 4 Using CSS for Page Layout. Objectives Session 4.1 – Explore CSS layout – Compare types of floating layouts – Examine code for CSS layouts –
Laying out Elements with CSS
Cascading Style Sheets Layout
CSS Layouts: Grouping Elements
Webpage layout using CSS
Floating & Positioning
Advanced CSS BIS1523 – Lecture 20.
The Internet 10/25/11 XHTML Tables
CSS Applications to XML 19-Sep-18.
Objectives Create a reset style sheet Explore page layout designs
Controlling Layout with Style Sheets
Second CSS Lecture Applications to XML
Positioning.
MORE Cascading Style Sheets (The Positioning Model)
More CSS 22-Feb-19.
Floating and Positioning
Positioning.
Laying out Elements with CSS
CSS Applications to XML 20-May-19.
CSc 337 Lecture 5: Grid layout.
CSS Applications to XML 3-Jul-19.
Positioning Boxes Using CSS
CGS 3066: Web Programming and Design Fall 2019 CSS Part 2
Presentation transcript:

 Website development process  CSS  Javascript

Customer Analyst Designer Web developer Tester I want… I need … Page design Website Website specification Sitemap Wireframe Content Template

 Total element width = width + left padding + right padding + left border + right border + left margin + right margin  Total element height = height + top padding + bottom padding + top border + bottom border + top margin + bottom margin  IE includes padding and border in the width, when the width property is set, unless a DOCTYPE is declared.

 A fixed layout is a layout with a fixed width Pros : Easy to create Width are the same in all browser No need min-width, max-width Cons : Additional spaces in high resolution Scrollbars when in low resolution Examples :

 Fluid (liquid) layout is a layout that adjust to the user’s screen resolution Pros : More use friendly No unused spaces Eliminate horizontal scrollbar Cons : May look awful in some resolution Image, video may have multiple width Additional space while less content in large resolution

 CSS float allows element to be pushed to left or right so that other elements will wrap on it  Ex : img{ float:left;}  Float usually used for images and layout  To turn off other elements to wrap around float, use {clear:both} or clearfix (google it)

 Using {position} we can place an element anywhere on webpage ◦ position : static; ◦ position : fixed; ◦ position : relative; ◦ position : absolute;

 static — The default positioning of all elements. Static elements remain in the normal page flow and do not move.

 fixed — Element will be taken out of the normal flow of the page, and attach to viewable page edges  fixed element will stay visible even when the page is scrolled.  Internet Explorer 6 does not support fixed positioning without !DOCTYPE

 PositionFixed.html

 relative — A relative element will be positioned according to its static place holder  relative element will have a place holder to mark its original place

 PositionRelative.html

 absolute — An absolute-positioned element will be taken out of the normal flow of the page & placed according to its nearest relative-positioned parent.  By default, will have position:relative;

 AbsolutePosition.html

 If 2 elements are overlapped when displaying, z-index will be used to specify their orders  z-index can be positive or negative  Higer z-index will be in front of others

 PositionOverlap.html

 A technique to replace text with image using CSS Toosols online.header{ overflow:hidden; text-indent:-9999px; background:url(logo.gif) no-repeat; }

 IE6 and below has many CSS bugs  Some bugs : ◦ PNG transparency ◦ IE Box model ◦ Double margin bug ◦ No min/max width/height

 Float left (right) element that has left (right) margin will have double margin  Demo :  Fix : ◦ Add display:inline; to the floated element

 E6 ignores the min-height property and instead treats height as the minimum height  Demo :  Fix : /*For IE6*/ #container {min-height:200px; height:200px;} /*For all other browsers*/ html>body #container { height:auto;}

 100% height doesn’t effect in IE6  Fix : ◦ Specify a fixed height of its parent element. ◦ Need element fill the full-length of your page, apply height:100%; to both the html and body elements /*100% height of the parent element for IE6*/ #parent {height:500px;} #child {height:100%;} /*100% of the page length for IE6*/ html, body {height:100%;} #fullLength {height:100%;}

 Floated elements drop below their expected position when their total width exceeds the content’s width of its container.  Demo  Fix : ◦ Wrap content in a fixed-width container large enough to accommodate the content, or remove the width from the static block.

 Container will not wrap floated elements properly  Fix : ◦ Add width & overflow : hidden to its container

 When text is next to a floated element. IE6 will add a 3px margin between the element and the text, even if none is specified  Fix : ◦ When in IE6, apply margin-left : -3px for text

  License: MIT  Based on the idea of splitting the width of apage into 24 columns (with 40px = 30px +10px margin each)  By default max-width 950px (24 * )  No fluid layout possible (yet)

Ví d ụ Style object example

Ví d ụ

Thay đ ổ i border, margin, padding DOM Node properties

Thay đ ổ i background Style background

Thay đ ổ i font Style font

 Everything in Javascript is object includes function  Object is simple name-value pairs, as seen in: ◦ Dictionaries in Python ◦ Hashes in Perl and Ruby ◦ Hash tables in C and C++ ◦ HashMaps in Java ◦ Associative arrays in PHP  Very common, versatile data structure  Name part is a string; value can be anything