Google fonts CSS box model

Slides:



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

CSS Styling CSS Box Model & CS110: Computer Science and the Internet.
CSS. Intro to CSS Cascading Style Sheets – styles and enhances appearance of webpage.css extension.
Very quick intro HTML and CSS. Sample html A Web Title.
Advance CSS (Menu and Layout) Miftahul Huda. CSS Navigation MENU It's truly remarkable what can be achieved through CSS, especially with navigation menus.
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 normally control the html elements. Three Ways to Insert CSS There are three ways of inserting a style sheet: External style sheet Internal style.
4.01 Cascading Style Sheets
Web Design Transparent Backgrounds. Why : Allow text to appear clearly above a graphic background image that still can be seen in the background. Without.
CSS Box Model. What is the CSS Box Model? The “Box Model” is a tool we use to lay out our web pages in a number of individual "boxes" or "containers".
 This presentation introduces the following: › 3 types of CSS › CSS syntax › CSS comments › CSS and color › The box model.
Css ( CASCADING STYLE SHEETs ) CSS Box Model. All HTML elements can be considered as boxes. In CSS, the term "box model" is used when talking about design.
 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.
Part 4 Introduction to CSS. CSS Table Table Borders table, td, th { border:1px solid black; } Firstname Lastname Bader Ali Paul Manuel The example below.
Web Foundations THURSDAY, OCTOBER 3, 2013 LECTURE 6: CSS CONTINUED.
Course created by Sarah Phillips BBCD Melbourne BAPDCOM Version 1 – April 2013.
CSS Fun damentals The Document Hierarchy Element Relationships The Box Model.
CSS Layout Cascading Style Sheets. Lesson Overview  In this lesson, you will learn:  CSS properties for margin  CSS properties for dimensions (width,
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.
Simple Website Layout Tutorial Using HTML 5 and CSS 3 Ref: layout-tutorial-html-5-css-3/
>> CSS Layouts. Recall Properties of Box – Border (style, width, color) – Padding – Margin – Display – Background – Dimension Welcome Padding Area Border.
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.
WebD Introduction to CSS By Manik Rastogi.
CSS.
CSS Box Model.
Cascading Style Sheets Boxes
4.01 Cascading Style Sheets
Semester - Review.
CSS Layouts: Grouping Elements
Unit 3 - Review.
CS1220 Web Programming Saloni Chacha.
Advanced CSS & CSS3.
CSS Box Model <span> & <div>
Display Property.
Box model.
Cascading Style Sheets (Layout)
Web Systems & Technologies
>> CSS Layouts.
CSS.
COMP 101 Review.
Chapter 6 More CSS Basics Key Concepts
Cascading Style Sheets
Basics of Web Design Chapter 6 More CSS Basics Key Concepts
TOPICS Chrome Dev Tools Process for Building a Static Website
CSS Borders and Margins.
CSS Box Model.
MORE Cascading Style Sheets (The Positioning Model)
Box model, spacing, borders, backgrounds
Cascading Style Sheets
CSS and Box Model.
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.
Grids, Floats & Flex Boxes
Putting it all together
Basics of Web Design Chapter 6 More CSS Basics Key Concepts
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
Training & Development
Box Model.
Building a website: Putting it all together
CSS and Class Tools.
Laying out Elements with CSS
CSS Boxes CS 1150 Fall 2016.
4.01 Cascading Style Sheets
CSS Box Model.
CSS Box Model.
Cascading Style Sheets
ITI 133: HTML5 Desktop and Mobile Level I
Presentation transcript:

Google fonts CSS box model

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

CSS Box Model

Every element is in box With very few exceptions, every element in HTML has a box that it is held in Can make it visible with background and border

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; }

No padding Content Padding Border Margin

No padding or border Rounded borders No padding borders or margins

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 & Inspect Element Using Chrome tools helps you see the different parts

Centering centering the TEXT (within the box) text-align: center; centering the BOX Need to tell it to treat as a block display: block; Must have a width (px or %) display: table; computes it for you center using margin margin-left: auto; margin-right: auto;

Centering list items One of the areas with browser differences In some cases (Firefox), centering text centers the bullet In other cases (Chrome), centering text does not center the bullet Solution: list-style-position: inside; bullets INSIDE the list item’s formatting

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!