Box Model.

Slides:



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

Web Engineering 1 Ishaq Khan Shinwari MCS City University Peshawar.
CSS. Intro to CSS Cascading Style Sheets – styles and enhances appearance of webpage.css extension.
Chapter 3 – Designing your web pages Dr. Stephanos Mavromoustakos.
CSS normally control the html elements. Three Ways to Insert CSS There are three ways of inserting a style sheet: External style sheet Internal style.
 To create page, Komodo Editor  To share web page, UNC SERVER, ISIS (  To transfer page to ISIS,
Design, Formatting, CSS, & Colors 27 February, 2011.
CSS Basics LIS Webteam April 8, Why CSS? What’s wrong with HTML? Structure vs Style Early web design used hacks to style webpages with HTML – like.
4.01 Cascading Style Sheets
Understanding HTML Style Sheets. What is a style?  A style is a rule that defines the appearance and position of text and graphics. It may define the.
Working with Cascading Style Sheets. Introducing Cascading Style Sheets Style sheets are files or forms that describe the layout and appearance of a document.
 This presentation introduces the following: › 3 types of CSS › CSS syntax › CSS comments › CSS and color › The box model.
WRT235: Writing in Electronic Environments Basic CSS.
CSS Tutorial 1 Introduction Syntax How to use style specifications. Styles.
Web Foundations THURSDAY, OCTOBER 3, 2013 LECTURE 6: CSS CONTINUED.
Cascading Style Sheets Level 2. Course Objectives, Session 1 Level 1 Quick Review Chapter 8: Adding Graphics to Web Pages Chapter 9: Sprucing Up Your.
HTML with Style!. What is a Style Sheet? CSS? Style Sheet CSSCascading Style Sheets A “language” for defining style rules. Rules that tell the browser.
 Look especially at › File Tips and Shortcuts › Student video.
Working with DIV Structures, CSS, Webfonts and Templates 9/16/2015Web Development and Interactive Media.
ACM 262 INTRODUCTION TO WEB DESIGN Week-7 ACM 262 Course Notes.
NASRULLAHIBA.  It is time to take your web designing skills to the next level with Cascading Style Sheets (CSS). They are a way to control the look and.
CSS Introductions. Objectives To take control of the appearance of a Web site by creating style sheets. To use a style sheet to give all the pages of.
Creating Web Documents CSS examples (do more later) Lab/Homework: Read chapters 15 & 16. Work on Project 3, do postings.
CSS (Cascading Style Sheets). CSS CSS – Cascading Style Sheets – Cascade because of the way CSS rules can stack on top of each other. Allows you to add.
1 Cascading Style Sheets
CSS: formatting webpages
WebD Introduction to CSS By Manik Rastogi.
CSS.
Introduction to CSS Layout
Formatting Text with CSS
4.01 Cascading Style Sheets
Google fonts CSS box model
Unit 20 - Client Side Customisation of Web Pages
CSS Layouts: Grouping Elements
CSS3 Style of the HTML document CSS2+New Specifications Differences
CX Introduction to Web Programming
Box model.
Web Systems & Technologies
>> CSS Layouts.
Using CSS.
CSS.
Filezilla problems continuing
COMP 101 Review.
IS333: MULTI-TIER APPLICATION DEVELOPMENT
Chapter 6 More CSS Basics Key Concepts
Cascading Style Sheets
CSS.
TOPICS Chrome Dev Tools Process for Building a Static Website
Google Fonts Selective Formatting
CSS Borders and Margins.
CSS Box Model.
MORE Cascading Style Sheets (The Positioning Model)
HTML5 Level I Session III
HTML5 Level I Session III
Box model, spacing, borders, backgrounds
Cascading Style Sheets
DynamicHTML Cascading Style Sheet Internet Technology.
Cascade Style Sheet Demo W3Schools. com: w3schools
Float Property Elements that seem to “float" on the right or left side of either the browser window or another element are often configured using.
Putting it all together
The Internet 10/6/11 Cascading Style Sheets
Web Development & Design Foundations with H T M L 5
DynamicHTML Cascading Style Sheet Internet Technology.
How to use the CSS box model for spacing, borders, and backgrounds
CSS.
Building a website: Putting it all together
CSS and Class Tools.
4.01 Cascading Style Sheets
ITI 133: HTML5 Desktop and Mobile Level I
Cascade Style Sheet Demo W3Schools. com: w3schools
Presentation transcript:

Box Model

Follow Ups and Clarifications

Topics Multiple fonts, google fonts Understand what you are doing Komodo edit projects, file structure Formatting HTML and CSS Piazza Repeating questions Posting private questions Understand what you are doing Don’t blindly copy and paste Nothing extraneous Font sizes Default Use of cm and em Assignment 1 comments => Project 1 points

Font Families Preferable to use: universality Multiple fonts: use first available

Linking to style sheets Use file name only for same folder href=“mystyle.css" Use full url for external href=“http://www.site/folder/file.css"

Why external? Google fonts! google.com/fonts 2 steps Link to font (second style sheet!) Use name in CSS

Font sizes If you use em, you should define the font size Default is browser-specific If you use cm, it’s the same size on any type of display

Box Model

Box Model Allows us to place borders, and space elements in relation to other elements Remember that border must have size, color and style Here’s where Inspect Element starts being important!

Box Model Margin – clears an area around the border. Does not have a background color – it is transparent Border – a border that goes around the padding and content. Affected by the background color of the box. Padding – clears an area around the content. Affected by background color of the box Content – the content of the box, where text appears. Don’t forget to give the border some sort of style! <div> this is a div with some text <br/> In fact, this text has two lines <div> div { width:220px; padding:10px; border:5px solid gray; margin:0px; }

A cool new feature Rounded corners on boxes border-radius: 15px; New with the latest version of CSS If not supported by a browser, you get square corners!