Wrox Programmer Forums
|
BOOK: Beginning ASP.NET 3.5 : in C# and VB BOOK ISBN: 978-0-470-18759-3
This is the forum to discuss the Wrox book Beginning ASP.NET 3.5: In C# and VB by Imar Spaanjaars; ISBN: 9780470187593
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: Beginning ASP.NET 3.5 : in C# and VB BOOK ISBN: 978-0-470-18759-3 section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old May 21st, 2010, 10:04 PM
Authorized User
 
Join Date: Apr 2010
Posts: 15
Thanks: 8
Thanked 0 Times in 0 Posts
Smile ASP 3.5-spaces between main menu items

Hello all,
I've just finished reading and practicing on the menu control, and got to chapter 7, page 253.
Everything is fine, and the page i get in my browsers, matched perfectly to the description of the book.
Looking at the main menu items while in Monochrome theme, on the left there is "Home", to his right there is "Reviews", to his right there is "About" and to his right there is "Login".
What i don't get is where in the entire project is the code that sets the spaces between the main menu items above,
For example if i wanna change the distance between "Home" and "Reviews", in order to bring them closer to one another, or to move "Reviews" few steps to the left, how can i do that?

10x for any reply people ...
 
Old May 22nd, 2010, 03:45 AM
Imar's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
Default

Hi there,

The menu is rendered with a table and table cells which by default scale up or down to fill up the entire width of the table (e.g. the menu). So, if you want to decrease the width of the menu items, you need to decrease the width of the menu first.:

Code:
.MainMenu
{
   ... Other settings here
  width: 400px;
}
With the menu width changed, you can now change individual menu items (table cells - or tds with the StaticMenuItemStyle):

Code:
.StaticMenuItemStyle td
{
  width: 20px;
}
Hope this helps,

Imar
__________________
Imar Spaanjaars
http://Imar.Spaanjaars.Com
Follow me on Twitter

Author of Beginning ASP.NET 4.5 : in C# and VB, Beginning ASP.NET Web Pages with WebMatrix
and Beginning ASP.NET 4 : in C# and VB.
Did this post help you? Click the button below this post to show your appreciation!
The Following User Says Thank You to Imar For This Useful Post:
stormage (May 22nd, 2010)





Similar Threads
Thread Thread Starter Forum Replies Last Post
getting the sub menu from the main menu swatianand ASP.NET 3.5 Basics 4 December 30th, 2009 11:27 PM
CH 15 Context Menu - Element Menu Items Razzy The Pug BOOK: Ivor Horton's Beginning Visual C++ 2005 2 November 9th, 2008 03:53 PM
Anable/Disable main menu item problem Dmitriy Ajax 0 January 23rd, 2007 03:29 PM
Help with Main Menu GAF General .NET 0 March 18th, 2005 08:10 PM
Main menu function andy_study VB.NET 2002/2003 Basics 2 December 15th, 2004 06:48 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.