Quiz #3 - CSS Lecture Code: 544698 Get Neighbors’ URLs for MP1

Slides:



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

Web Pages Week 10 This week: CSS Next week: CSS – Part 2.
CSS Internet Engineering Spring 2014 Bahador Bakhshi CE & IT Department, Amirkabir University of Technology.
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.
Cascading Style Sheets
Cascading Style Sheets
Copyright © Terry Felke-Morris WEB DEVELOPMENT & DESIGN FOUNDATIONS WITH HTML5 Chapter 6 Key Concepts 1 Copyright © Terry Felke-Morris.
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.
CSS. Intro to CSS Cascading Style Sheets – styles and enhances appearance of webpage.css extension.
Copyright © Terry Felke-Morris WEB DEVELOPMENT & DESIGN FOUNDATIONS WITH HTML5 Chapter 6 Key Concepts 1 Copyright © Terry Felke-Morris.
Cascading Style Sheets (CSS): Pixel-Level Control with HTML Ease
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.
Advance CSS (Menu and Layout) Miftahul Huda. CSS Navigation MENU It's truly remarkable what can be achieved through CSS, especially with navigation menus.
CIS 1310 – HTML & CSS 6 Layout. CIS 1310 – HTML & CSS Learning Outcomes  Describe & Apply the CSS Box Model  Configure Float with CSS  Designate Positioning.
1 Dreamweaver CS5 intermediate class by Cookie Setton Build a CSS website WITHOUT TABLES Just when you thought you were starting to understand HTML coding,
Web Pages and Style Sheets Bert Wachsmuth. HTML versus XHTML XHTML is a stricter version of HTML: HTML + stricter rules = XHTML. XHTML Rule violations:
กระบวนวิชา CSS. What is CSS? CSS stands for Cascading Style Sheets Styles define how to display HTML elements Styles were added to HTML 4.0 to.
Class four: the box model and positioning. is an HTML tag which allows you to create an element out of inline text. It doesn’t mean anything! try it:
Web Design with Cascading Style Sheet Lan Vu. Overview Introduction to CSS Designing CSS Using Visual Studio to create CSS Using template for web design.
More CSS CS HTML id attribute 2 Coding Horror! Our mission is to combine programming and “human” factors with geekiness! output  A unique ID for.
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.
MORE Cascading Style Sheets (The Positioning Model)
4.01 Cascading Style Sheets
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.
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. Defines the presentation of one or more web pages Similar to a template Can control the appearance of an entire web site giving.
CSS The Definitive Guide Chapter 8.  Allows one to define borders for  paragraphs  headings  divs  anchors  images  and more.
 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.
CSS - Quiz #4 Lecture Code:
Tutorial #6 – Creating Fixed Width Layouts. Tutorial #5 Review – Box Model Every html element is surround by a box Content, Padding, Border, Margin Can.
Lecture 2 - HTML and CSS Review SFDV3011 – Advanced Web Development 1.
Course created by Sarah Phillips BBCD Melbourne BAPDCOM Version 1 – April 2013.
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.
Copyright © Osmosys O S M O S Y SO S M O S Y S D e p l o y i n g E x p e r i e n c e & E x p e r t i s e™ CSS Training.
CSS - Quiz #3 Lecture Code:
- 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.
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.
CIS 228 The Internet 10/18/11 Grouping XHTML. CSS Selectors Rule: selector-group { property-declaration* } Selector-group: selector *, Selector: simple-selector.
Cascading Style Sheets Layout
Cascading Style Sheets™ (CSS)
( Cascading style sheet )
CSS Layouts: Positioning and Navbars
CSS Layouts: Grouping Elements
Webpage layout using CSS
>> The “Box” Model
Advanced CSS BIS1523 – Lecture 20.
Cascading Style Sheets (Layout)
CSS Applications to XML 19-Sep-18.
Objectives Create a reset style sheet Explore page layout designs
Cascading Style Sheets
Styles and the Box Model
CSS Borders and Margins.
Second CSS Lecture Applications to XML
MORE Cascading Style Sheets (The Positioning Model)
Web Development & Design Foundations with H T M L 5
More CSS Page layout Boriana Koleva Room: C54
More CSS 22-Feb-19.
Floating and Positioning
CSS Applications to XML 20-May-19.
CSc 337 Lecture 5: Grid layout.
Web Programming and Design
CSS Applications to XML 3-Jul-19.
Cascading Style Sheets™ (CSS)
Presentation transcript:

Quiz #3 - CSS Lecture Code: Get Neighbors’ URLs for MP1

Announcements Mini-Project 1 due Tonight before 11:59pm Linking to a neighbors’ sites Any questions? Submission (.txt file and upload to FTP) Enrollment should be Finalized Previous lecture slides had some small typos in closing tags Missing / in Corrected Spring 2010 material as reference Need help? Office hours by request , after class

Today’s Agenda CSS Properties: Margin, Padding, Border, and CSS Selector: a:hover Where are we in the material? Building a Web 2.0 Website Layouts HTML Element: From Mockup to HTML and CSS CSS Properties: Width, Height, Position Worksheet Lab

CSS Property: border Example: div { border: 1px solid #000000; } div { border-top: 1px solid #000000; border-right: 1px solid #000000; border-bottom: 1px solid #000000; border-left: 1px solid #000000; } Common Values: Border width: 1px Border style: solid Border color: # p { border: 3px solid #000000; } 2. p { border: 3px dashed #000000; } 3. p { border: 3px dotted #000000; } solid dotted dashed double groove ridge inset outset

Margins and Padding? Paragraph One Paragraph Two p{ background-color: red; } p#two{ background-color: blue; } p{ background-color: red; margin: 0; } p#two{ background-color: blue; }

CSS Properties: margin, padding Margin: space between this object and others Padding: space between the object’s border and contents Example: div { margin: 5px 10px; } div { margin: 5px 10px 5px 10px; } Order: top, right, bottom, left div { margin-top: 5px; margin-bottom: 5px; margin-left: 10px; margin-right: 10px; } Padding has same syntax Common Values: Pixels: 10px Div_1 Div_2 margin padding

CSS Selector: a:hover a { } Selects all links on the page. CSS Selectors a:hover { background-color: … color: … } Style affected by a:hover in CSS Tooltip affected by in HTML a:hover {} Also selects all links on the page but specifies a set of styles only for the hover state.

Material So Far… HTML and CSS Purpose and Capabilities Syntax Tags / Properties How to Use Built a HTML5 standards compliant website (by tonight) Q: Are we done?

What’s to Come… Dissect existing sites and mockups into HTML and CSS components Use background images to spice up our websites Use CSS positioning to create modular and non-linear layouts A: Not yet… …of course Javascript, PHP, and MySQL Still to come

That’s More Like It…

Building a Web 2.0 Website 1.Inspiration 2.Choose a Layout Style 3.Photoshop Mockup 4.Slicing and Dicing Mockup (HTML & CSS)

Choose a Layout Q: What do we mean by “layout”? Q: How many different types of layouts are there? Q: What makes a good layout? Q: How do we go about building our layout? Layouts?... o_0 A: The placement and interaction of your site’s components. A: Infinitely many… but some are more common and better than others. A: Think about: consistency, ease of use, form following function. Then iterate. A: Stay tuned…

Components menu slideshow / images heading images header main content footer navigation sub- content

Differing Layouts

Skip Photoshop for Now Insert “How to create a website mockup in Photoshop” here.

Step-by-Step From Mockup to HTML and CSS 1. Identify your site’s different components. 2. Create a that corresponds to each component. (Outside -> Inside, Top -> Bottom, Left -> Right) 3. Working from the outside in, translate each component into HTML. (Outside -> Inside, Top -> Bottom, Left -> Right) 4. Apply CSS.

Element ’s are our general layout building blocks/containers Used to logically group HTML elements Separate regions of code into functional regions “these HTML elements make up the menu system” Like span’s they typically have no visual effect on our HTML documents by themselves span’s are inline elements div’s are block elements What happens when we wrap a set of elements in div tags?

div Element …continued Menu print story News Story Menu print story News Story

Mockup -> HTML & CSS Example 1. Identify Components

Mockup -> HTML & CSS Example 2. Corresponding ’s (Outside -> Inside, Top -> Bottom, Left -> Right) … …

Mockup -> HTML & CSS Example 3. Translate Each Component (Outside -> Inside, Top -> Bottom, Left -> Right) … In your network Featured websites Featured projects Projects People … In your network Featured websites Featured projects

Mockup -> HTML & CSS Example HTML Completed embargo.zip > index.html

Mockup -> HTML & CSS Example Oops… Layout Totally Wrong? Nothing more CSS can’t fix Q: What happened? A: ’s are block level and naturally appear on their own line

CSS Properties: height, width Can only be set on block level elements and a few inline elements such as Example: div { width: 100px; height: 100px; } div { width: 100%; height: 100%; } Common Values: Pixels: 20px Percentage of parent: 100% Not set/auto: width of contents height: 100px; width: 100px;

height: 100px; width: 100px; CSS Properties: height, width …continued height: 100px; width: 100px; height: 100%; width: 100%; height: 100%; height: auto; width: auto; width: 100px; height: 100px;

CSS Properties: position Example: div { position: absolute; } Common Values: absolute Relative to closest parent who has its position set. If no parent qualifies, relative to document boundaries. Removes object from flow of document. Object takes up no space. relative Relative to the objects natural location. fixed Relative to browser window’s boundaries. Removes object from flow of document. Object takes up no space. static Don’t typically use this because it is already the default behavior.

CSS Properties: top/bottom, left/right Used in conjunction with position Example: div { position: absolute; top: 0px; left: 0px; } Common Values: Pixels: 10px

position Document Flow A B C code: div { position: static; }div { position: relative; }div { position: absolute; } span: “A” div: “B” span: “C” span: “A” div: “B” span: “C” span: “A” div: “B” span: “C” or div { position: fixed; }

top & left Effects div { position: static; top: 10px; left: 10px; } span: “A” div: “B” span: “C” span: “A” div: “B” span: “C” span: “A” div: “B” span: “C” div { position: relative; top: 10px; left: 10px; } div { position: absolute; top: 10px; left: 10px; } div: “B” top: 0px; left: 0px; 10px

absolute References top: 0px; left: 0px; A B A B code: div { position: absolute; top: 10px; left: 10px; } div { position: absolute; } #A { top: 10px; left: 10px; } #B { bottom: 10px; right: 10px; }

absolute vs. fixed Please see included absolute_vs_fixed.html file for demo

Positioning Worksheet positioning worksheet.pdf

How Do We Fix This? #sidebar { position: fixed; top: 0; left: 0; height: 100%; width: 200px; } #content { position: absolute; top: 0; left: 200px; height: 100%; width: 800px; }

Quiz #3 - CSS Lecture Code: Then… Lab