CSS Layouts: Positioning and Navbars

Slides:



Advertisements
Similar presentations
15 LAYOUT Controlling the position of elements Creating site layouts Designing for different sized screens.
Advertisements

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.
Quiz #3 - CSS Lecture Code: Get Neighbors’ URLs for MP1
Cascading Style Sheets
Copyright © Terry Felke-Morris WEB DEVELOPMENT & DESIGN FOUNDATIONS WITH HTML5 Chapter 6 Key Concepts 1 Copyright © Terry Felke-Morris.
Copyright © Terry Felke-Morris WEB DEVELOPMENT & DESIGN FOUNDATIONS WITH HTML5 Chapter 6 Key Concepts 1 Copyright © Terry Felke-Morris.
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.
User Interface Design using jQuery Mobile CIS 136 Building Mobile Apps 1.
Web Development & Design Foundations with XHTML Chapter 7 Key Concepts.
Session 4: CSS Positioning Fall 2006 LIS Web Team.
SM5312 week 11: CSS Menus & Navigation Bars1 An Introduction to Cascading Style Sheets CSS Menus and Navigation Bars Nick Foxall.
Advance CSS (Menu and Layout) Miftahul Huda. CSS Navigation MENU It's truly remarkable what can be achieved through CSS, especially with navigation menus.
Navigation Bars Level 2 Extended Certificate Unit B12 Doing Business Online.
Class four: the box model and positioning. is an HTML tag which allows you to create an element out of inline text. It doesn’t mean anything! try it:
Tutorial 6 Creating Fixed-Width Layouts
Session 4: CSS Positioning Fall 2009 LIS Web Team.
MORE Cascading Style Sheets (The Positioning Model)
ADVANCED CSS: (LAYERED) DISPLAY & PRESENTATION PA 70b – Giordon Stark.
Web Development & Design Foundations with XHTML Chapter 6 Key Concepts.
Page Layout & Mobile Web Using columns, grid systems, etc… to layout sites for desktops and mobile.
Neal Stublen Course Road Map  Create web page layouts using CSS  Manage CSS  Test website validity  Create navigation menus using.
 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.
Week 8 – Part 2 Page Layout Basics Key Concepts 1.
Course created by Sarah Phillips BBCD Melbourne BAPDCOM Version 1 – April 2013.
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.
Internet Technology Dr Jing LU Updated Dr Violet Snell / Dr Kalin Penev 1 Internet Technology (week 6)  Recap: Validating HTML  Page Layout.
CSS Layout Cascading Style Sheets. Lesson Overview  In this lesson, you will learn:  float & clear  display & visibility.
CONTROLLING Page layout
Understanding CSS Cascading Style Sheets control the presentation of content in HTML pages Style Sheets separate formatting from the content –Styles defined.
Creating a Google Site For a Digital Portfolio Purpose.
CSS Layout Cascading Style Sheets. Lesson Overview  In this lesson, we’ll cover:  Brief CSS review  Creating sections with the tag  Creating inline.
CHAPTER 15 Floating and Positioning. FLOAT VS. POSITION  Floating an element moves it to the left or right, allowing the following text to wrap around.
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.
Laying out Elements with CSS
Cascading Style Sheets Layout
Web Development & Design Foundations with XHTML
Create and edit web pages 4
CSS Layouts: Grouping Elements
Webpage layout using CSS
Floating & Positioning
Advanced CSS BIS1523 – Lecture 20.
Cascading Style Sheets (Layout)
Putting Things Where We Want Them
CS3220 Web and Internet Programming Page Layout with CSS
CS3220 Web and Internet Programming Page Layout with CSS
>> CSS Layouts.
Web Development & Design Foundations with HTML5 7th Edition
Chapter 7 Page Layout Basics Key Concepts
Web Development & Design Foundations with HTML5 8th Edition
Web Development & Design Foundations with HTML5
The Internet 10/25/11 XHTML Tables
Basics of Web Design Chapter 7 Page Layout Basics Key Concepts
Styles and the Box Model
Fixed Positioning.
Controlling Layout with Style Sheets
MORE Cascading Style Sheets (The Positioning Model)
DynamicHTML Cascading Style Sheet Internet Technology.
Web Development & Design Foundations with H T M L 5
DynamicHTML Cascading Style Sheet Internet Technology.
Web Development & Design Foundations with HTML5
Floating and Positioning
CS3220 Web and Internet Programming Page Layout with CSS
Web Development & Design Foundations with XHTML
Web Development & Design Foundations with HTML5
Multipage Sites.
The Internet 10/20/11 CSS Layout
CSc 337 Lecture 5: Grid layout.
Positioning Boxes Using CSS
CGS 3066: Web Programming and Design Fall 2019 CSS Extra
Presentation transcript:

CSS Layouts: Positioning and Navbars

Position: Normal The position property is used to specify a positioning scheme for an element. The default is "static" which puts the element in the "normal" flow. In normal flow, inline boxes flow from left to right, wrapping to next line when needed.

Position: Normal In normal flow, block boxes flow from top to bottom, making a new line after every box.

Position: Relative The "relative" value will still put the element in the normal flow, but then offset it according to top/left/right/bottom properties.

Position: Absolute The "absolute" value will take the element out of the normal flow and position it in relation to the window (or the closest non-static element).

z-Index: The z-index property specifies the stack order of positioned elements, in the case that they are overlapping. The element with highest z-index goes on top.

Float: The float property is used to float boxes on the sides of other boxes, allowing other content to flow around it. First used to wrap text around images. Image

Float: The float property can also be used to float non-IMG elements, but make sure to specify a width for the floated element.

Clear: The clear property can be used to specify that an element should *not* wrap around floated elements above it.

Optional Page Layout Exercise: Copy the style of the webpage to the right Add a div for all of the content. Add styles to that div so it is centered on the page and has appropriate border and padding. Add a div for the header (the logo). Add styles to that div so the image is centered. Add a div for the footer links. Add styles to that div so that the links are centered and it has appropriate border, padding, and margin. Add a div for the locations list. Add styles to that div so that it floats to the right and has appropriate border, padding, and color.

Navigation Bars: Using CSS we can create Navigation Bars using Unordered lists. List items are block items naturally. If we switch the list items to inline elements then all the items will be lined up next to each other Also you must make the attribute “list-type-style:none” so the bullets don’t appear for you <li> elements. You must also make each list item a hyperlink so when you click the item it will go the desired webpage or site.

Example Navigation Bar HTML:

Example Navigation Bar CSS: Link this CSS code with the HTML on the previous page and you will have a simple navigation bar. Try understanding the different CSS attributes combination that make up this simple navigation bar. You can look at more examples of navigation bars on w3schools. You will use a navigation bar on your final project!

Final Project: Over the next couple of classes we will be creating a multi-page website. Think of an idea/topic you that you would like to be the basis of your website. You are going to create 4 separate HTML files that will be linked its own specific CSS files. Think about the features and design elements that you would like to have on each webpage when designing each webpage. Think of features you would like to have but not have learned yet. You may have to compromise but that’s okay. You will choose a theme for your website and all of your webpages must be centered around the theme you chose.

Final Project Requirements: The main requirement is that you have a navigation bar on each page of your website. My advice to you is to male the 4 HTML pages immediately and set up the navigation bars on each page. Add the content to each individual page after that. You will be mainly graded on effort and creativity put into this project. Try to impress me! When you believe you are finished your website I will grade it and that will be the grade for your final.