 |
BOOK: Beginning ASP.NET 4 : in C# and VB
 | This is the forum to discuss the Wrox book Beginning ASP.NET 4: in C# and VB by Imar Spaanjaars; ISBN: 9780470502211 |
Welcome to the p2p.wrox.com Forums.
You are currently viewing the BOOK: Beginning ASP.NET 4 : in C# and VB 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 20th, 2011, 12:48 PM
|
|
Registered User
|
|
Join Date: Apr 2011
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
Menu Items not Formatting Correctly
I am on the menu exercise in Chapter 11. I have modified the Monochrome.css file to include the formatting items, e.g.,
ul.level1
ul.level1 .selected
a.level1
etc etc
but none of the formatting appears, just the formatting set in .MainMenu
Wayne
|
|

April 20th, 2011, 01:27 PM
|
 |
Wrox Author
|
|
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
|
|
Hi Wayne,
When you look at the HTML in the browser, can you see the menu is made up of <ul> and <li> elements?
And could it be that you're having other CSS for ul elements that overrides your settings? And are you sure the correct CSS is being used and applied to the page? E.g. what happens when you add
*
{
border: 1px solid red;
}
to the CSS file?
Imar
|
|

April 20th, 2011, 01:42 PM
|
|
Registered User
|
|
Join Date: Apr 2011
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
I had checked those things, and it turned out to be something interesting I just found - in the web.config file, in <pages> it had the controlrendering=3.5 directive. Once I removed it, all was well. I'm not sure what happened. If I remember correctly I started developing in 3. because that's what our company servers are at, then decided to migrate the project to 4 just so I could work with the latest features and we will be migrating pretty soon anyway
|
|

April 20th, 2011, 01:53 PM
|
 |
Wrox Author
|
|
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
|
|
I was going to ask you next to post the web.config to look at exactly that ;-)
When you upgrade a site from 3.5 to 4.0, VWD adds that to the config file to maintain backwards compatibility. In 3.5, the Menu rendered as a table, so you could have had CSS targeting that specific table. In 4.0 it renders as <ul> elements, so upgrading might break things.
With controlrendering set to 3.5, ASP.NET 4 renders the way it did in 3,5; e.g. you get tables instead of an unordered list (and hence the question: When you look at the HTML in the browser, can you see the menu is made up of <ul> and <li> elements?)
Glad to hear it's working, and hope you like the book.
Cheers,
Imar
|
|

April 20th, 2011, 02:04 PM
|
|
Registered User
|
|
Join Date: Apr 2011
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
I am really enjoying the book. It's the first one on progamming I have that has really kept my interest and moving forward. It's kind of like drinking from a fire hose and I know I won't remember the details the first time though, but it's giving me good insight on how to approach a project, how a site is organized, and what can be done. I bought it in e-format and have it on my iPad, makes navigation, higlighting and searching very easy, and large text for my aging eyes helps!
|
|

April 21st, 2011, 02:58 AM
|
 |
Wrox Author
|
|
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
|
|
Good to hear you like the book so much. Spread the word, spread the word! ;-)
I recently purchased an iPad and was wondering how my book would look on it. Haven't had a chance to try it though, so it's good to hear it works well for you.
Cheers,
Imar
|
|
 |
|