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

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

Web Design and Implementation

Building Page Layouts

12/9/2012. CSS Layout

INFS 2150 Introduction to Web Development

INFS 2150 Introduction to Web Development

Client-Side Web Technologies. CSS Part II

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

To place an element at a specific position on a page use:


BIM222 Internet Programming

Internet Programming 1 ITG 212 / A

COMS 359: Interactive Media

Parashar Technologies HTML Lecture Notes-4

Cascading Style Sheets CSCI 311

Web Engineering CSS. By Assistant Prof Malik M Ali

CSS Cascading Style Sheets

Cascading Style Sheet Quick Reference

Using CSS for page layout

CSS Box Model. Cascading Style Sheets

Positioning in CSS: There are 5 different ways we can set our position:

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

Introduction to Web Design CSS Reference

Introduction to Web Design CSS Reference

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

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

Introduction to Multimedia. MMP100 Spring 2016 thiserichagan.com/mmp100

Styles, Style Sheets, the Box Model and Liquid Layout

CSS: Lists, Tables and the Box Model

Cascading Style Sheets (Part II)

First Diploma Unit 10 Client Side Web. Week 4 -The CSS Box model

Assignments (4) Assessment as per Schedule (2)

Chapter 3 CSS for Layout

Appendix D CSS Properties and Values

The Importance of the CSS Box Model

What is the Box Model?

There are 3 places you can write CSS.

Unit 20 - Client Side Customisation of Web Pages. Week 2 Lesson 4 The Box Model

Adding CSS to your HTML

Creating Layouts Using CSS. Lesson 9

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

HTML and CSS a further introduction

Unit 20 - Client Side Customisation of Web Pages. Week 2 Lesson 4 The Box Model

CMPT 165: More CSS Basics

FLOATING AND POSITIONING

ADOBE 9A Adobe Dreamweaver CS4 ACE.

What do we mean by layouts?

Thinking inside the box

ITNP43: HTML Lecture 5

Web Authoring and Design. Benjamin Kenwright

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

Wanted! Introduction. Step 1: Styling your poster. Activity Checklist. In this project, you ll learn how to make your own poster.

Introduction to HTML & CSS. Instructor: Beck Johnson Week 2

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

CS7026 CSS3. CSS3 Graphics Effects

Cascading Style Sheets for layout II CS7026

CASCADING STYLESHEETS

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

IDM 221. Web Design I. IDM 221: Web Authoring I 1

INFS 2150 Introduction to Web Development

INFS 2150 Introduction to Web Development

CSS: Layout, Floats, and More

CSS for Page Layout Robert K. Moniot 1

Module 2 (VII): CSS [Part 4]

Web Design and Development Tutorial 03

UNIVERSITI TEKNOLOGI MALAYSIA TEST 1 SEMESTER II 2012/2013

IMY 110 Theme 6 Cascading Style Sheets

COSC 2206 Internet Tools. CSS Cascading Style Sheets

Controlling Appearance the Old Way

COMM 2555: Interactive Digital Communication / Spring 2018 Lab 9: Basic layout techniques with CSS

CSC309 Programming on the Web week 3: css, rwd

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

CE419 Web Programming. Session 3: HTML (contd.), CSS

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

By Ryan Stevenson. Guidebook #3 CSS

Website Design (Weekend) By Alabian Solutions Ltd , 2016

CSS worksheet. JMC 105 Drake University

HTML & CSS. SWE 432, Fall 2017 Design and Implementation of Software for the Web

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

Cascading Style Sheets (CSS)

Zen Garden. CSS Zen Garden

Chapter 3 Style Sheets: CSS

Web Programming Step by Step

Block & Inline Elements

Website Design (Weekday) By Alabian Solutions Ltd , 2016

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

Introduction to WEB PROGRAMMING

IMY 110 Theme 11 HTML Frames

CSS. Shan-Hung Wu CS, NTHU

Class 3 Page 1. Using DW tools to learn CSS. Intro to Web Design using Dreamweaver (VBUS 010) Instructor: Robert Lee

HTML + CSS. ScottyLabs WDW. Overview HTML Tags CSS Properties Resources

Fish Eye Menu DMXzone.com Fish Eye Menu Manual

Layout with Layers and CSS

CS193X: Web Programming Fundamentals

Implementing a chat button on TECHNICAL PAPER

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

CSS means Cascading Style Sheets. It is used to style HTML documents.

CSS for Designers. Capabilities to Know & Pitfalls to Avoid. R. Scott Granneman. Jans Carton

Table of Contents. MySource Matrix Content Types Manual

EECS1012. Net-centric Introduction to Computing. Lecture 5: Yet more CSS (Float and Positioning)

Transcription:

> > > > CSS Box Model Think of this as a box that contains things, such as text or images. It can also just be a box, that has a border or not. You don't have to use a, you can apply the box model to any tag. s are "block" level tags. They have a line break after by default. span Think of this as a box that contains things, such as text or images. It can also just be a box, that has a border or not. You don't have to use a span, you can apply the box model to any tag. spans are "inline" level tags. They have NO line break after by default. width/height The inner edges of the content box, and does not include the padding or margin. TAG STYLE SELECTORS height border border-style padding width border-top border-top-style padding-top max-height border-bottom border-bottom-style padding-bottom max-width border-left border-left-style padding-left min-height border-right border-right-style padding-right border-color border-width margin* border-top-color border-top-width margin-right* border-bottom-color border-bottom-width margin-left* border-left-color border-left-width margin-top* border-right-color border-right-width margin-bottom* *check margins in IE 6 &7

> > > > Floating > > > > Nesting Tags (from Smashing Magazine using new HTML5 tags)

> > > > Centering (this is the 10% auto margin) (this is the 10% auto margin) {width: 80%; margin-left: auto; margin-right: auto; > > > > Clear clear:left, right, or both Forces an object to not float, which maybe it is because the object next to it has a float to sit next to the object next to it. {width: 40%; {width: 40%; because of the float and the space available I am up here not down there Drop me down!!!! Add: clear: both (see below) instead: { clear: both;

> > > > Background and Shortcut background-color apply a background color background-color: teal; background-image apply a background image background-image: url(images/image.gif) background-repeat to not have the image repeat, choose background-repeat: no-repeat to have it repeat in a certain direction, choose repeat-x repeat-y background-repeat: repeat-x shortcut background: teal url(images/image.gif) no-repeat; > > > > Padding/Margin Shortcuts padding or margin all four sides padding: 10px top/bottom and left/right padding: 10px 20px each side like a clock padding: 10px 20px 5px 10px > > > > Div Border Style border: none dotted dashed solid double groove ridge inset outset Example {border-color: red; border-width: 1px; border-style: dotted; Shortcut {border: red 1px dotted; Border and padding inside box-sizing: border-box; this works for padding to go inside the box instead of default outside of box for both

> > > > CSS Positioning Options Static position:static This is default. The default positioning for all elements is position:static, which means the element is not positioned and occurs where it normally would in the.html document. Normally you wouldn't specify this unless you needed to override a positioning that had been previously set. #-1 { position:static; Relative position:relative Content also appears relative to where it is in the.html document, but you can scoot it around, for example: Let's move -1 down 20 pixels, and to the left 40 pixels: #-1 { position:relative; top:20px; left:-40px; If you specify position:relative, then you can use top or bottom, and left or right to move the element relative to where it would normally occur in the document. You can also use negative amounts, as done above. Absolute Uses specific coordinates (nailed down). top or bottom left or right position:absolute When you specify position:absolute, the element is removed from the document and placed exactly where you tell it to go. Let's move -1a to the top right of the page: #-1a { position:absolute; top:0; right:0; width:200px; Fixed Uses specific coordinates (nailed down), but does not move when you scroll. top or bottom left or right position:fixed When you specify position:fixed, the element is removed from the document and placed

exactly where you tell it to go, and does not move when you scroll. Let's move -1a to the top right of the page: #-1a { position:fixed; top:0; right:0; width:200px; > > > > Centering in the window with absolute positioning inside position:relative + position:absolute This allows you to center (in the window) a relative, and have the contents positioned absolutely..container {position: relative;.content {position: absolute; > > > > Stacking Order z-index Elements with a higher z-index will be on top of elements with a lower number. Think about it like floors of a building. z-index: 100; apply to one element that you would like to be above another element, but don't forget to add z-index: 1; to the other element > > > > Transparency For IE filter: alpha (opacity=30) Other Browsers opacity: 0.3 The same as above but for other browsers. List both. CSS3 rgba(255, 0, 0, 0.2) This creates a red box with 20% transparency. Apply to color (text) or background. > > > > CSS Overflow Options Visible Allows stuff to continue outside the box Hidden Clips the content if it is too long Scroll Adds a scroll bar, horizontal or vertical you can also say overflow-y: scroll to specifically add a scroll bar on the right. Auto Adds a scroll bar if necessary