Eric Meyer on CSS Project 12 pp. 263-280 Project 12 Files.

Slides:



Advertisements
Similar presentations
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.
Advertisements

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.
Very quick intro HTML and CSS. Sample html A Web Title.
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. CSS stands for Cascading Style Sheets and is a simple styling language which allows attaching style to HTML elements. CSS is a.
Advance CSS (Menu and Layout) Miftahul Huda. CSS Navigation MENU It's truly remarkable what can be achieved through CSS, especially with navigation menus.
1 Pengantar Teknologi Internet W03: CSS Cascading Style Sheets.
CIS 1310 – HTML & CSS 6 Layout. CIS 1310 – HTML & CSS Learning Outcomes  Describe & Apply the CSS Box Model  Configure Float with CSS  Designate Positioning.
Recognizing the Benefits of Using CSS 1. The Evolution of CSS CSS was developed to standardize display information CSS was slow to be supported by browsers.
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.
Working with Cascading Style Sheets
Text Properties, Line Box, CSS. Text Properties Properties related to the display of text. Text-align : left, right, center I like FSU!
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.
XP 1 Working with Cascading Style Sheets Creating a Style for Online Scrapbooks Tutorial 7.
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.
Cascading Style Sheets – Block Level. Block Level Style So far we have done text-level CSS With block level CSS, we used a generic container tag Similarly.
Principles of Web Design 6 th Edition Chapter 4 – Cascading Style Sheets.
LING 408/508: Programming for Linguists
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.
Principles of Web Design 6 th Edition Chapter 7 – Page Layouts.
CSS The Definitive Guide Chapter 8.  Allows one to define borders for  paragraphs  headings  divs  anchors  images  and more.
MCS 270 Cascading Style Sheets (CSS) Gustavus Adolphus College.
 This presentation introduces the following: › 3 types of CSS › CSS syntax › CSS comments › CSS and color › The box model.
CIS 1315 – Web Development for Educators CIS 1315 HTML Tutorials 3 & 4: Working With CSS.
Today’s objectives  Assignment 1  Padding, Margins, Borders  Fluid Layout page  Building accessible Table  Element size with padding and border 
Ch 10 HTML and CSS Web Standards Solutions A Web Standardistas’ Approach.
Lesson 03 // Cascading Style Sheets. CSS Stands for Cascading Style Sheets. We’ll be using a combination of Html and CSS to create websites. CSS is a.
Copyright © Terry Felke-Morris WEB DEVELOPMENT & DESIGN FOUNDATIONS WITH HTML5 Chapter 6 Key Concepts 1 Copyright © Terry Felke-Morris.
>> 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.
Week 8 – Part 2 Page Layout Basics Key Concepts 1.
XP Review 2 New Perspectives on JavaScript, Comprehensive1 Introducing Cascading Style Sheets Formatting Web Pages with CSS.
1 CS428 Web Engineering Lecture 08 Border, Margin, Padding … (CSS - III)
LING 408/508: Programming for Linguists Lecture 10 September 30 th.
CSS Fun damentals The Document Hierarchy Element Relationships The Box Model.
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.
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.
HTML and Dreamweaver November 11th. Agenda Box Model Displaying and positioning elements – Padding – Margin – Float – Display – Position HTML Demo.
CIS 228 The Internet 10/18/11 Grouping XHTML. CSS Selectors Rule: selector-group { property-declaration* } Selector-group: selector *, Selector: simple-selector.
Understanding CSS Cascading Style Sheets control the presentation of content in HTML pages Style Sheets separate formatting from the content –Styles defined.
HTML 5 AND CSS Dr Mohd Soperi Mohd Zahid Semester /16.
INTERNET APPLICATIONS CPIT405 CSS Cascading Style Sheet Instructor: Omnia H. Alwazzan
Html: structure & content CSS: presentation & style A CSS Primer chapter 4.
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.
The Box Model in CSS Web Design – Sec 4-8
4.01 Cascading Style Sheets
The Box Model in CSS Web Design – Sec 4-8
CSS Layouts: Grouping Elements
Webpage layout using CSS
>> The “Box” Model
Floating & Positioning
The Box Model in CSS Web Design – Sec 4-8
CSS Applications to XML 19-Sep-18.
CSS Borders and Margins.
Second CSS Lecture Applications to XML
MORE Cascading Style Sheets (The Positioning Model)
More CSS 22-Feb-19.
Floating and Positioning
CS3220 Web and Internet Programming More CSS
4.01 Cascading Style Sheets
CSS Applications to XML 20-May-19.
CSc 337 Lecture 5: Grid layout.
CSS Applications to XML 3-Jul-19.
Presentation transcript:

Eric Meyer on CSS Project 12 pp Project 12 Files

Web Page Backgrounds/CSS Project 12 uses standard CSS completed project will look like thiswill look like this  standards-compliant browser FireFox (Official CIS 110 Browser)

CSS Box Model CSS assumes that every element is contained in an element boxelement box E-M-B-P-C = Edge-Margin-Border-Padding-Content The width of an element is the distance from the left side of the content to the right side of the content:

div.box { margin-top:50px; background-color:yellow; color:green; border-style:double; padding: 10px; border-color: #000090; /* text-align applies only to the inline content of a block-level element. To center a div, use the following three style definitions */ margin-left: auto; margin-right: auto; width: 50%; }

proj12: Unstyled Document Ch1201.htmlCh1201.html Open in TextPad Sequence of Two DIVs......

Positioning the DIVs div#links { position: absolute; top: 40px; left: 0; width: 150px; border: 1px dotted black; } position:absolute  positioned wrt to parent element:

div#links { position: absolute; top: 40px; left: 0; width: 150px; border: 1px dotted black; } Absolute positioning  element removed from document flow positioned wrt containing block (parent) may overlap other elements or be overlapped by them

div#links { position: absolute; top: 40px; left: 0; width: 150px; border: 1px dotted black; } top, left, width properties define location top & left are side offset properties turn border on to see layout

body {margin: 0; padding: 0;} div#content {margin: 40px 25px 25px 150px; border: 3px solid gray;} order of margin values: Top Rt Bttm Lft “remember this to avoid TRBL” left margin prevents overlap with links Run margins to edges of viewport

div#content {margin: 40px 25px 25px 150px; border: 3px solid gray;} div#links a {display: block;} make links block level: ch1202.html ch1203.htmlch1202.html ch1203.html rule uses a descendent selectordescendent selector Classification of Elements:Classification of Elements block, inline, list-item

Descendant selectors Problem: specify a CSS rule that “applies to EM elements that are contained by an H1 element" Example: h1 { color: red } em { color: red }

Descendant selectors Although the intention of these rules is to add emphasis to text by changing its color, the effect will be lost in a case such as: This headline is very important

Descendant selectors Add a rule that sets the text color to blue whenever an em occurs anywhere within an h1 h1 { color: red } em { color: red } h1 em { color: blue } return to proj12

Classification of Elements: Block-level, Inline, List-item Block-Level Elements: Displayed on a line by itself p, h1, div, table, ol, ul,... Can only be contained by other block-level elements (with restrictions): p can be in a div p can not be in a p

Classification of Elements: Block-level, Inline, List-item Inline Elements: Do not begin on a new line a, em, span, img, … Can be children of any other element List-item Elements: appear in lists

CSS Display Property display values: block | inline | list-item | none applies to: all elements div#links a {display: block;} return to proj12