---
title: Filtrar estilos en línea de consentimiento del usuario
url: "https://www.seopress.org/es/soporte/hooks/filtrar-estilos-en-linea-de-consentimiento-del-usuario/"
lang: es
updated: 2021-09-30
hook_name: seopress_rgpd_full_message_styles
required_version: 3.8.2
---

# Filtrar estilos en línea de consentimiento del usuario

- **Hook name:** `seopress_rgpd_full_message_styles`
- **Required version:** 3.8.2

```php
function sp_rgpd_full_message_styles($styles) {
	//Attention, some CSS are necessary for the proper functioning of the cookie bar
	$styles = '<style>.seopress-user-consent {
			left: 50%;
			position: fixed;
			z-index: 8000;
			padding: 20px;
			display: inline-flex;
			justify-content: center;
			border: 1px solid #CCC;
			max-width:100%;
			width:100%;
			bottom:0;
			transform: translate(-50%, 0);text-align:center;
			background:#F1F1F1;
		}
		@media (max-width: 782px) {
			.seopress-user-consent {
				display: block;
			}
		}
		.seopress-user-consent.seopress-user-message p:first-child {
			margin-right:20px
		}
		.seopress-user-consent p {
			margin: 0;
			font-size: 0.8em;
			align-self: center;
		}
		.seopress-user-consent button {
			vertical-align: middle;
			margin: 0;
			font-size: 14px;
		}
		.seopress-user-consent button:hover{}
		#seopress-user-consent-close{
			margin: 0;
			position: relative;
			font-weight: bold;
			border: 1px solid #ccc;
			background:none;
			color:inherit;
		}
		#seopress-user-consent-close:hover{
			cursor:pointer;
			background:#222;
			color:#fff;
		}
		.seopress-user-consent-hide{
			display:none;
		}
		.seopress-edit-choice{
			background: none;
			justify-content: start;
			z-index: 7500;
			border: none;
			width: inherit;
			transform: none;
			left: inherit;
			bottom: 0;
			top: inherit;
            	}</style>';
	
	return $styles;
} 
add_filter('seopress_rgpd_full_message_styles','sp_rgpd_full_message_styles');
```

Source: [https://gist.github.com/wp-seopress/846be63885a3e6a7e5b060f5d54c3232](https://gist.github.com/wp-seopress/846be63885a3e6a7e5b060f5d54c3232)



