The ValidatorCalloutExtender is failing to display the CSS correctly

After successfully customizing the style of my ValidatorCalloutExtender on a RequiredFieldValidator to a more 'Modern UI', I encountered an issue when deploying it to the production server. Despite testing it on multiple browsers with satisfactory results, the CSS did not render correctly in the live environment.

View the Example Image here

Below is the CSS code I used:


.validatorCalloutHighlight 
{
border:solid;
border-color: #FFCC00;
}
.ajax__validatorcallout_popup_table
{
min-width: 350px;
min-height: 40px;
background: #FFCC00;
-webkit-border-radius: 0px;
-moz-border-radius: 0px;
border-radius: 0px;
margin-left:250px;
margin-top:-20px;
color:black;
}
...

The corresponding ASP code snippet:

<asp:TextBox ID="txtUsername" runat="server" Width="300px"></asp:TextBox>
<asp:RequiredFieldValidator CssClass="validator_callout" ID="reqvalUsername" runat="server" ControlToValidate="txtUsername" Display="None" ErrorMessage="Enter a new login name" ValidationGroup="Submit">*</asp:RequiredFieldValidator>
<cc1:ValidatorCalloutExtender ID="reqvalUsername_ValidatorCalloutExtender" runat="server" CloseImageUrl="~/Images/Buttons/cancel_Validator.png" HighlightCssClass="validatorCalloutHighlight" TargetControlID="reqvalUsername" PopupPosition="TopRight" WarningIconImageUrl="~/Images/Status/clear.png">
</cc1:ValidatorCalloutExtender>

I tried various troubleshooting methods including modifying the web.config file but to no avail. If anyone has insights or solutions to this problem, please share as I am determined to implement this new style correctly.

Answer №1

After countless attempts to tweak the CSS with no success in changing the default LemonChiffon notification, I stumbled upon a hidden gem on the depths of the internet. The post found at proved to be the key I was searching for.

The CSS provided in the post completely transformed the appearance of the ValidatorCalloutExtender, giving me the desired result.

.CustomValidator {position:relative;margin-left:-80px;}    
.CustomValidator div {border:solid 1px Black;background-color:LemonChiffon; position:relative;}    
.CustomValidator td {border:solid 1px Black;background-color:LemonChiffon;}    
.CustomValidator .ajax__validatorcallout_popup_table {display:none;border:none;background-color:transparent;padding:0px;}    
.CustomValidator .ajax__validatorcallout_popup_table_row {vertical-align:top;height:100%;background-color:transparent;padding:0px;}    
.CustomValidator .ajax__validatorcallout_callout_cell {width:20px;height:100%;text-align:right;vertical-align:top;border:none;background-color:transparent;padding:0px;}    
.CustomValidator .ajax__validatorcallout_callout_table {height:100%;border:none;background-color:transparent;padding:0px;}    
.CustomValidator .ajax__validatorcallout_callout_table_row {background-color:transparent;padding:0px;}    
.CustomValidator .ajax__validatorcallout_callout_arrow_cell {padding:8px 0px 0px 0px;text-align:right;vertical-align:top;font-size:1px;border:none;background-color:transparent;}    
.CustomValidator .ajax__validatorcallout_callout_arrow_cell .ajax__validatorcallout_innerdiv {font-size:1px;position:relative;left:1px;border-bottom:none;border-right:none;border-left:none;width:15px;background-color:transparent;padding:0px;}    
.CustomValidator .ajax__validatorcallout_callout_arrow_cell .ajax__validatorcallout_innerdiv div {height:1px;overflow:hidden;border-top:none;border-bottom:none;border-right:none;padding:0px;margin-left:auto;}    
.CustomValidator .ajax__validatorcallout_error_message_cell {font-family:Verdana;font-size:10px;padding:5px;border-right:none;border-left:none;width:100%;}    
.CustomValidator .ajax__validatorcallout_icon_cell {width:20px;padding:5px;border-right:none;}    
.CustomValidator .ajax__validatorcallout_close_button_cell {vertical-align:top;padding:0px;text-align:right;border-left:none;}    
.CustomValidator .ajax__validatorcallout_close_button_cell .ajax__validatorcallout_innerdiv {border:none;text-align:center;width:10px;padding:2px;cursor:pointer;}    

My custom validator style, which resulted in:

/* AjaxControlToolkit Validator */
.validatorCalloutHighlight 
{
    border:solid;
    border-color: #FFCC00;
    /*background-color: lemonchiffon;*/ 
}
.CustomValidator
{
    position: absolute;
    /*margin-left: -80px;*/
    /*left:-200px;*/
}
.CustomValidator div
{
    border: none;
    background-color: #FFCC00;
    position: relative;
    color:black;
}
.CustomValidator td
{
    border: none;
    background-color: #FFCC00;
    color:black;
}
.CustomValidator .ajax__validatorcallout_popup_table
{
    display: none;
    border: none;
    background-color: transparent;
    padding: 0px;
}
.CustomValidator .ajax__validatorcallout_popup_table_row
{
    vertical-align: top;
    height: 100%;
    background-color: transparent;
    padding: 0px;
}

.CustomValidator .ajax__validatorcallout_callout_cell
{
    text-align: right;
    vertical-align: top;
    border: none;
    background-color: transparent;
    padding: 0px;
}

.CustomValidator .ajax__validatorcallout_callout_table
{
    height: 100%;
    border: none;
    background-color: transparent;
    padding: 0px;
}

.CustomValidator .ajax__validatorcallout_callout_table_row
{
    background-color:transparent;
    padding: 0px;
}

.CustomValidator .ajax__validatorcallout_callout_arrow_cell
{
    padding: 8px 0px 0px 0px;
    text-align: right;
    vertical-align: top;
    border: none;
    background-color: transparent;
}

.CustomValidator .ajax__validatorcallout_callout_arrow_cell .ajax__validatorcallout_innerdiv
{
    position: relative;
    left: 1px;
    border-bottom: none;
    border-right: none;
    border-left: none;
    width: 15px;
    background-color: transparent;
    padding: 0px;
}

.CustomValidator .ajax__validatorcallout_callout_arrow_cell .ajax__validatorcallout_innerdiv div
{
    height: 1px;
    overflow: hidden;
    border-top: none;
    border-bottom: none;
    border-right: none;
    padding: 0px;
    margin-left: auto;
}

.CustomValidator .ajax__validatorcallout_error_message_cell
{
    min-width:200px;
    max-width:275px;
    min-height:40px;
    padding: 10px 5px 10px 20px;
    border-right: none;
    border-left: none;
    width: 100%;
    font-size: medium;
}


.CustomValidator .ajax__validatorcallout_error_message_cell:after
{
    content: '';
    position:absolute;
    border-style: solid;
    border-width: 0px 20px 20px 0px;
    border-color: transparent #FFCC00 transparent transparent;
    display: block;
    width: 0;
    top:0px;
/*  bottom:55px;*/
    left: -5px;
}

.CustomValidator .ajax__validatorcallout_icon_cell
{
    width: 20px;
    padding: 5px;
    border-right: none;
    display:none;
}

.CustomValidator .ajax__validatorcallout_close_button_cell
{
    vertical-align: top;
    padding-top: 7px;
    padding-right:30px;
    text-align: right;
}

.CustomValidator .ajax__validatorcallout_close_button_cell .ajax__validatorcallout_innerdiv
{
    border: none;
    text-align: center;
    width: 10px;
    padding: 2px;
    cursor: pointer;
}

Similar questions

If you have not found the answer to your question or you are interested in this topic, then look at other similar questions below or use the search

The property 'party_id' is not declared within the type '<>f__AnonymousType2`6'

I have created a helper method to filter columns using C#. public static class Helper { public static IQueryable<T> FilterForColumn<T>(this IQueryable<T> queryable, string colName, string searchText) { // Implementation c ...

Animation effect in Jquery failing to execute properly within a Modal

I have developed a small jQuery script for displaying modals that is both simple and efficient. However, it seems to only work with the fadeIn and fadeOut animations, as the slideUp and slideDown animations are not functioning properly. I am unsure of the ...

HTML and CSS: Focus on border for <td> cells only

I'm looking to apply a border to only one cell (B2) without nesting tables. Here's the code: <table border="0"> <tr> <td>A1</td> <td>B1</td> <td>C1</td> </tr> ...

Looking to modify the button's background color when it is clicked using either Javascript or jQuery?

I have 2 buttons with class df-button and df-web-design - I want to change the background color of only the clicked button when it is clicked, and then when the other button is clicked, the background should return to its default color. I am looking to ach ...

Is There a Better Option Than Using Response.End()?

When handling a request with begin_request, I currently use Response.End() to halt ASP.NET from executing any further. Is there a way to end the request without throwing an exception? In case you're wondering why I don't have a file, it's b ...

Unable to locate element using document.getElementById in ASP.NET form

Currently, I am working on a project to create an ASP.NET webforms page that will showcase a Google map using the Google Maps JavaScript API with multiple markers. Everything is functioning smoothly as long as I don't place <div id="map-canvas"> ...

How can you make the browser window scroll horizontally when a div is clicked using jQuery?

I have an image of an arrow inside a div. The div is positioned fixed in the bottom right corner of an extremely wide page. Is there a way to utilize jQuery to scroll the window 600px to the right each time the arrow is clicked? Also, can I detect when th ...

the dropdown menu toggle is not working as expected

My dropdown icon is not appearing and the menu options are not functioning properly. Despite trying to use a script to display the text when an option is clicked, it doesn't seem to be working. It appears that the toggle functionality is not working ...

Having trouble getting the Lightbox video Gallery to function properly in Bootstrap

When building my website with bootstrap 4, I incorporated image and video galleries. To create a lightbox effect, I referenced . My CSS and jQuery script are implemented at the end of the body. The image gallery functions perfectly, indicating that the im ...

IIS7 causing issues with ASP MVC routing issues

Encountered an issue while deploying MVC application on IIS7 server - receiving a 404 error for any route navigation. Research suggests that setting application pool managed pipeline mode to integrated can resolve the problem, but now encountering a new ex ...

Error encountered in ASP.NET Core MVC web application following deployment to Azure Cloud platform

I created an ASP.NET Core MVC app with CRUD functionality to deploy on Azure, using code first approach. My implementation was based on a tutorial I found at this link. Although the tutorial is slightly outdated, I followed it diligently. Attempting to re ...

Altering Image Order Across Various Slides

I have customized a parallax website template that is divided into various sections and slides. I want to incorporate a fixed image sequence on each slide that animates based on the scroll position. With 91 images in the animation sequence, it moves quickl ...

Utilize AJAX to submit datetimes to an ASP.NET Core controller via a POST request

I'm encountering an issue where the values from the datepicker are not being passed to the controller and are always null on the controller side. I have tried looking at other discussions on this topic but haven't found a solution. $(function Ge ...

The visibility of asp.net RadioButton is consistently false when interacting with Selenium

Hello! I have a user interface that needs automation. Here is the HTML content I am working with: <div class="medium-5 columns tableheading-td"> <ul id="ContentPlaceHolder1_QuetionListPlaceHolder_BigFiftyPersonalityQuestion1_BigFif ...

Concealing a button once the collapse feature is toggled in Bootstrap

The following code snippet from the bootstrap website demonstrates how to use collapse functionality: <a class="btn btn-primary" data-toggle="collapse" href="#collapseExample" aria-expanded="false" aria-controls="collapseExample"> Link with href & ...

Tips for dynamically resizing the content area using CSS without the need for javascript

What I need is as follows: The blue area should resize when the browser window resizes. The header must be visible at all times. The blue area should start right after the header ends, not overlapping or appearing above it. The blue area should end befor ...

Enabling the "visible overflow" feature in my animation

Apologies if the terminology in this question is not quite on point - I'm struggling to find the right words. I've got a collection of circular divs styled with CSS, displayed in a row. When these circles are clicked from left to right, they ani ...

What is the method for incorporating text below font icons?

Having a bit of trouble here with my code snippet featuring 'font awesome' icons in circles. I'm looking to add text beneath each icon, but the alignment within the circle is proving to be a challenge. Check out the code in this link to see ...

Tips for including MIME type in headers

Everything was running smoothly with my C# web application. However, to enhance security measures, I decided to add the "nosniff" custom header in the web.config file. <system.webServer> </handlers> <httpProtocol> &l ...

Sophisticated filter - Conceal Ancestry

Check out this snippet of my HTML: <td> <a class="button" href="#"> <input id="download">...</input> </a> <a class="button" href="#"> <input id="downloadcsv">...</input> </a> </td> I am ...