Fix the CSS syntax errors below

Slides:



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

HIGH LEVEL OVERVIEW: CSS CSS SYNTAX CONSISTS OF A SET OF RULES THAT HAVE 3 PARTS: A SELECTOR, A PROPERTY, AND A VALUE. IT’S NOT NECESSARY TO REMEMBER THIS.
Web Pages Week 10 This week: CSS Next week: CSS – Part 2.
CSS Styling CSS Box Model & CS110: Computer Science and the Internet.
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.
Presenter: James Huang Date: Sept. 26,  Introduction  Basics  Lists  Links  Forms  CSS 2.
Copyright © Terry Felke-Morris WEB DEVELOPMENT & DESIGN FOUNDATIONS WITH HTML5 Chapter 6 Key Concepts 1 Copyright © Terry Felke-Morris.
Slide 1 CMPS 211 Internet Programming Spring 2008 Dynamic Effects with Styles Chapter 12 2/6/08.
Chapter 7 Page Layout Basics Key Concepts Copyright © 2013 Terry Ann Morris, Ed.D 1.
Very quick intro HTML and CSS. Sample html A Web Title.
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.
Web Development & Design Foundations with XHTML Chapter 7 Key Concepts.
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.
CSS BASICS. CSS Rules Components of a CSS Rule  Selector: Part of the rule that targets an element to be styled  Declaration: Two or more parts: a.
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.
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:
Unit 20 - Client Side Customisation of Web Pages
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.
ITP 104.  While you can do things like this:  Better to use styles instead:
 Word doc for you to download › Link at the beginning of class › 10 Questions › Answers to be added inline  Post to Sakai when completed › No resubmits.
CSS Class 2 -Add margins to elements on a page. -Set width and height of elements. - CSS shorthand properties for box model. -Style links. -Style tables.
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.
11/12/2015 Box Model Reed Crouch. 11/12/2015  HTML elements can be considered as boxes. In CSS, the term "box model" is used when referring to layout.
Eric Meyer on CSS Project 12 pp Project 12 Files.
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.
Nesting and Floating. Nesting and Floating Elements To make our page content appear the way we want, and to make the best use of screen space, we can.
Understanding CSS Cascading Style Sheets control the presentation of content in HTML pages Style Sheets separate formatting from the content –Styles defined.
 Add one element at a time  If it doesn’t do what you want, › Delete it › DON’T just keep piling on more items.
Chapter 7.  Change body and link styles  Create a drop-down menu  Change color and font styles in the menu  Create a pop-up effect using CSS  Utilize.
HTML & CSS Contents: the different ways we can use to apply CSS to The HTML documents CSS Colors and Background CSS Fonts CSS Text CSS box model: padding,
NAVIGATION USING HTML TO SET UP THE BASIC STRUCTURE OF A NAV BAR.
WebD Introduction to CSS By Manik Rastogi.
CSS.
Cascading Style Sheets (CSS) Internal Style Sheets Classes
CCT260H - Christopher Evan Jones
CSS Box Model.
CSS Box Model.
Nesting and Floating.
( Cascading style sheet )
Unit 3 - Review.
Creating Your Own Webpage
>> Introduction to CSS
Nesting and Floating.
Cascading Style Sheets (Layout)
Web Development & Design Foundations with HTML5 7th Edition
Chapter 7 Page Layout Basics Key Concepts
Web Development & Design Foundations with HTML5 8th Edition
Cascading Style Sheets
IS333: MULTI-TIER APPLICATION DEVELOPMENT
Chapter 6 More CSS Basics Key Concepts
Basics of Web Design Chapter 7 Page Layout Basics Key Concepts
Web Authoring Task 8– Create the following Style Sheet:
The Internet 10/13/11 The Box Model
Cascading Style Sheets
CSS Box Model.
More CSS Page layout Boriana Koleva Room: C54
How to use the CSS box model for spacing, borders, and backgrounds
CSS Box Model.
Nesting and Floating.
CSc 337 Lecture 5: Grid layout.
Presentation transcript:

Fix the CSS syntax errors below Fix the CSS syntax errors below. You can cross out code and add your correction below. p { border: 1px, solid, red; }

Fix the CSS syntax errors below Fix the CSS syntax errors below. You can cross out code and add your correction below. p { border: 1px solid red; }

Fix the CSS syntax errors below Fix the CSS syntax errors below. You can cross out code and add your correction below. strong { text-decoration underline; }

Fix the CSS syntax errors below Fix the CSS syntax errors below. You can cross out code and add your correction below. strong { text-decoration: underline; }

Fix the CSS syntax errors below Fix the CSS syntax errors below. You can cross out code and add your correction below. h1 { font weight: bold font-family: Arial; }

Fix the CSS syntax errors below Fix the CSS syntax errors below. You can cross out code and add your correction below. h1 { font-weight: bold; font-family: Arial; }

How much right padding is defined below? padding: 10px 7px;

How much right padding is defined below? padding: 10px 7px; Hint: top/bottom right/left

How much left padding is defined below? margin: 10px 7px 5px 1px;

How much left padding is defined below? margin: 10px 7px 5px 1px; Hint: clock-wise – top right bottom left

How much total width would this box take up? div.box { width: 600px; padding: 50px; }

How much total width would this box take up? div.box { width: 600px; padding: 50px; } Answer: 50 + 600 + 50 = 700px The defined width is the content only. Padding, margin and border increase the space the box will use.

How much total width would this box take up? div.box { width: 600px; padding: 50px 20px; border: 1px solid black; margin: 10px; }

How much total width would this box take up? div.box { width: 600px; padding: 50px 20px; border: 1px solid black; margin: 10px; } Answer: 10 + 1+ 20 + 600 + 20 + 1+ 10 = 662px Left margin+ Left border+ Left padding+ width + Right padding + Right border + Right padding

Could two boxes fit side-by-side in main div? Why is it important to know the total width a box would take up? Consider this: div.box { width: 300px; padding: 50px 20px; border: 1px solid red; } div#main{ width: 700px; } Could two boxes fit side-by-side in main div?

Why is it important to know the total width a box would take up Why is it important to know the total width a box would take up? Consider this: <div id=“main”> <div class=“box”> Box 1 content </div> <div class=“box”> Box 2 content div#main { width: 700px; } div.box { float: left; width: 300px; padding: 50px 20px; border: 1px solid red; }

How much margin can you add to the boxes to fill the entire space? <div id=“main”> <div class=“box”> Box 1 content </div> <div class=“box”> Box 2 content div#main { width: 700px; } div.box { float: left; width: 300px; padding: 50px 20px; border: 1px solid red; }

How much margin can you add to the boxes to fill the entire space? <div id=“main”> <div class=“box”> Box 1 content </div> <div class=“box”> Box 2 content div#main { width: 700px; } div.box { float: left; width: 300px; padding: 50px 20px; border: 1px solid red; margin: 4px; }

Consider only the following style definitions:   b {color: green;} i {color: blue;} b i {color: red; } What will be the color of <i><b>this text</b></i>? ______________

Consider only the following style definitions:   b {color: green;} i {color: blue;} b i {color: red; } What will be the color of <i><b>this text</b></i>? green

Consider only the following style definitions:   b {color: green;} i {color: blue;} b i {color: red; } What will be the color of <b><i>this text</i></b>? _______________

Consider only the following style definitions:   b {color: green;} i {color: blue;} b i {color: red; } What will be the color of <b><i>this text</i></b>? red

What color is the word “One”? p {color: red} b {color: orange} i {color: yellow} p b {color: green} p i {color: blue} p b i {color: purple} What color is the word “One”? <p>One <b><i>Two</i> Three</b> <u><i>Four</i><u> <b> <i style="color: pink;">Five</i> </b> </p>

What color is the word “One”? p {color: red} b {color: orange} i {color: yellow} p b {color: green} p i {color: blue} p b i {color: purple} What color is the word “One”? <p>One <b><i>Two</i> Three</b> <u><i>Four</i><u> <b> <i style="color: pink;">Five</i> </b> </p>

What color is the word “Two”? p {color: red} b {color: orange} i {color: yellow} p b {color: green} p i {color: blue} p b i {color: purple} What color is the word “Two”? <p>One <b><i>Two</i> Three</b> <u><i>Four</i><u> <b> <i style="color: pink;">Five</i> </b> </p>

What color is the word “Two”? p {color: red} b {color: orange} i {color: yellow} p b {color: green} p i {color: blue} p b i {color: purple} What color is the word “Two”? <p>One <b><i>Two</i> Three</b> <u><i>Four</i><u> <b> <i style="color: pink;">Five</i> </b> </p>

What color is the word “Three”? p {color: red} b {color: orange} i {color: yellow} p b {color: green} p i {color: blue} p b i {color: purple} What color is the word “Three”? <p>One <b><i>Two</i> Three</b> <u><i>Four</i><u> <b> <i style="color: pink;">Five</i> </b> </p>

What color is the word “Three”? p {color: red} b {color: orange} i {color: yellow} p b {color: green} p i {color: blue} p b i {color: purple} What color is the word “Three”? <p>One <b><i>Two</i> Three</b> <u><i>Four</i><u> <b> <i style="color: pink;">Five</i> </b> </p>

What color is the word “Four”? p {color: red} b {color: orange} i {color: yellow} p b {color: green} p i {color: blue} p b i {color: purple} What color is the word “Four”? <p>One <b><i>Two</i> Three</b> <u><i>Four</i><u> <b> <i style="color: pink;">Five</i> </b> </p>

What color is the word “Four”? p {color: red} b {color: orange} i {color: yellow} p b {color: green} p i {color: blue} p b i {color: purple} What color is the word “Four”? <p>One <b><i>Two</i> Three</b> <u><i>Four</i><u> <b> <i style="color: pink;">Five</i> </b> </p>

Fix the CSS syntax errors below Fix the CSS syntax errors below. You can cross out code and add your correction below. <h1> { text-decoration: none; }

Fix the CSS syntax errors below Fix the CSS syntax errors below. You can cross out code and add your correction below. h1 { text-decoration: none; }

Fix the CSS syntax errors below Fix the CSS syntax errors below. You can cross out code and add your correction below. img#logo { position = absolute; }

Fix the CSS syntax errors below Fix the CSS syntax errors below. You can cross out code and add your correction below. img#logo { position: absolute; }

Write the CSS code to create a two-column layout where the navigation menu will be on the right with a 200px width and the content area will be on the left with a 600px width. <div id="menu">Navigation Menu</div> <div id="content">Content goes here</div>

Write the CSS code to create a two-column layout where the navigation menu will be on the right with a 200px width and the content area will be on the left with a 600px width. <div id="menu"> Navigation Menu </div> <div id="content"> Content goes here </div> div#menu { float: right; width: 200px; } div#content { float: left; width: 600px; }

Fill in the blank with the correctly spelled CSS property name. Defines space between an element’s text and border, i.e., the space inside of the elements’ borders ________________________________

Fill in the blank with the correctly spelled CSS property name. Defines space between an element’s text and border, i.e., the space inside of the elements’ borders padding

Fill in the blank with the correctly spelled CSS property name. Makes rounded borders ______________________________

Fill in the blank with the correctly spelled CSS property name. Makes rounded borders border-radius

Write the CSS code for the following examples. Give <div> elements a rounded solid border that is 1px wide and red.

Write the CSS code for the following examples. Make all hyperlinks bold but only when they are nested in the <header> tag

Write the CSS code for the following examples. Change the bullet type of all <li> elements to “square” but only if the <li> is nested inside of a <ul> and the <ul> has the class name “sqr”

Concept type questions Imagine you have a large website that links a separate style sheet so every page has a consistent look and feel. Imagine you want to make the company name (h1 tag is used) on the homepage bigger, but not impact any other content anywhere. How do you do this and what is the name of this type of css?

Concept type questions Imagine you have a large website that links a separate style sheet so every page has a consistent look and feel. Imagine you have an FAQ page that uses the h3 tag often. Imagine you want to change the h3 tag but only on the FAQ page. Describe how you could do this? What is the name of this type of css?

<body> <h1>Heading</h1> <div id="intro"> <h2>Subhead</h2> <p>Paragraph text with a <a href="page.html">link</a> to another page.</p> </div> <div id="main"> <p>Paragraph one</p> <p>Paragraph two</p> <ol> <li>Item 1</li> <li>Item 3</li> <li>Item 4</li> </ol> </body> draw this web page as a tree-like diagram that shows the parent-child relationships.