Display Property.

Slides:



Advertisements
Similar presentations
LIS650 lecture 4 Thomas Krichel today Advice CSS Properties –Box properties –List properties –Classification properties Fun with selectors.
Advertisements

Table, List, Blocks, Inline Style
Table (TABLE) Contains TABLE ROWS (TR) Contains TABLE DATA (TD) Data can contain anything Text Lists Other tables Pictures …
Cascading Style Sheets
CSS Digital Media: Communication and design 2007.
Today CSS HTML A project.
FORMATTING IN CONTEXT. FOLLOW UPS ANCHOR POINTS MUST BE UNIQUE  If you have more than one, how does it know where to go?  They can be repeated across.
CHAPTER 8 ADVANCED CSS. LEARNING OBJECTIVES Assign formatting styles to a CSS class definition Use a tag’s class attribute to apply the styles defined.
Cascading Style Sheets Basics. Why use Cascading Style Sheets? Allows you to set up a series of rules for all pages in a site. The series may be changed.
© 2004, Robert K. Moniot Chapter 6 CSS : Cascading Style Sheets.
Web Pages and Style Sheets Bert Wachsmuth. HTML versus XHTML XHTML is a stricter version of HTML: HTML + stricter rules = XHTML. XHTML Rule violations:
Need to define two things: › The destination › Something to click on to get there  Tag is click here  Can be text, special character or image (next.
Week 9 Using the Box Properties. 9-2 The CSS Visual Formatting Model Describes how the element content boxes should be displayed by the browser –Based.
 Pseudo-elements  Centering  Tables  Classes and ids.
 CSS ids  Pages  Sites  HTML: class=“name”  Names may define format OR content › Either works  CAN apply multiple classes to the same tag  Multiple.
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.
Dreamweaver -- CSS. Dreamweaver -- MX New icons are added in MX Most of the features commonly used in web design, and are same as FrontPage. New feature.
CSS – Presentation of Information. Types of Style Sheets External Embedded h1{color:red; font-family: Arial;} Inline Text is here.
Neal Stublen Course Road Map  Create web page layouts using CSS  Manage CSS  Test website validity  Create navigation menus using.
 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.
 Remember that HTML is just text  Need to point to pictures  Use the img tag  alt: › screen reader › REQUIRED for this class and to validate.
CS134 Web Design & Development Cascading Style Sheets (CSS) Mehmud Abliz.
CLASSES REVIEW: HREF, CONTEXT, FILE STRUCTURE. BIG CAVEAT Never cut and paste from a Powerpoint slide Punctuation is not the same Note that the “ is curly.
ECA225 Applied Interactive Programming Cascading Style Sheets, pt 1 ECA 225 Applied Online Programming.
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.
Cascading Style Sheets CSS.  Standard defined by the W3C  CSS1 (released 1996) 50 properties  CSS2 (released 1998) 150 properties (positioning)  CSS3.
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.
Understanding CSS Cascading Style Sheets control the presentation of content in HTML pages Style Sheets separate formatting from the content –Styles defined.
Selective Formatting. Auto Grader Multiple selectors  May use the same formatting for two elements h1, h2 { font-family: cursive; }  Maintains consistency.
 Add one element at a time  If it doesn’t do what you want, › Delete it › DON’T just keep piling on more items.
ECA 228 Internet/Intranet Design I Cascading Style Sheets.
NAVIGATION USING HTML TO SET UP THE BASIC STRUCTURE OF A NAV BAR.
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.
Web Development & Design Foundations with XHTML
Google fonts CSS box model
CSS Layouts: Grouping Elements
CSS: Cascading Style Sheets
>> Introduction to CSS
Cao Yuewen SEEM4570 Tutorial 03: CSS Cao Yuewen
>> CSS Rules Selection
Breaking the mold with CSS
Box model.
Intro to CSS CS 1150 Fall 2016.
Introduction to web design discussing which languages is used for website designing
Cascading Style Sheets
CSS.
COMP 101 Review.
IS333: MULTI-TIER APPLICATION DEVELOPMENT
Website Design 3
Intro to CSS CS 1150 Spring 2017.
Styles and the Box Model
Google Fonts Selective Formatting
Laying out a website using CSS and HTML
Fixed Positioning.
CSS Box Model.
MORE Cascading Style Sheets (The Positioning Model)
DynamicHTML Cascading Style Sheet Internet Technology.
CS134 Web Design & Development
Introduction to Cascading Style Sheets (CSS)
DynamicHTML Cascading Style Sheet Internet Technology.
Some Stuff You Need to Know
Web Design and Development
Exercise 9 Skills You create and use styles to create formatting rules that can easily by applied to other pages in the Web site. You can create internal.
Web Design & Development
CSS and Class Tools.
Laying out Elements with CSS
Multipage Sites.
Cascading Style Sheets
CS332A Advanced HTML Programming
Presentation transcript:

Display Property

DISPLAY: BLOCK

Forcing a box (block) model Note all elements are defined as blocks Examples not: Cite, em, strong Want them to flow with the text Display: block starts a new line

DISPLAY: TABLE

Letting the browser help Remember that we need a size to be able to center In the case of the list, we didn’t know what it was But the computer does! display: table

DISPLAY: INLINE

List items Start new lines: blocks! We can change that! display: inline Creates horizontal list Defaults to no bullets

Selective Formatting

Formatting by section Paragraph in each section may want to look different Smaller in header or footer Lists No bullets In a line Different spacing

Selecting one of several definitions for the same tag Name the context in the css by using a space Any div with the class of center can look like this. header p { text-align: center; } footer p { text-align: right;

Multiple Styles: Classes HTML: class=“name” Use names to imply content, not style Multiple ways to define Style that applies to only one element Style that applies to many elements

Class for one element Name the declaration set for a specific selector (tag) HTML: class=“name” CSS: tag.name Any div with the class of center can look like this. div.intro{ text-align: center; } <div class=“intro”> </div>

Class for many elements HTML: class=“name” CSS: .name Particularly useful for maintaining consistency .intro{ text-align: center; color: red; } <h1 class=“intro”>Header 1</h1> <h2 class=“intro”>Header 2</h2>

Nested Selector Only applies within context Avoids putting class= everywhere! Useful for formatting lists HTML: class=“name” only for encompassing CSS: tag.name tag ul.horizontal { list-style-type: none; } ul.horizontal li { display: inline;

Inheritence Some times multiple formatting applies Formatting with no classes or scope Formatting with a class or scope When the second applies, BOTH APPLY Override Additive