Archived topic
Padding for cookies law pop-up
13 replies · Started by anabella on March 15, 2018
Hello, I´ve obtained a code for the cookies law through https://cookieconsent.insites.com/ and I put in on GP Hooks > wp_head. It´s working but I´d like to reduce the padding. How can I do it?
Hi there,
What code are you adding in wp_head, please have a look at Tom's note here:
https://generatepress.com/forums/topic/page-header-not-showing-on-blog-page/#post-520871
The padding is defined by the plugin/code itself with this CSS which you can overwrite:
.cc-window.cc-banner {
padding: 1em 1.8em;
width: 100%;
-ms-flex-direction: row;
flex-direction: row;
}
Hello Leo,
Thanks for your reply. I changed the code from wp-head to before header. However, I´m not sure where to put the CSS that you mentioned. I tried adding it to "additional CSS" but it doesn´t work.
The code that I´m using looks like this:
<link rel="stylesheet" type="text/css" href="//cdnjs.cloudflare.com/ajax/libs/cookieconsent2/3.0.3/cookieconsent.min.css" />
<script src="//cdnjs.cloudflare.com/ajax/libs/cookieconsent2/3.0.3/cookieconsent.min.js"></script>
<script>
window.addEventListener("load", function(){
window.cookieconsent.initialise({
"palette": {
"popup": {
"background": "#fcfafa",
"text": "#9c9c9c"
},
"button": {
"background": "#e6e4e4",
"text": "#999999"
}
},
"theme": "classic",
"content": {
"message": "Utilizamos cookies para que tengas la mejor experiencia de navegación. Si sigues navegando entendemos que aceptas nuestra política de cookies",
"dismiss": "Acepto",
"link": "Leer más",
"href": "http://www.mcasensio.es/politica-de-cookies/"
}
})});
</script>
Did you modify the padding number to overwrite the original?
.cc-window.cc-banner {
padding: 0 !important;
}
Hello Leo. As I mentioned before, I don´t know where to put this CSS anyway. I tried adding it to "aditional CSS" but it doesn´t work. Should I add it to "additional CSS" (somehow)? or inside the GP hook itself? Thanks
Additional CSS should work.
I'm not seeing the pop-up window anymore though.
Hello Leo,
The pop-up window is still there and I tried the CSS that you suggested but it isn´t working: the padding is still the same.
Thanks
I'm still not seeing it unfortunately: http://www.screencast.com/t/xGUiaY89x4S
Let me know if I'm missing something here.
Hello Leo, please check it out here https://www.mcasensio.es/contacto/.
Thanks
I'm not seeing my CSS being added here: https://generatepress.com/forums/topic/padding-for-cookies-law-pop-up/#post-521700
Any caching plugin?
Hello Leo,
I´ve just added the CSS again. Please check it https://www.mcasensio.es/contacto/
Thanks
Edited the CSS above: https://generatepress.com/forums/topic/padding-for-cookies-law-pop-up/#post-521700
Give it another shot.
Great, it´s working now! :) Thanks Leo
No problem!