When faced with this issue, it is always recommended to utilize the developer tools of your browser to identify the exact elements affected by your front-end modifications. For a comprehensive debugging experience, Chrome provides an excellent suite of tools - simply right-click on the page and choose "Inspect Element" on the desired div.
Regarding the specific problem at hand:
- Confirm that you have properly referenced Site.css.
- Ensure there are no conflicting parent CSS definitions overriding yours.
- If a conflict arises (such as a color definition for a "div"), ensure that your CSS ID definition appears after it in the document flow.
Other potential solutions include:
- Implementing CSS on a per-page basis through script closures.
- Utilizing inline styling for individual elements.
Response To Queries
Each browser comes equipped with default rules assigned to most elements. If you encounter styles inherited from the body element, it may be attributed to a CSS reset stylesheet or schema where reasonable defaults are applied to the body. This scenario is unlikely in an ASP.NET application.
To address this, consider developing your own stylesheet and linking it within your default.aspx page. While the order of stylesheets does not affect functionality (as long as YOUR stylesheet follows the GENERATED one), maintaining separate stylesheets fosters a more organized structure. Generally, altering the generated CSS is unnecessary.