Nannette Thacker ShiningStar.net

ASP.net Web Application Development

Sponsors

News

See all Blog Posts by Nannette.

Nannette Thacker, consultant and owner of Shining Star Services LLC, specializes in development of custom dynamic database driven web applications utilizing ASP.net technologies. Nannette has been developing ASP sites since 1997. Nannette has written numerous articles on web development techniques and tutorials.

Nannette is the owner and developer of ChristianSinglesDating.com.

 Subscribe in a reader





View Nannette  Thacker's profile on LinkedIn

November 2011 - Posts

Debugging a Broken Stylesheet: CSS Background Disappears when Scroll Off Bottom of Screen

I recently worked on an existing project where we decided to add a background to the site. Whether this is a background color or background image, the same problem occured.

The problem was that the background loaded fine in the screen. But when the user used the scrollbar to scroll below the bottom edge of the screen, the background immediately turned white. The footer panel was colorized as desired, but the background just disappeared.



I'm going to provide my debugging steps so you can learn how to debug your styles. I created a new theme folder in my App_Themes directory. I copied just the CSS stylesheet which included the coding for my body background image/color. I changed the theme in my web.config file. I restarted the program and the background was fine and continued below the bottom of the screen as desired.

So now I needed to find the stylesheet which was causing the problem.

I then inserted another stylesheet which also included "body" elements. I removed every style from that sheet that had nothing to do with what was on my page, such as tables, tds, etc. I refreshed my page and the problem returned.

I then deleted one element selector at a time, refreshing the screen, until the problem went away. From this I determined which element was causing the problem. I then removed one property at a time from the element until the problem went away. Typically by this time, it's pretty evident which property is the culprit.

My problem? The below coding was in the stylesheet:

html { color: #333; background: #FFF; }

The above background property was overriding my background as shown below. Even adding !Important to the background property did not resolve the issue. Once I removed he above background color, everything worked fine.

body { margin: 0px; background-color: #000000; height: 100%; }

May your dreams be in ASP.NET!

Nannette Thacker


View Nannette  Thacker's profile on LinkedIn
Installing Ajax Control Toolkit in Visual Studio 2010

I needed to install the Ajax Control Toolkit for Visual Studio 2010 4.0 Framework, so I googled "install ajax control toolkit visual studio 2010" and found this step by step guide:

http://www.asp.net/ajaxlibrary/act.ashx

It installed perfectly for me the first time, so I'd recommend following the above link. There were just a few steps and voila!

I'm including this link here, because a in February 2008, I posted a blog for installing the toolkit in Visual Web Developer.

http://weblogs.asp.net/nannettethacker/archive/2008/02/07/ajax-control-tookit-installation-in-visual-web-developer.aspx

Some comments have been posted with users having problems with the steps, so I thought I'd find and test a link that works. However, I did test the above in Visual Studio 2010, not Visual Web Developer, so I can't say how it would work with the latter.

May your dreams be in ASP.NET!

Nannette Thacker


View Nannette  Thacker's profile on LinkedIn
More Posts