CSS: Lists, Tables and the Box Model

Similar documents
CSS: Selectors and Best Practices

Page Layout. 4.1 Styling Page Sections 4.2 Introduction to Layout 4.3 Floating Elements 4.4 Sizing and Positioning

Assignments (4) Assessment as per Schedule (2)

Adding CSS to your HTML

HTML and CSS COURSE SYLLABUS

Welcome Please sit on alternating rows. powered by lucid & no.dots.nl/student

INFS 2150 Introduction to Web Development

INFS 2150 Introduction to Web Development

Networks and Web for Health Informatics (HINF 6220) Tutorial 8 : CSS. 8 Oct 2015

Parashar Technologies HTML Lecture Notes-4

Zen Garden. CSS Zen Garden

3.1 Introduction. 3.2 Levels of Style Sheets. - The CSS1 specification was developed in There are three levels of style sheets

- The CSS1 specification was developed in CSS2 was released in CSS2.1 reflects browser implementations

TAG STYLE SELECTORS. div Think of this as a box that contains things, such as text or images. It can also just be a

COMS 359: Interactive Media

ITNP43: HTML Lecture 5

Page Layout Using Tables

ICT IGCSE Practical Revision Presentation Web Authoring

First Name Last Name CS-081 March 23, 2010 Midterm Exam

Styles, Style Sheets, the Box Model and Liquid Layout

CSS Box Model. Cascading Style Sheets

c122sep2214.notebook September 22, 2014

Deccansoft Software Services

Web Engineering CSS. By Assistant Prof Malik M Ali

- The CSS1 specification was developed in CSSs provide the means to control and change presentation of HTML documents

Make a Website. A complex guide to building a website through continuing the fundamentals of HTML & CSS. Created by Michael Parekh 1

Appendix D CSS Properties and Values

Block & Inline Elements

ID1354 Internet Applications

BIM222 Internet Programming

IMY 110 Theme 6 Cascading Style Sheets

Introduction to Web Design CSS Reference

Introduction to Web Design CSS Reference

1 of 7 11/12/2009 9:29 AM

Cascading Style Sheets CSCI 311


CSS: The Basics CISC 282 September 20, 2014

Chapter 3 Style Sheets: CSS

CSS.

What is the Box Model?

Fundamentals of Web Technologies. Agenda: CSS Layout (Box Model) CSS Layout: Box Model. All HTML elements can be considered as a box or a container

INTRODUCTION TO CSS. Mohammad Jawad Kadhim

CSS: Layout Part 2. clear. CSS for layout and formatting: clear

Web Design and Implementation

Web Design and Development Tutorial 03

Web Site Design and Development Lecture 7. CS 0134 Fall 2018 Tues and Thurs 1:00 2:15PM

CSS Selectors. element selectors. .class selectors. #id selectors

Building Page Layouts

INFS 2150 Introduction to Web Development

INFS 2150 Introduction to Web Development

CMPT 165: More CSS Basics

Text and Layout. Digital Multimedia, 2nd edition Nigel Chapman & Jenny Chapman Chapter 11. This presentation 2004, MacAvon Media Productions

CSCU9B2: Web Tech Lecture 3

CSS. Lecture 16 COMPSCI 111/111G SS 2018

As we design and build out our HTML pages, there are some basics that we may follow for each page, site, and application.

ADOBE 9A Adobe Dreamweaver CS4 ACE.

CSS Cascading Style Sheets

Tutorial 5 Working with Tables and Columns. HTML and CSS 6 TH EDITION

CSS: Layout, Floats, and More

COSC 2206 Internet Tools. CSS Cascading Style Sheets

Table Basics. The structure of an table

HTML-5.com itemscopehttp://data-vocabulary.org/breadcrumb<span itemprop="title">html 5</span> itemscopehttp://data-vocabulary.

Creating and Building Websites

Introduction to using HTML to design webpages

IMY 110 Theme 7 HTML Tables

The CSS Box Model. Motivation. CSS Box Model. CSE 190 M (Web Programming), Spring 2008 University of Washington

CSS Lecture 16 COMPSCI 111/111G SS 2018

Website Development with HTML5, CSS and Bootstrap

Web Programming and Design. MPT Senior Cycle Tutor: Tamara Week 2

CS 350 COMPUTER/HUMAN INTERACTION. Lecture 6

Create a Web Page with Spry Navigation Bar. March 30, 2010


Client-Side Web Technologies. CSS Part II

CSS Design and Layout Basic Exercise instructions. Today's exercises. Part 1: Arrange Page into Sections. Part 1, details (screenshot below)

ICT IGCSE Practical Revision Presentation Web Authoring

Designing for Web Using Markup Language and Style Sheets

CSS مفاهیم ساختار و اصول استفاده و به کارگیری

CIS 228 (Spring, 2012) Final, 5/17/12

Website Design (Weekday) By Alabian Solutions Ltd , 2016

Cascading Style Sheet Quick Reference

Cascade Stylesheets (CSS)

<style type="text/css"> <!-- body {font-family: Verdana, Arial, sans-serif} ***set font family for entire Web page***

2005 WebGUI Users Conference

COMS 359: Interactive Media

Table of Contents. MySource Matrix Content Types Manual

How to lay out a web page with CSS

Web Design and Development ACS Chapter 12. Using Tables 11/23/2017 1

Website Design (Weekend) By Alabian Solutions Ltd , 2016

GIMP WEB 2.0 MENUS WEB 2.0 MENUS: HORIZONTAL NAVIGATION BAR CREATING AN HTML LIST

CSCB20 Week 7. Introduction to Database and Web Application Programming. Anna Bretscher Winter 2017

Using CSS for page layout

HTML and CSS a further introduction

Internet Programming 1 ITG 212 / A

GIMP WEB 2.0 MENUS. Web 2.0 Menus: Horizontal Navigation Bar with Dynamic Background Image

INTERNATIONAL UNIVERSITY OF JAPAN Public Management and Policy Analysis Program Graduate School of International Relations

1/6/ :28 AM Approved New Course (First Version) CS 50A Course Outline as of Fall 2014

More CSS. <link href="filename" type="text/css" rel="stylesheet" /> CS380

Creating Layouts Using CSS. Lesson 9

3.1 Introduction. 3.2 Levels of Style Sheets. - HTML is primarily concerned with content, rather than style. - There are three levels of style sheets

Web Design and Development ACS Chapter 11. Creating Lists 11/16/2017 1

Transcription:

CSS: Lists, Tables and the Box Model CISC 282 September 20, 2017 Basics of CSS Style Name classes semantically What the style is intended for not what it does Define and apply styles efficiently Choose selectors wisely Tags to change in general Classes to change occasionally Context for specific situations Avoid duplicating rules for different elements Structure rules to apply to elements which share style settings 2

Examples to Avoid Consider creating a "highlighter" effect:.yellowbackground { background color: yellow; What if you want to change the colour to green? Name no longer makes sense.highlighter { background color: yellow; 3 Examples to Avoid Consider changing the colour for some list items:.issue { color: red; <ul> <li class="issue">...</li> <li class="issue">...</li> </ul> Every list item must specify the class Imagine a list with dozens of entries.issues li { color: red; <ul class="issues"> <li>...</li> <li>...</li> </ul> 4

Lists and Tables Lists list style type Specifies bullets or numbering used Value: none, circle, square, lower roman, upperroman... Tables caption side Specifies placement of the caption Value: top or bottom Can also apply styles to td and th 5 Containing Elements Two types of elements Block elements Significant sections Inline elements Smaller items Elements can be nested Blocks within blocks Inline within blocks Inline within inline All elements have containing elements <body> or parent block element <body> 6

Span <span class="...">content</span> Inline element "A tag for when there is no tag" Used for inline content without tags Applies style to that content Has no other semantics <p> There was one <span class="error">error</span> and three <span class="warning">warnings</span> detected. </p> 7 Div <div class="...">content</span> Block element Specifies a significant section of the document Applies style to that content Has no other semantics <div class="authorprofile"> </div> <div class="photogallery"> </div> <div class="rateandreview"> </div> 8

Box Model Method for specifying layout Can be applied to block elements Padding Height Content Width Margin 9 Content width Sets width of content Value: Unit value or % % of containing block Height Content Width height Sets height of the content Value: Unit value or % Fills containing block by default Can also specify min and max min width, max width, Applies to blocks, images and floats Floats are covered later in this class 10

Padding padding Sets space around content Value: Unit value or % padding top, padding bottom padding left, padding right Shares background colour with content Padding 11 border style Specifies the border's style Value: none, dotted, dashed, border left style, border color Sets the border's colour Value: name, RGB, or hex border top color, 12

border width Specifies the border's width Value: unit value, %, or named thin, medium, or thick border bottom width, border collapse Sets border to a single line Value: collapse or separate Can also be applied to tables Change borders for td and th 13 Margins margin Sets space around the border Value: unit value or % margin right, Does not share background with content Be careful of margin collapse Two stacked block elements Margins may merge Top element's bottom margin Bottom element's top margin Margins 14