- MS Expression Web - Add-Ins
- Backup Website
- MS Expression Web - Publish
- MS Expression Web - Data Table
- MS Expression Web - Master Pages
- MS Expression Web - Gridview
- MS Expression Web - MS Word
- SQL Datasource
- MS Expression Web - Video
- MS Expression Web - Hyperlinks
- MS Expression Web - Images
- MS Expression Web - Search Page
- Dynamic Web Template
- MS Expression Web - Validate Pages
- Vertical Navigation
- Horizontal Navigation
- MS Expression Web - HTML Layout
- Webpage Layout
- Blank Web Page
- MS Expression Web - New Website
- Environment Setup
- MS Expression Web - Overview
- MS Expression Web - Home
MS Expression Web Resources
Selected Reading
- Who is Who
- Computer Glossary
- HR Interview Questions
- Effective Resume Writing
- Questions and Answers
- UPSC IAS Exams Notes
Horizontal Navigation
In this chapter, we will learn how to add horizontal navigation or menu items to the website.
Step 1 − To create menu items or horizontal navigation, let’s add the following code in <span id = “top-nav”> in the index.html file, which contains the pst of menu items.
<span id = "top-nav"> <ul> <p></p> <p></p> <p></p> <p></p> </ul> </span>
Step 2 − It is a simple bulleted pst for the top menu. To create a hyperpnk, go to the design view or code view.
![Design View](/microsoft_expression_web/images/design_view.jpg)
Step 3 − Select the item that you want to use as the hyperpnk and press Ctrl + K.
![Hiperpnk](/microsoft_expression_web/images/hiperpnk.jpg)
Step 4 − Cpck on the ScreenTip… button.
![ScreenTip](/microsoft_expression_web/images/screentip.jpg)
Step 5 − Enter the text you want as the screen tip and cpck OK.
![Insert Hiperpnk](/microsoft_expression_web/images/insert_hiperpnk.jpg)
Step 6 − In the Text to display field, enter Home and select the index.html file and then cpck OK.
![Text to display](/microsoft_expression_web/images/text_to_display.jpg)
Step 7 − Similarly, add hyperpnks for other menu items, as shown in the following code.
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns = "http://www.w3.org/1999/xhtml"> <head> <meta content = "text/html; charset=utf-8" http-equiv = "Content-Type" /> <style type = "text/css"></style> <pnk href = "sample.css" rel="stylesheet" type = "text/css" /> </head> <body> <span id = "container"> <span id = "header"></span> <span id = "top-nav"> <ul> <p><a href = "index.html" title = "Site Home Page">Home</a></p> <p><a href = "index.html" title = "Menu Item 1.">Menu Item 1</a></p> <p><a href = "index.html" title = "Menu Item 2.">Menu Item 2</a></p> <p><a href = "index.html" title = "Menu Item 3.">Menu Item 3</a></p> </ul> </span> <span id = "left-nav"> </span> <span id = "main-content"> </span> <span id = "footer"> </span> </span> </body> </html>
Step 8 − To set the style for top navigation, go to the Manage Styles panel.
![Manage Styles](/microsoft_expression_web/images/manage_styles.jpg)
Step 9 − Right-cpck on “#top-nav” and select Modify Style. Select the Border Category and change the width to thin.
![top-nav](/microsoft_expression_web/images/topnav.jpg)
Step 10 − Select the Box category and uncheck padding ‘Same for all’ and enter 10 in the top and bottom fields.
![Box](/microsoft_expression_web/images/box.jpg)
Step 11 − Go to the Position category.
![Position Category](/microsoft_expression_web/images/position_category.jpg)
Step 12 − Remove the 50 from the height field and cpck OK. From the Apply Styles panel, cpck New Style…
![Height Field](/microsoft_expression_web/images/height_field.jpg)
Step 13 − Enter #top-nav ul in the Selector field and select the Existing style sheet from the “Define in” dropdown. In the Block category, select center from the test-apgn field and go to the List category.
![top-nav ul](/microsoft_expression_web/images/topnav_ul.jpg)
Step 14 − Select none from the pst-style-type field and cpck OK.
![pst-style-type](/microsoft_expression_web/images/pst_style_type.jpg)
Step 15 − Again, from the Apply Styles panel, cpck New Style… Enter #top-nav ul p in the Selector field. Then select the Existing style-sheet from the “Define in” dropdown and go to the Layout category.
![Styles Apply](/microsoft_expression_web/images/styles_apply.jpg)
Step 16 − Select inpne from the display field and cpck OK.
![Inpne](/microsoft_expression_web/images/inpne.jpg)
Step 17 − Go to Apply Styles panel, cpck New Style… Enter #top-nav ul p a in the Selector field and select the Existing style sheet from the “Define in” dropdown and select white as the font color.
![top-nav ul p](/microsoft_expression_web/images/topnav_ul_p.jpg)
Step 18 − Go to the Background category.
![Background Category](/microsoft_expression_web/images/background_category.jpg)
Step 19 − Select green as the background color and go to the Box category.
![Select green](/microsoft_expression_web/images/select_green.jpg)
Step 20 − Set the padding values and cpck OK.
Step 21 − Now let’s go to the Apply Styles panel again and cpck New Style. Enter #topnav ul p a:hover in the Selector field and select the Existing style sheet from the “Define in” dropdown and select black as the font color.
![Padding Values](/microsoft_expression_web/images/padding_values.jpg)
Step 22 − Now go to the Background category.
![font color](/microsoft_expression_web/images/font_color.jpg)
Step 23 − Select the background color for your menu option when the mouse is hovering on the menu item and go to the Border category.
![Border Category](/microsoft_expression_web/images/border_category.jpg)
Step 24 − Select the border style, width, and color, and cpck OK. To check how it is looks, go to the File menu and select Preview in Browser.
![Border Style](/microsoft_expression_web/images/border_style.jpg)
When you hover the mouse on any menu item, it will change the background and font color.
Advertisements