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

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

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

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.

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

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

NAVIGATION INSTRUCTIONS

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

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

CSC 121 Computers and Scientific Thinking

Designing the Home Page and Creating Additional Pages

5 Snowdonia. 94 Web Applications with C#.ASP

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

CSS worksheet. JMC 105 Drake University

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

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:

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

A Balanced Introduction to Computer Science, 3/E

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

Programmazione Web a.a. 2017/2018 HTML5

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

CSS Cascading Style Sheets

Creating a Navigation Bar with a Rollover Effect

Nauticom NetEditor: A How-to Guide

Web Engineering CSS. By Assistant Prof Malik M Ali

Using Advanced Cascading Style Sheets

3.1 Introduction. 3.2 Levels of Style Sheets. - HTML is primarily concerned with content, rather than style. - There are three levels of style sheets

Introduction to WEB PROGRAMMING

1. The basic building block of an HTML document is called a(n) a. tag. b. element. c. attribute. d. container. Answer: b Page 5

Block & Inline Elements

- HTML is primarily concerned with content, rather than style. - However, tags have presentation properties, for which browsers have default values

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

Lesson 5 Introduction to Cascading Style Sheets

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

Media Stylesheets and Navigation with CSS goodness. Webpage Design

2005 WebGUI Users Conference

Zen Garden. CSS Zen Garden

Project 1: Creating a Web Site from Scratch. Skills and Tools: Use Expression Web tools to create a Web site


Module 2 (VII): CSS [Part 4]

WEBSITE PROJECT 2 PURPOSE: INSTRUCTIONS: REQUIREMENTS:

HTML and CSS COURSE SYLLABUS

3. Each of these mark examples contains an error. a. <input name= country value= Your country here. /> b. <checkbox name= color value= teal />

HTML and CSS: An Introduction

Cascading Style Sheets (CSS)

Styles, Style Sheets, the Box Model and Liquid Layout

Cascading Style Sheets CSCI 311

CSS. Selectors & Measurments. Copyright DevelopIntelligence LLC

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

Html basics Course Outline

INTRODUCTION TO CSS. Mohammad Jawad Kadhim

COMS 359: Interactive Media

Using Dreamweaver CC. Logo. 4 Creating a Template. Page Heading. Page content in this area. About Us Gallery Ordering Contact Us Links

Using Dreamweaver CS6

ITNP43: HTML Lecture 4

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

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

CSS Cascading Style Sheets

Guidelines for doing the short exercises

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

Taking Fireworks Template and Applying it to Dreamweaver

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

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

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

COPYRIGHTED MATERIAL. Tabs

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

Introduction to using HTML to design webpages

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

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

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

CSS (CASCADING STYLE SHEETS) LAYOUT: INTRODUCTION ON PAGE BACKGROUNDS. By Ted Mitchell

Layout with Layers and CSS

Final Exam Study Guide

Web Design and Development Tutorial 03

HTMLnotesS15.notebook. January 25, 2015

TUTORIAL MADCAP FLARE Tripane and PDF

CSS.

CSS: The Basics CISC 282 September 20, 2014

CS Multimedia and Communications. Lab 06: Webpage Tables and Image Links (Website Design part 3 of 3)

Using Dreamweaver CS6

Website Development (WEB) Lab Exercises

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

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

THE HITCHHIKERS GUIDE TO HTML

Parashar Technologies HTML Lecture Notes-4

Markup Language SGML: Standard Generalized Markup Language. HyperText Markup Language (HTML) extensible Markup Language (XML) TeX LaTeX

GIMP WEB 2.0 ICONS. GIMP is all about IT (Images and Text) OPEN GIMP

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

CITS3403 Agile Web Development 2019 Semester 1

8a. Cascading Style Sheet

Microsoft Expression Web Quickstart Guide

Step 1 Download and Install KompoZer Step by step instructions to build your first web page using KompoZer web editor.

Website Development with HTML5, CSS and Bootstrap

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

Rich Text Editor Quick Reference

HTML & CSS Cheat Sheet

Assignments (4) Assessment as per Schedule (2)

Index. alt, 38, 57 class, 86, 88, 101, 107 href, 24, 51, 57 id, 86 88, 98 overview, 37. src, 37, 57. backend, WordPress, 146, 148

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

FrontPage 2000 Tutorial -- Advanced

Transcription:

GIMP WEB 2.0 MENUS Web 2.0 Menus: Horizontal Navigation Bar with Dynamic Background Image WEB 2.0 MENUS: HORIZONTAL NAVIGATION BAR DYNAMIC BACKGROUND IMAGE Before you begin this tutorial, you will need to copy the menu_1_orange folder in the PortableApps/GIMP/buttons/images/ folder and rename the folder menu_1_blue. The folder contains three images in an.xcf format: btn_background.xcf hover_button.xcf nav_arrow_orange.xcf and the same three images in a.png format. The.xcf files contain the entire image and the.png files are saved as 1-pixel wide images. Web 2.0 Menus Horizontal Navigation Bar with Button Image Page 1 of 11

You will need to change the color of the hover_button to a blue gradient. You can use the lighter and darker blues in the image for the foreground and background colors of the blend (gradient). Change the nav_arrow_orange button to the lighter blue background and save both images with a.png extension. You will also need to copy the banner image named tech_services.png that you saved in the PortableApps/GIMP/banners/images folder to the menu_1_blue folder. CODING THE HTML PORTION OF THE NAVIGATION MENU Step 1: In a text editor, begin a new document and save in the menu_1_blue folder as peavey_tech_services.html. Add the following html code to create a Web page with a banner image and an unordered list. <html> <head> <title></title> <style> </style> </head> <body> <p class = center ><img src = "tech_services.png" alt = banner /></p> <div id="menu"> Web 2.0 Menus Horizontal Navigation Bar with Button Image Page 2 of 11

<ul> </ul> <li><a href="index.htm">home</a></li> <li><a href="about_us.htm">about Us></a></li> <li><a href="services.htm">services</a></li> <li><a href="contact.htm">contact U</a></li> <li><a href="blog.htm">blog</a></li> </div> <!-- ends the menu division --> </body> </html> Step 2: Between the beginning and ending <style> tags in the head section, add a style to horizontally center the banner image. p.center text-align: center; FORMATTING THE NAVIGATION BAR The navigation bar will be created by repeating the tech_services_btn.png image as many times as necessary to fit the width of the menu. Web 2.0 Menus Horizontal Navigation Bar with Button Image Page 3 of 11

Step 1: In the html code, the code for the navigation bar is nested inside a division named menu so you will want to define a style for the menu division. Below the p.center style in the style section add the following style to set the width of the navigation bar to the width of the banner image (800 pixels), the height to 60 pixels, the background image to the tech_services_btn.png image, and the margins to auto. #menu /* defines the width of the navigation menu */ width: 800px; /* defines the height of the menu for Firefox */ height: 60px; /* defines the image used for the menu bar */ background: url(tech_services_btn.png) repeat-x; /* horizontally centers the navigation menu */ margin: auto; Note: One of the questions you may be asking yourself is why is the selector background instead of background-image? If you answered, This is a shortcut style and repeat-x would not be a style for background-image, you would be correct. Web 2.0 Menus Horizontal Navigation Bar with Button Image Page 4 of 11

Step 2: Below the #menu definition in the style section, add a style for the unordered list in the menu division that sets the width of the combined link text to 750 pixels, centers the link text, and removes the bullets. #menu ul /* defines the width of the combined link text */ width: 750px; /* centers the text across the bar */ margin: 0 auto; /* removes the bullets */ list-style:none; The width of 750 pixels will be changed later depending on the number of characters in the text for each list item and the amount of padding defined Step 3: Style each list item horizontally floating at the left, set the height to the height of the button image, define the font size and weight of the link text, define the line height, and define the padding. #menu li /* displays the list items horizontally rather than vertically */ display: inline; Web 2.0 Menus Horizontal Navigation Bar with Button Image Page 5 of 11

/* allows you to center the button text later */ float: left; /* required by Firefox to display the background image */ height: 61px; /* defines the font size of the button text */ font-size: 16px; /* defines the weight of the button text */ font-weight: bold; /* set to height of button to vertically center the button text */ line-height: 61px; /* defines a 20 pixel on left and right of the combined link text*/ margin: 0 20px; Step 4: Use the a selector to change the font color, remove the underline, and add a 25-pixel padding to the left and right of the link text. #menu li a /* defines the link text color */ color: #485cd2; /* removes the underline from the link text */ text-decoration: none; /* defines a padding of 0 pixels on top and bottom of link text */ Web 2.0 Menus Horizontal Navigation Bar with Button Image Page 6 of 11

/*defines a padding of 25 pixels on the left and right of link text */ padding: 0 25px; /*you can only float block level elements so you need to make the text block */ display: block; /*This will allow the second list item to display to the right of the first, and so forth */ float: left; /*required for Firefox */ height: 61px; Step 5: use the a:hover selector to display a background image when the mouse is hovered over the link text and change the font color to white. #menu li a:hover /* repeat the tech_services_hover.png image across the link text and padding */ background: url(tech_services_hover.png) repeat-x; /* define the link text color */ color: white; Web 2.0 Menus Horizontal Navigation Bar with Button Image Page 7 of 11

Step 6: Because you cannot apply two background images (the button and the navigation arrow to the same selector, you will need to add a <span> tag to the link text in the html code. <ul> </ul> <li><a href="index.htm"><span>home</span></a></li> <li><a href="about_us.htm"><span>about Us</span></a></li> <li><a href="services.htm"><span>services</span></a></li> <li><a href="contact.htm"><span>contact Us</span></a></li> <li><a href="blog.htm"><span>blog</span></a></li> Step 7: Add a style to the a:hover span selector that displays a navigation arrow when the mouse is hovered over the link text. Again, it is important that you check the display in both browsers as the display: block style is required by Firefox to move the arrow to the top of the button, and the float: left style is required by I.E. to display the image only behind the hovered button. #menu li a:hover span /* displays the arrow image once at the top of the button */ background: url(tech_services_nav_arrow.png) no-repeat top; /* move the arrow to the vertical top of button in Firefox */ display:block; /* displays the background image behind one the hovered button */ float:left; Web 2.0 Menus Horizontal Navigation Bar with Button Image Page 8 of 11

Step 8: Often the Home button displays the background image without the navigation arrow even when it is not in the hover state. To create this effect, you will need to add a class to the hyperlink code in the html file and add a style to the class. <li><a href="index.htm" class="home"><span>home</span></a></li> Step 9: Add a style to the home class that is identical to the #menu li a style with the additional button background image. #menu li.home display: block; float: left; height: 61px; background: url(tech_services_hover.png) repeat-x; color: white; text-decoration: none; padding: 0 25px; The Home button displays the background image but only displays the navigation arrow when it is in the hover state. Web 2.0 Menus Horizontal Navigation Bar with Button Image Page 9 of 11

Step 10: As an example, go to the #menu li a style and change the padding to padding: 0 5px; Save and test in the browser. You will see that the link text is not centered on the navigation bar. It is difficult sometimes because of font sizes and font weights to calculate the exact width for the #menu ul style, but you know that in this instance you need a smaller width, so let s try 650 pixels (5 buttons x 20 pixels = 100 and 750 100 = 650). You will see that this is not quite perfect there is slightly more space at the right of the navigation bar. Experiment I ended up with about 575 pixels. Now you can UNDO until the padding is back to 25 pixels and the width is back to 750 pixels. 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. CHANGING THE EMBEDDED STYLE TO A CASCADING STYLE SHEET Step 1: Copy the styles between the beginning and ending <style> tags and paste them into a new blank document and save the document in the folder as peavey_technology_services.css. Step 2: In the html file, add a link to the cascading stylesheet below the ending <title> tag: <link href = peavey_technology_services.css rel = stylesheet type = text/css /> Step 3: View the Web page in both browsers to check the formatting to be sure it displays correctly. Step 4: Delete the beginning and ending style tags in the html document. Web 2.0 Menus Horizontal Navigation Bar with Button Image Page 10 of 11

Step 5: Save both documents in the menu_1_blue folder. At the Design tab, you will be coding the Home page for the Peavey Technology Web site. Web 2.0 Menus Horizontal Navigation Bar with Button Image Page 11 of 11