Wrox Programmer Forums
BOOK: ASP.NET 2.0 Website Programming Problem Design Solution ISBN: 978-0-7645-8464-0
This is the forum to discuss the Wrox book ASP.NET 2.0 Website Programming: Problem - Design - Solution by Marco Bellinaso; ISBN: 9780764584640
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: ASP.NET 2.0 Website Programming Problem Design Solution ISBN: 978-0-7645-8464-0 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 March 30th, 2007, 04:20 AM
Friend of Wrox
Join Date: Mar 2007
Posts: 488
Thanks: 2
Thanked 11 Times in 10 Posts
Default Warning: CSS show stopper


Just had an issue that was driving me up the wall. Basically, i had been making lots of code changes to quite a few modules and had been merrily working my way thro some enhancements. all of a sudden, when selecting anything on a DropDown list, the behaviour off all DropDowns were displaying erratic behaviour. Basically it seemed to perform the postback as the dropdown was invoked, rather than when selected. after pulling my hair out for over an hour, i decided to try it with a different theme selected (manually setting the default in the <pages theme in the web.config file as i couldn't select it in the app as it wouldn't work). lo and behold, it worked fine. this led me up a different track and decided to look at the recent default.css changes that i'd made in my preferred scheme. turns out, the only major addition i'd made that day, was the additon of a new class in the css file:

.highlight {text-decoration:none; font-weight:bold; color:black; background:yellow;}

so, i decided to remove this entry and try again. bl**dy h*ll, the problem was gone and all worked fine. i then renamed this class to .highlightsrc and tried again and it still worked as it should do.

so, basically, the essence of this tale is to beware tracking down bugs in code that could be attributed to 'non-code' related issue such as css definitions.

this is also an advance warning to anyone planning to allow users to define their own css files that once you do, then the control of what's added to that file is out of your hands and any possible error reports will be well and truly out of your hands.

i urge everyone to try the above example just so that i know that it isn't just me that this happens with (i tried it on 2 different machines with the same result)

anyway - older and definately wiser!!



Old March 31st, 2007, 03:48 PM
plb plb is offline
Authorized User
Join Date: Jan 2007
Posts: 94
Thanks: 0
Thanked 0 Times in 0 Posts

I assumed you were just crazy. I couldn't see anything in that css snipette that would make a drop down misbehave.

But damn!! It does just what you said.

There already is a css entry in the stock Default.css called highlight, so it must be some interference effect. I would have expected the system to throw an error.

On the other hand it could be that the gods of web design are offended by that gauche color scheme.


Old April 1st, 2007, 03:01 AM
Friend of Wrox
Join Date: Mar 2007
Posts: 488
Thanks: 2
Thanked 11 Times in 10 Posts


you're probably quite right - thor was angered by the abomination of hi contrast and lo-fi taste :).

but just goes to show that such an oversight (on my part) of defining a duplicate attribute is the css can have catastrophic system-wide effect!! [cue thunderstorm].

cheers for now


Old April 5th, 2007, 03:39 PM
Registered User
Join Date: Aug 2006
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts

Although Thor may well be displeased with the colour scheme it could be down to a less X-Files explination :)

BasePage calls a helpers method (on line 62 in my BasePage.cs file) - SetInputControlsHighlight and feeds in the "highlight" css class. The SetInputControlsHighlight method is in the Helpers class.

Similar Threads
Thread Thread Starter Forum Replies Last Post
Chapter 5 read text & checkbox: a stopper! zeitguy BOOK: Beginning Ruby on Rails 5 April 1st, 2008 10:37 PM
CSS HELP:! CSS EXPANDIBLE BACKGROUND FOR TITLE phpuser2000 CSS Cascading Style Sheets 2 December 19th, 2007 12:36 AM
Rich's new CSS book: Beginning CSS 2nd Edition jminatel BOOK: Beginning CSS: Cascading Style Sheets for Web Design ISBN: 978-0-7645-7642-3 0 June 15th, 2007 11:55 AM
CSS Warnings - OK ignore? or best warning free? socoolbrewster CSS Cascading Style Sheets 2 February 12th, 2007 12:45 PM

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