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

Similar documents
GIMP WEB 2.0 MENUS. Web 2.0 Menus: Horizontal Navigation Bar

GIMP WEB 2.0 MENUS. Web 2.0 Menus: Horizontal Navigation Bar with Dynamic Background Image

<style type="text/css"> <!-- body {font-family: Verdana, Arial, sans-serif} ***set font family for entire Web page***

GIMP WEB 2.0 MENUS. Before we begin this tutorial let s visually compare a standard navigation bar and a web 2.0 navigation bar.

Create a Web Page with Spry Navigation Bar. March 30, 2010

AGENDA :: MULTIMEDIA TOOLS :: (1382) :: CLASS NOTES

Lesson 5 Introduction to Cascading Style Sheets

NAVIGATION INSTRUCTIONS

GIMP WEB 2.0 MENUS. Web 2.0 Menus: Horizontal Navigation Bar. Hover Effect:

CSS worksheet. JMC 105 Drake University

Web Design and Development ACS Chapter 11. Creating Lists 11/16/2017 1

Web Engineering CSS. By Assistant Prof Malik M Ali

Web Design and Development Tutorial 03

Creating a Navigation Bar with a Rollover Effect

CSS Cascading Style Sheets

Designing the Home Page and Creating Additional Pages

Zen Garden. CSS Zen Garden

Module 2 (VII): CSS [Part 4]

Using Dreamweaver. 6 Styles in Websites. 1. Linked or Imported Stylesheets. 2. Embedded Styles. 3. Inline Styles

Unit 10 - Client Side Customisation of Web Pages. Week 5 Lesson 1 CSS - Selectors

HTML & CSS Cheat Sheet

Make a Website. A complex guide to building a website through continuing the fundamentals of HTML & CSS. Created by Michael Parekh 1

CSS. Selectors & Measurments. Copyright DevelopIntelligence LLC

CMPT 165 INTRODUCTION TO THE INTERNET AND THE WORLD WIDE WEB

CS 350 Internet Applications I Name: Exam II (CSS) October 29, 2013

COMP519 Web Programming Lecture 6: Cascading Style Sheets: Part 2 Handouts

recall: a Web page is a text document that contains additional formatting information in the HyperText Markup Language (HTML)

Block & Inline Elements

Cascading Style Sheets

ADDING CSS TO YOUR HTML DOCUMENT. A FEW CSS VALUES (colour, size and the box model)

The default style for an unordered (bulleted) list is the bullet, or dot. You can change the style to either a square or a circle as follows:

Introduction to CSS. 2 Sep 13. Derek Peacock. An introduction to defining CSS style rules using tags, classes and ids.

Assignments (4) Assessment as per Schedule (2)

KillTest *KIJGT 3WCNKV[ $GVVGT 5GTXKEG Q&A NZZV ]]] QORRZKYZ IUS =K ULLKX LXKK [VJGZK YKX\OIK LUX UTK _KGX

Teach Yourself HTML5 & CSS 3: Week 5 Task 13 - Anchors Part 3

Networks and Web for Health Informatics (HINF 6220) Tutorial 8 : CSS. 8 Oct 2015

3.1 Introduction. 3.2 Levels of Style Sheets. - The CSS1 specification was developed in There are three levels of style sheets

- The CSS1 specification was developed in CSS2 was released in CSS2.1 reflects browser implementations

2005 WebGUI Users Conference

Lesson 1 HTML Basics. The Creative Computer Lab. creativecomputerlab.com

CSS.

5 Snowdonia. 94 Web Applications with C#.ASP

Cascading Style Sheets (CSS)

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

Programmazione Web a.a. 2017/2018 HTML5

Styles, Style Sheets, the Box Model and Liquid Layout

Using Advanced Cascading Style Sheets

Using Dreamweaver CC. 6 Styles in Websites. Exercise 1 Linked Styles vs Embedded Styles

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

HTML Summary. All of the following are containers. Structure. Italics Bold. Line Break. Horizontal Rule. Non-break (hard) space.

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

BIM222 Internet Programming

Chapter 1 Getting Started with HTML 5 1. Chapter 2 Introduction to New Elements in HTML 5 21

Cascading Style Sheets CSCI 311

Page Layout Using Tables

A Balanced Introduction to Computer Science, 3/E

Deccansoft Software Services

Lecture 10. CSS Properties. Mr. Mubashir Ali Lecturer (Dept. of Computer Science)

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

Using Dreamweaver CS6

Cascading Style Sheet. Styles as Tag Attributes. Syntax. <h1>: what font type/size is used? STYLE = SELECTOR {RULES} Attributes such as bgcolor

Guidelines for doing the short exercises

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

DAY 4. Coding External Style Sheets

- The CSS1 specification was developed in CSSs provide the means to control and change presentation of HTML documents

Chapter 7 BMIS335 Web Design & Development

Three Ways to Use CSS:

WEBSITE PROJECT 2 PURPOSE: INSTRUCTIONS: REQUIREMENTS:

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

Cascading Style Sheets Level 2

Creating a CSS driven menu system Part 1

COMS 359: Interactive Media

CSS. M hiwa ahamad aziz Raparin univercity. 1 Web Design: Lecturer ( m hiwa ahmad aziz)

Session 3.1 Objectives Review the history and concepts of CSS Explore inline styles, embedded styles, and external style sheets Understand style

Final Exam Study Guide

7300 Warden Avenue, Suite 503 Markham, Ontario Canada L3R 9Z6. Phone: Toll Free: Fax:

CSS Design and Layout Basic Exercise instructions. Today's exercises. Part 1: Arrange Page into Sections. Part 1, details (screenshot below)

Using Dreamweaver to Create Page Layouts

HTML and CSS a further introduction

Fundamentals of Web Technologies. Agenda: HTML Links 5/22/2017. HTML Links - Hyperlinks HTML Lists

CSS Cascading Style Sheets

Hyper Text Markup Language HTML: A Tutorial

Downloads: Google Chrome Browser (Free) - Adobe Brackets (Free) -

CSC 121 Computers and Scientific Thinking

HTMLnotesS15.notebook. January 25, 2015

CSS: The Basics CISC 282 September 20, 2014

Creating and Building Websites

Introduction to WEB PROGRAMMING

THE HITCHHIKERS GUIDE TO HTML


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

The internet is a worldwide collection of networks that link millions of computers. These links allow the computers to share and send data.

Introduction to using HTML to design webpages

READSPEAKER ENTERPRISE HIGHLIGHTING 2.5

CSS: Beyond the Code. Karen Perone Rodman Public Library.

<body bgcolor=" " fgcolor=" " link=" " vlink=" " alink=" "> These body attributes have now been deprecated, and should not be used in XHTML.

CSS MOCK TEST CSS MOCK TEST III

Media Stylesheets and Navigation with CSS goodness. Webpage Design

8a. Cascading Style Sheet

COMP519 Web Programming Lecture 7: Cascading Style Sheets: Part 3 Handouts

Transcription:

GIMP WEB 2.0 MENUS Web 2.0 Menus: Horizontal Navigation Bar WEB 2.0 MENUS: HORIZONTAL NAVIGATION BAR Hover effect: CREATING AN HTML LIST Most horizontal or vertical navigation bars begin with a simple unordered list <ul> tag and the hyperlinks as list items <li> tags. Step 1: In a text editor, create an html file with the <html>, <head>, <title>, </title>, </head>, <body>, </body>, and </html> tags and save as horizontal_navigation_bar.html in the PortableApps/GIMP/menus/ folder. Step 2: Between the beginning and ending <body> tags, type <ul id = nav_bar > <li><a href = # >Home</a></li> <li><a href = # >About Us </a></li> Web 2.0 Menus Horizontal Navigation Bar Page 1 of 8

<li><a href = # >Services</a></li> <li><a href = # >Blog</a></li> <li><a href = # >Contact Us</a></li> </ul> Step 3: Save with the same name in the same folder. Step 4: View in a browser. STYLING THE UNORDERED LIST WITH A CASCADING STYLE SHEET The links are then styled with Cascading Style Sheets (CSS). The following instructions use an embedded style in the <head> section of the html file, but you may prefer to create a separate css file. Step 1: Between the beginning and ending <head> tags in the html file, add a style section as shown below and add the two style definitions. </title> <style> </head> </style> Step 2: Between the beginning and ending <style> tags insert two style definitions to style the unordered list with an id value of nav_bar to define a width for the nav_bar and remove the bullets before each list item: <style> ul#nav_bar Web 2.0 Menus Horizontal Navigation Bar Page 2 of 8

width: 700px; list-style:none; </style> Step 3: A list is a block style element, which means that the items in the list display in a vertical list with a return between each list item (as shown above). Since you want the list items to display in a horizontal navigation bar, you will want to change the style of the list items from block to inline. ul#nav_bar li </style> display: inline; Step 4: In the display above, you will want to remove the underline from the hyperlinks, add some space (padding) between each link, add a background color, a text color, and set a standard width for each of the links so the buttons will all be the same size (Just make sure that the total number of links multiplied by the width does not exceed the total width of the navigation bar. An important step here is to position the links by floating each one left. The css selector for a hyperlink is the pseudo element a. ul#nav_bar li a /* removes the underline */ text-decoration: none; /* inserts a 10-pixel padding around each hyperlink */ padding: 10px; /* sets the background color to blue */ background-color: blue; Web 2.0 Menus Horizontal Navigation Bar Page 3 of 8

/* sets the width of each hyperlink to 100 pixels */ width: 100px; /* sets the color of the font to white */ color:white; /* allows block elements to slide next to each other */ float:left; Step 5: Let s add some styling, such as centering the link text on the buttons and bolding the link text. ul#nav_bar li a /* centers the text on the button */ text-align:center; /* bolds the link text */ font-weight:bold; Step 6: Now you will want to add a right border between each of the buttons so you can tell where one button begins and one button ends. ul#nav_bar li a /* inserts a 2-pixel solid white border between each button */ border-right: 2px solid white; Web 2.0 Menus Horizontal Navigation Bar Page 4 of 8

Step 7: Since this menu is on a white background, you cannot see the extra white line to the right of Contact Us button, but if the background of the Web page were not white, you would see a two-pixel border to the right of the last navigation button. To show this, add a body background style of lightblue to the body selector. body /* adds a light blue background to the Web page */ background-color: lightblue; 2-pixel white border Step 8: To remove the white border to the right of the Contact Us button, add a class to the hyperlink tag for the Contact us button. <li><a href = "#" class = "last">contact Us</a></li> and then add a style for the hyperlink with a class of last ul#nav_bar li a.last /* removes the border to the right of contact us */ border-right: none; Web 2.0 Menus Horizontal Navigation Bar Page 5 of 8

Step 9: Now you will want to add solid white bar below the buttons to separate them from the color of the Web page and match the color of the space between the buttons. In the style declaration for the ul#nav_bar li a, add ul#nav_bar li a... border-bottom: 5px solid white; Step 10: Now all that is left is to center the navigation bar between the left and right margins of the Web page. This will only work correctly if you figure out the number of pixels that you have used in the navigation bar: 5 links at 100 pixels each 500 pixels 10-pixel padding on each button (5) 100 pixels 2-pixel padding on 4 of the buttons 8 pixels 608 pixels In Step 1, change the width of navigation bar from 700px to 608px. Firefox and I.E. center differently between the left and right margins. For Firefox, add a margin:auto style to the ul#nav_bar definition ul#nav_bar /* changes the width of the nav_bar from 700 to 608 pixels */ width:608px; list-style:none; /* horizontally centers the nav_bar in Firefox */ margin:auto; Web 2.0 Menus Horizontal Navigation Bar Page 6 of 8

For I.E. add a division named navigation_bar around the entire list. <div id = "navigation_bar"> <ul id = "nav_bar"> <li><a href = "#">Home</a></li> <li><a href = "#">About Us</a></li> <li><a href = "#">Services</a></li> <li><a href = "#">Blog</a></li> <li><a href = "#" class = "last">contact Us</a></li> </ul> </div> <!--ends the nav_bar division --> and add a style for the navigation bar division #navigation_bar text-align:center; Final display in I.E. Final display in Firefox: ADDING A HOVER EFFECT A hover effect is when you move the mouse over a hyperlink. Sometimes you want a navigation link to display differently when the mouse is located over a Web 2.0 Menus Horizontal Navigation Bar Page 7 of 8

hyperlink. For example, you may want the background color or the text color to change. Step 1: a:hover is the selector for a hover effect. ul#nav_bar li a:hover /* sets the background color to white */ background-color:white; /* sets the font color to blue */ color:blue; Step 2: You may also want to add a solid blue line for the hover effect that displays below the button: ul#nav_bar li a:hover /*adds a 5-pixel solid blue border below the hover link */ border-bottom: 5px solid blue; You can also make other changes, but remember that if you change the style to UPPERCASE or add a bold effect, you may need to increase the overall width of the navigation bar in Cascading Style Sheets Step 1 because bold or uppercase lettering take up more space than lowercase or normal-weight font. BE SURE TO CHECK THE DISPLAY IN BOTH FIREFOX AND I.E. TO BE SURE THAT ALL OF THE STYLES WORK PROPERLY IN BOTH BROWSERS. Web 2.0 Menus Horizontal Navigation Bar Page 8 of 8