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 April 14th, 2010, 04:21 AM
Registered User
 
Join Date: Apr 2010
Posts: 8
Thanks: 0
Thanked 0 Times in 0 Posts
Default I can't add space between the items of the menu

I have tried exactly what is described in p245 'Try It Out' example but the items simply do not move!
I even tried to enter 100px like this

Code:
 <StaticMenuItemStyle ItemSpacing="100px" />
but the items remain at their original position.
I am using asp.net 4.0 and visual studio 2010 so that the menu control is rendered using css by default.
 
Old April 14th, 2010, 04:46 AM
Imar's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
Default

Quote:
I am using asp.net 4.0 and visual studio 2010 so that the menu control is rendered using css by default.
That's the root of the problem. The ItemSpacing is applied to various table elements when using the 3.5 version.

Since you're now rendering clean <ul> and <li> elements, you're more in control of the rendering, but it also means you need to write more CSS to make this work.

Cheers,

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!
 
Old June 2nd, 2010, 09:31 AM
Authorized User
 
Join Date: Mar 2009
Posts: 64
Thanks: 0
Thanked 1 Time in 1 Post
Default

Quote:
The ItemSpacing is applied to various table elements when using the 3.5 version.
Imar,

Could you say a bit more about this? I do not recall, and cannot find in the book, where the spacing of the menu items is table driven, so to speak.

Thomas
 
Old June 2nd, 2010, 09:38 AM
Imar's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
Default

To see how it works, take a look in the HTML source of the demo site: http://aspnet35.planetwrox.com/

Search for the word Reviews and you'll see lots of tables.

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!
 
Old June 2nd, 2010, 10:22 AM
Authorized User
 
Join Date: Mar 2009
Posts: 64
Thanks: 0
Thanked 1 Time in 1 Post
Default

Thanks.

Is there an ASP.NET 4.0 version of the web site where I can see how it is done in that version?

Thomas
 
Old June 2nd, 2010, 12:15 PM
Imar's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
Default

Yes, and at a very intuitive location: http://aspnet4.planetwrox.com ;-)

You find entrances to both sites at http://www.planetwrox.com

Cheers,

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!
 
Old June 2nd, 2010, 02:55 PM
Authorized User
 
Join Date: Mar 2009
Posts: 64
Thanks: 0
Thanked 1 Time in 1 Post
Default

Thanks, smart guy. I actually thought that http://aspnet40.planetwrox.com was intuitive following the pattern of the 3.5 page.

Thomas
 
Old June 2nd, 2010, 03:35 PM
Imar's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
Default

I completely agree.... ;--)

I just followed Microsoft's naming scheme that goes like this:

ASP.NET 2.0
ASP.NET 3.5
ASP.NET 4

Don't know why they dropped the zero on 4 point oh....

To avoid confusion, I added the aspnet40 header as well.

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!





Similar Threads
Thread Thread Starter Forum Replies Last Post
Huge space between Header and Menu Rushino BOOK: Beginning ASP.NET 4 : in C# and VB 2 April 9th, 2010 04:11 PM
Blank items in menu ricardor ASP.NET 2.0 Basics 2 December 18th, 2009 06:08 AM
How to add space between elements JoshC XSLT 1 February 14th, 2009 07:52 AM
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
Menu Items JoBi C# 0 October 20th, 2004 08:51 PM





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