 |
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
|
|
|
|
|

April 14th, 2010, 04:21 AM
|
|
Registered User
|
|
Join Date: Apr 2010
Posts: 8
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
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.
|
|

April 14th, 2010, 04:46 AM
|
 |
Wrox Author
|
|
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
|
|
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
|
|

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

June 2nd, 2010, 09:38 AM
|
 |
Wrox Author
|
|
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
|
|
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
|
|

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

June 2nd, 2010, 02:55 PM
|
|
Authorized User
|
|
Join Date: Mar 2009
Posts: 64
Thanks: 0
Thanked 1 Time in 1 Post
|
|
Thanks, smart guy.  I actually thought that http://aspnet40.planetwrox.com was intuitive following the pattern of the 3.5 page.
Thomas
|
|

June 2nd, 2010, 03:35 PM
|
 |
Wrox Author
|
|
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
|
|
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
|
|
 |