Web Design (17) CSS Box Element (2). ‘Box’ Web Site (1) Insert a navigation bar into the index.html file and create links to ‘index.html’, ‘pageone.html’

Slides:



Advertisements
Similar presentations
Use Tables for Layout Control Day 7. You will learn to: Understand Tables Create a Simple Table Modify Your Tables Appearance Create Page Layouts with.
Advertisements

Chapter 3 – Web Design Tables & Page Layout
J ENWARE Chapters 14 & 15 Learning Web Design, Fourth Edition by Jennifer Niederst Robbins Copyright © 2012.
CSS Menus and Rollovers. Agenda foil Separating style from content 3 pages in one file Rollovers in CSS Horizontal drop-downs Vertical drop-downs.
กระบวนวิชา CSS. What is CSS? CSS stands for Cascading Style Sheets Styles define how to display HTML elements Styles were added to HTML 4.0 to.
Today’s objectives Site performance Padding, Margins, Borders
Tutorial 4: Creating page layout with css
Tutorial 5 Working with the Box Model. XP Objectives Understand the box model Create padding, margins, and borders Wrap text around an image Float a block-level.
CSS: Class 1 Background Images, Controlling Position of Background Images, Add Padding to Page Elements, Add Borders to Elements on a Page.
Basics of Web Design Chapter 6 More CSS Basics Key Concepts.
 CSS Presentation and layout is based on the CSS Box Model.  The CSS Box Model states that every element on a page is a rectangular box.  This includes:
Basics of Web Design Chapter 6 More CSS Basics Key Concepts 1.
Chapter 7 Using Advanced Cascading Style Sheets HTML5 & CSS 7 th Edition.
An Introduction to Cascading Style Sheets CSS Layout, and the CSS Box Model Nick Foxall SM5312 week 9: CSS Layout.
Creating Tables in a Web Site Using an External Style Sheet HTML5 & CSS 7 th Edition.
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.
Slide 1 of 83 Table Borders To specify table borders in CSS, use the border property. The example below specifies a black border for table, th, and td.
Tutorial 6 Creating Tables and CSS Layouts. Objectives Session 6.1 – Create a data table to display and organize data – Modify table properties and layout.
INTRODUCTION TO HTML5 Styling with CSS3. Round Border Corners  You can modify any element that supports the border property and render rounded borders.
1 What is CSS?  CSS stands for Cascading Style Sheets  Styles define how to display HTML elements  Styles are normally stored in Style Sheets  Styles.
Today’s objectives  Assignment 1  Padding, Margins, Borders  Fluid Layout page  Building accessible Table  Element size with padding and border 
Domain 3 Understanding the Adobe Dreamweaver CS5 Interface.
Tutorial 8 Enhancing a Web Site with Advanced CSS
COMP213 – Web Interface Design
HTML, CSS, and XML Tutorial 8 Enhancing a Web Site with Advanced CSS.
Tutorial #6 – Creating Fixed Width Layouts. Tutorial #5 Review – Box Model Every html element is surround by a box Content, Padding, Border, Margin Can.
Chapter 5 Quick Links Slide 2 Performance Objectives Understanding Framesets and Frames Creating Framesets and Frames Selecting Framesets and Frames Using.
Gdes2000 Graphic Design for Internet & MM Dreamweaver: Simple page construction with DIVs.
Copyright © Terry Felke-Morris WEB DEVELOPMENT & DESIGN FOUNDATIONS WITH HTML5 Chapter 6 Key Concepts 1 Copyright © Terry Felke-Morris.
INTRODUCTORY Tutorial 5 Using CSS for Layout and Printing.
11/12/2015 Box Model Reed Crouch. 11/12/2015  HTML elements can be considered as boxes. In CSS, the term "box model" is used when referring to layout.
CONTROLLING Page layout
1 Creating Links Lesson 2. 2 In the center column type : Home | Order Now | Contact Us This is the navigation button which will link to the other pages.
1 HTML Tables. 22 Objectives You will be able to Create tables in HTML.
Coding with HTML {. THE BASICS { What is HTML and how can you use it to make websites?
 Add one element at a time  If it doesn’t do what you want, › Delete it › DON’T just keep piling on more items.
Tutorial #5 Working with the Box Model. Tutorial #4 Review - CSS Create a homework page Final Project Discussion Exam on Blackboard Styling Lists (List-style-type,
Chapter 7.  Change body and link styles  Create a drop-down menu  Change color and font styles in the menu  Create a pop-up effect using CSS  Utilize.
HTML & CSS Contents: the different ways we can use to apply CSS to The HTML documents CSS Colors and Background CSS Fonts CSS Text CSS box model: padding,
Mimi Opkins.  One of the major benefits of using CSS is that you’re not forced to lay your sites out in tables.  The layout possibilities of CSS give.
CSS.
Laying out Elements with CSS
Web Development & Design Foundations with HTML5 8th Edition
The Box Model in CSS Web Design – Sec 4-8
Cascading Style Sheets Boxes
Formatting Text with CSS
CSS Layouts: Positioning and Navbars
CSS Layouts: Grouping Elements
>> The “Box” Model
Creating Page Layouts with CSS
Advanced CSS BIS1523 – Lecture 20.
The Box Model in CSS Web Design – Sec 4-8
BOX DIMENSIONS width, height div { height: 300px; width: 400px; background-color: #ee3e80;} p { height: 75%; width: 75%; background-color:
Chapter 6 More CSS Basics Key Concepts
Objectives Create a figure box Add a background image
Basics of Web Design Chapter 6 More CSS Basics Key Concepts
Styles and the Box Model
Fixed Positioning.
Controlling Layout with Style Sheets
CSS Borders and Margins.
Putting Images on Your Web Page
HTML5 Level I Session III
HTML5 Level I Session III
Box model, spacing, borders, backgrounds
DREAMWEAVER MX 2004 Chapter 3 Working with Tables
Basics of Web Design Chapter 6 More CSS Basics Key Concepts
Start: Photoshop Elements
Floating and Positioning
CSS Boxes CS 1150 Fall 2016.
ITI 133: HTML5 Desktop and Mobile Level I
Presentation transcript:

Web Design (17) CSS Box Element (2)

‘Box’ Web Site (1) Insert a navigation bar into the index.html file and create links to ‘index.html’, ‘pageone.html’ and ‘pagetwo.html’ (2) Now save the index.html file as ‘pageone.html’ and then as ‘pagetwo.html’ (3) Check that navigation between the pages works. (Try to put into your index page all that will be common to all your html pages, before ‘saving as’)

Rounded corners with border-radius (1) As with other properties, there are individual corner properties as well as a border-radius shorthand Try some of these in your ‘box’ web site: border-radius: 10px; border-radius: 50px; border-radius: 5px 20px 40px 60px; border-top-right-radius: 30px; border-bottom-left-radius: 50px;

Rounded corners with border-radius (2) So far, the corners we’ve made are sections for perfect circles, But you can also make a corner elliptical by specifying two values: The first for horizontal radius and the second for vertical radius. e.g. border-top-right-radius: 100px 50px; border-top-left-radius: 100px 50px; Try these out in your ‘box’ web site.

Rounded corners with border-radius (3) If you want to use the shorthand property, the horizontal and vertical radii get separated by a slash: e.g. border-radius: 60px / 40px;

Margins (1) The last remaining component of the element box is its margin, Which is an optional amount of space that you can add on the outside of the border. Margins keep elements from bumping into one another or the edge of the browser window.

Margins (2) The side-specific and shorthand margin properties work much like the padding properties. Some examples: Margin: 15px; Margin-top: 5px; margin-bottom: 5px; Margin: 5px 10px 5px 10px;

Margins (3) ‘Collapsing margins’ – something to be aware of! The top and bottom margins of neighbouring elements ‘collapse’. So, if the top element has a bottom margin of 4px and the following element has a top margin of 2px, the resulting space will not be 6px, but only the larger of the two values – 4px. (Note: This does not happen to the left and right sides.)

Drop Shadows (1) You’ve learned about the text-shadow property, which adds a drop shadow to text. The box-shadow property applies a drop shadow around the entire visible element box (excluding the margin)

Drop Shadows (2) As with text-shadow, you can specify the horizontal and vertical offset distances, the amount the shadow should blur and a color. For box-shadows, you can also specify a spread amount, which increases (or decreases with negative values) the size of the shadow.

Drop Shadows (3) Three examples to try out: box-shadow: 6px 6px #666; (adds 6px of shadow to the right and down, without blur or spread) box-shadow: 6px 6px 5px #666; (adds blur value of 5px to the above) box-shadow: 6px 6px 5px 10px #666; (adds a 10px spread value to the above)

Drop Shadows (4) You can also make the shadow render inside the edges of the visible element by adding the inset keyword. Try the following adjustment to the above code: box-shadow: inset 6px 6px 5px #666;

Drop Shadows (5) Finally, just one word of warning: box- shadows and text-shadows take a lot of processor power, so use them sparingly in order to avoid the slower performance of your web pages.

Exercise From what you have just learned, now experiment with: ‘border-radius’, ‘margins’ and ‘drop shadows’ in your ‘box’ web site. (Notice that changes made in the external ‘box.css’ file change the look of all the html pages.)