Title: New W3C Validator Errors
Last modified: January 15, 2020

---

# New W3C Validator Errors

 *  Resolved [stevewest15](https://wordpress.org/support/users/stevewest15/)
 * (@stevewest15)
 * [6 years, 4 months ago](https://wordpress.org/support/topic/new-w3c-validator-errors/)
 * Hi,
 * Need some assistance on how to fix new W3C validator errors relating to <style
   > tag inside a <div> container:
 *     ```
       Error: Element style not allowed as child of element div in this context.
   
       From line 946, column 132; to line 946, column 173
   
       spu-box--><style type="text/css" id="spu-css-12651">		#spu
       ```
   
 * Page source shows for every pop-up, the following which all return errors when
   running w3c validator:
 *     ```
       <div class="wppopups-whole" style="display: none"><style type="text/css" id="spu-css-12650">		#spu-bg-12650 {
       			background-color: rgba(0,0,0, 0.5);
       		}
   
       		#spu-12650 .spu-close {
       			font-size: 30px;
       			color: #666;
       			text-shadow: 0 1px 0#fff;
       		}
   
       		#spu-12650 .spu-close:hover {
       			color: #000;
       		}
   
       		#spu-12650 {
       			background-color: rgba(255,255,255, 1);
       			max-width: 600px;
   
       					height: auto;
       					box-shadow:  0px 0px 10px 1px #666;
       				}
   
       		#spu-12650 .spu-container {
       					padding: 25px;
       			height: calc(100% - 28px);
       		}
       								</style>
       		<div class="spu-bg " id="spu-bg-12650"></div>
       ```
   
 * Thank you,
 * SW

Viewing 5 replies - 1 through 5 (of 5 total)

 *  Plugin Author [Damian](https://wordpress.org/support/users/timersys/)
 * (@timersys)
 * [6 years, 4 months ago](https://wordpress.org/support/topic/new-w3c-validator-errors/#post-12327887)
 * Hi SW,
    Please try adding the following in your functions.php and let me know
   if it works
 * if( function_exists( ‘wppopups’ ) ) {
 * remove_action( ‘wppopups_popup_output’, [ wppopups()->printer, ‘styles’ ], 5,
   2 );
    add_action( ‘wp_head’, [ wppopups()->printer, ‘styles’ ], 5, 2 );
 * }
 *  Thread Starter [stevewest15](https://wordpress.org/support/users/stevewest15/)
 * (@stevewest15)
 * [6 years, 4 months ago](https://wordpress.org/support/topic/new-w3c-validator-errors/#post-12336157)
 * Hi Damian,
 * I tried adding the script above.
    This removed the styles from the body: remove_action(‘
   wppopups_popup_output’, [ wppopups()->printer, ‘styles’ ], 5, 2 );
 * This however broke the site. It seems to have failed in adding the styles in 
   the header:
    add_action( ‘wp_head’, [ wppopups()->printer, ‘styles’ ], 5, 2 );
 *  Plugin Author [Damian](https://wordpress.org/support/users/timersys/)
 * (@timersys)
 * [6 years, 4 months ago](https://wordpress.org/support/topic/new-w3c-validator-errors/#post-12336239)
 * Hi Steve,
    yes, I just tried myself. That won’t work and I won’t be able to provide
   a temporary solution I’m afraid.
 * It will be fixed on the next plugin update.
 *  Thread Starter [stevewest15](https://wordpress.org/support/users/stevewest15/)
 * (@stevewest15)
 * [6 years, 4 months ago](https://wordpress.org/support/topic/new-w3c-validator-errors/#post-12336265)
 * Hi Damian,
 * Thank you, look forward to the next update.
 * SW
 *  Plugin Author [Damian](https://wordpress.org/support/users/timersys/)
 * (@timersys)
 * [6 years, 3 months ago](https://wordpress.org/support/topic/new-w3c-validator-errors/#post-12432060)
 * Hi [@stevewest15](https://wordpress.org/support/users/stevewest15/) , new update
   was released. I will mark this as closed

Viewing 5 replies - 1 through 5 (of 5 total)

The topic ‘New W3C Validator Errors’ is closed to new replies.

 * ![](https://ps.w.org/wp-popups-lite/assets/icon-256x256.png?rev=2202255)
 * [WP Popups - WordPress Popup builder](https://wordpress.org/plugins/wp-popups-lite/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/wp-popups-lite/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/wp-popups-lite/)
 * [Active Topics](https://wordpress.org/support/plugin/wp-popups-lite/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/wp-popups-lite/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/wp-popups-lite/reviews/)

 * 5 replies
 * 2 participants
 * Last reply from: [Damian](https://wordpress.org/support/users/timersys/)
 * Last activity: [6 years, 3 months ago](https://wordpress.org/support/topic/new-w3c-validator-errors/#post-12432060)
 * Status: resolved