Svetlin Nakov Telerik Web Design Course html5course.telerik.com Manager Technical Training

Slides:



Advertisements
Similar presentations
LIS650 lecture 4 Thomas Krichel today CSS Properties –Box properties-- List properties –Table properties-- Classification properties –(Audio.
Advertisements

LIS650 lecture 4 Thomas Krichel today Advice CSS Properties –Box properties –List properties –Classification properties Fun with selectors.
Week 10 Creating Positioned Layouts
© 2011 Delmar, Cengage Learning Chapter 10 Positioning Objects with AP Divs.
15 LAYOUT Controlling the position of elements Creating site layouts Designing for different sized screens.
1 Cascading Style Sheets Continued Different kinds of selectors in a style sheet –Simple- Pseudo-Class –Contextual- Pseudo-Element –Class Image Styles.
CSS Layout Crash Course An Advance CSS Tutorial. Inline vs. Block Many HTML elements have a default display setting of Block. Block elements take up the.
Part 5 Introduction to CSS. CSS Display - Block and Inline Elements A block element is an element that takes up the full width available, and has a line.
With CSS, a color is most often specified by: a HEX value - like "#ff0000" an RGB value - like "rgb(255,0,0)" a color name - like "red“ Example h1.
Floating Elements CS380.
Using CSS for Page Layout. Types of HTML Elements Block-Level Element –Creates blocks of content e.g. div, h1..h6, p, ul, ol, li, table, form –They start.
CSS, cont. October 12, Unit 4. Creating a Sidebar We know how to create a sidebar –Use the float property div#sidebar{ float: left; } Item1 Item2 Item3.
XP 1 Working with Cascading Style Sheets Creating a Style for Online Scrapbooks Tutorial 7.
FOR NEXT WEEK’S CLASS BECAUSE I SAID SO. THAT IS MY FINAL ANSWER. NO IFS, ANDS, OR BUTS. (INSERT OTHER AFFIRMATIVES HERE) GET UGCS.
MORE Cascading Style Sheets (The Positioning Model)
Working with Cascading Style Sheets. 2 Objectives Introducing Cascading Style Sheets Using Inline Styles Using Embedded Styles Using an External Style.
CSS to Know And this is just the beginning. What to What?  Tags = regular HTML  Ids = #id, only one hashtag per page  Class =.class, many as you want.
CSS (Cascading Style Sheets): How the web is styled Create Rules that specify how the content of an HTML Element should appear. CSS controls how your web.
1 The Structure of a Web Table beginning of the table structure first row of three in the table end of the table structure table cells You do not need.
Web Development & Design Foundations with XHTML Chapter 6 Key Concepts.
Working with Cascading Style Sheets. Introducing Cascading Style Sheets Style sheets are files or forms that describe the layout and appearance of a document.
XP Tutorial 7New Perspectives on Creating Web Pages with HTML, XHTML, and XML 1 Working with Cascading Style Sheets Creating a Style for Online Scrapbooks.
Tutorial 4: Using CSS for Page Layout. 2 Objectives Session 4.1 Explore CSS layout Compare types of floating layouts Examine code for CSS layouts View.
New Perspectives on XML, 2nd Edition Tutorial 5 1 TUTORIAL 5 WORKING WITH CASCADING STYLE SHEETS.
XP New Perspectives on XML Tutorial 5 1 TUTORIAL 5 CSS Tutorial – Carey ISBN
Cascading Style Sheets CSS. CSS Positioning Normal Flow Top -> bottom | left -> right Arranged in the order they appear in the code make room for one.
Cascading Style Sheets CSS. div … Used like a container to group content Gives context to the elements in the grouping Give it a descriptive name with.
Technologies for web publishing Ing. Václav Freylich Lecture 7.
Cascading Style Sheets. Defines the presentation of one or more web pages Similar to a template Can control the appearance of an entire web site giving.
CSS Netcentric. What is CSS O CSS stands for Cascading Style Sheets O Styles define how to display HTML elements O Styles were added to HTML 4.0 to solve.
Neal Stublen Course Road Map  Create web page layouts using CSS  Manage CSS  Test website validity  Create navigation menus using.
 Website development process  CSS  Javascript.
CSS = Cascading Style Sheet CSS consists of rules to display, style and decorate HTML elements Why CSS ? – Separate decoration from HTML markup (Ex :,,…)
Doncho Minkov Telerik Web Design Course html5course.telerik.com Technical Trainer
Floating Elements CS The CSS float property (reference) 2 img.headericon { float: right; width: 130px; } CSS  removed from normal document flow;
CSS Layout Arrangement and Positioning of the HTML Elements Svetlin Nakov Technical Trainer Software University
Svetlin Nakov Telerik Corporation
XP Review 2 New Perspectives on JavaScript, Comprehensive1 Introducing Cascading Style Sheets Formatting Web Pages with CSS.
THE BOX MODEL Putting layouts together with CSS. The Box Model  How would you describe a box?  Container?  Tags or elements are “containers”  puts.
Layout with Styles Castro Chapter 11. Tables vs. CSS You can produce “liquid layouts” (layouts that stretch as the browser is resized) using tables or.
Cascading Style Sheets Positioning Controls Visibility.
CSS Layout Cascading Style Sheets. Lesson Overview  In this lesson, you will learn:  float & clear  display & visibility.
CNIT 132 – Week 4 Cascading Style Sheets. Introducing Cascading Style Sheets Style sheets are files or forms that describe the layout and appearance of.
Web Foundations MONDAY, OCTOBER 7, 2013 LECTURE 7: CSS LINK COLORS, INTERMEDIATE CSS.
Cascading Style Sheets Positioning Controls Visibility.
Cascading Style Sheets (CSS) Part II IT210: Web-based IT.
CSS Layout Arrangement and Positioning of the HTML Elements SoftUni Team Technical Trainers Software University
CSS Positioning & Layout Creating layouts and controlling elements.
MTA EXAM HTML5 Application Development Fundamentals.
CONTROLLING Page layout
Tutorial 4 Creating Page Layouts with CSS
Department of Computer Science, Florida State University CGS 3066: Web Programming and Design Spring 2016 CSS Positioning 1.
THE NORMAL DOCUMENT FLOW from Quick Tip: Utilizing Normal Document Flow by Alex Rodrigues on Web tuts.
Understanding CSS Cascading Style Sheets control the presentation of content in HTML pages Style Sheets separate formatting from the content –Styles defined.
Laying out Elements with CSS
Cascading Style Sheets Layout
CSS Layouts: Positioning and Navbars
CSS Layouts: Grouping Elements
Cascading Style Sheets
Floating & Positioning
The Internet 10/25/11 XHTML Tables
Objectives Create a reset style sheet Explore page layout designs
MORE Cascading Style Sheets (The Positioning Model)
HTML – Organizing Page Content
HTML – Organizing Page Content
Cascading Style Sheets
Floating and Positioning
Positioning Boxes Using CSS
CGS 3066: Web Programming and Design Fall 2019 CSS Part 2
Presentation transcript:

Svetlin Nakov Telerik Web Design Course html5course.telerik.com Manager Technical Training

 Positioning  Positioning inline elements  Floating  Left and right  Clearing  Opacity  Visibility  Display 2

3

 position : defines the positioning of the element in the page content flow  The value is one of:  static (default)  relative – relative position according to where the element would appear with static position  absolute – position according to the innermost positioned parent element  fixed – same as absolute, but ignores page scrolling 4

 Margin VS relative positioning  Fixed and absolutely positioned elements do not influence the page normal flow and usually stay on top of other elements  Their position and size is ignored when calculating the size of parent element or position of surrounding elements  Overlaid according to their z-index  Inline fixed or absolutely positioned elements can apply height like block-level elements 5

 top, left, bottom, right : specifies offset of absolute/fixed/relative positioned element as numerical values  z-index : specifies the stack level of positioned elements  Understanding stacking context 6 Each positioned element creates a stacking context. Elements in different stacking contexts are overlapped according to the stacking order of their containers. For example, there is no way for #A1 and #A2 (children of #A) to be placed over #B without increasing the z-index of #A.

Live Demo positioning-rules.html

 vertical-align : sets the vertical-alignment of an inline element, according to the line height  Values: baseline, sub, super, top, text-top, middle, bottom, text-bottom or numeric  Also used for content of table cells (which apply middle alignment by default) 8

Live Demo alignments-and-z-index-rules.html

 float : the element “floats” to one side  left : places the element on the left and following content on the right  right : places the element on the right and following content on the left  floated elements should come before the content that will wrap around them in the code  margins of floated elements do not collapse  floated inline elements can apply height 11

 How floated elements are positioned 12

 clear  Sets the sides of the element where other floating elements are NOT allowed  Used to "drop" elements below floated ones or expand a container, which contains only floated children  Possible values: left, right, both  Clearing floats  additional element ( ) with a clear style 13

 Clearing floats (continued)  :after { content: ""; display: block; clear: both; height: 0; }  Triggering hasLayout in IE expands a container of floated elements  display: inline-block;  zoom: 1; 14.clear{zoom:1}.clear:after{content:""; display:block; height:0; clear:both}

Live Demo float-rules.html

 opacity : specifies the opacity of the element  Floating point number from 0 to 1  For old Mozilla browsers use –moz-opacity  For IE use filter:alpha(opacity=value) where value is from 0 to 100; also, "binary and script behaviors" must be enabled and hasLayout must be triggered, e.g. with zoom:1 17

Live Demo opacity-rule.html

 visibility  Determines whether the element is visible  hidden : element is not rendered, but still occupies place on the page (similar to opacity:0 )  visible : element is rendered normally 20

Live Demo visibility-rule.html

 display : controls the display of the element and the way it is rendered and if breaks should be placed before and after the element  inline : no breaks are placed before and after ( is an inline element)  block : breaks are placed before AND after the element ( is a block element) 23

 display : controls the display of the element and the way it is rendered and if breaks should be placed before and after the element  none : element is hidden and its dimensions are not used to calculate the surrounding elements rendering (differs from visibility: hidden !)  There are some more possible values, but not all browsers support them  Specific displays like table-cell and table-row 24

Live Demo display-rule.html

Questions?

27 1. Create the following Web page using HTML and external CSS. Using tables, inline styles and deprecated tags is not allowed.

28 2. Create the following Web page using external CSS styles. Buttons should consist of PNG images with text over them.

29 3. Create the following Web page using HTML with external CSS file. Note that the images should be PNG with transparent background.

4. Given the picture below create the Web site  Use CSS and HTML 5 30

5. Create the following HTML 5 Page  Do it without tables 31