How to block this style

juliacina

New Member
I have this code :
Code:
<div class="text_layer"  style="z-index: 2; color: transparent; text-shadow: black 0px 0px 70px;">
How can i block a specific style or a specific property included in the style for example i want to block just this style:

style="z-index: 2; color: transparent; text-shadow: black 0px 0px 70px;
or

color: transparent; text-shadow: black 0px 0px 70px;
so the result would be like this

Code:
[CODE]<div class="text_layer" >
 

Blaz

Moderator & Translator
Staff member
Moderator
Do you want to remove the style or want to hide elements with this style?
 

juliacina

New Member
I want that style shouldn't be applied on the page, I mean just this code should be applied

Code:
<div class="text_layer" >
Can you give me the rule for hiding and removing
 
Last edited:

Alex302

Filters Developer
Staff member
Administrator
I want that style shouldn't be applied on the page, I mean just this code should be applied

Code:
<div class="text_layer" >
Can you give me the rule for hiding and removing
If you want to select <div class="text_layer" >
Code:
domain.name##.text_layer
or
Code:
domain.name##div["text_layer"]
 

seanl

Well-Known Member
It seems that the OP's goal is not only to select the specific element, but also to modify inline CSS styles.

There can be several ways, but it will depend on situations.

A quick way is to use JS to remove style attribute, like
Code:
#%#AG_onLoad(function(){ document.querySelector('.text_layer').removeAttribute("style") });
AG_onLoad is just a shorthand of
Code:
window.addEventListener('DOMContentLoaded', function(){ ...} )
but you need to be sure that the inline style comes with the main html document, not set dynamically.

To do this purely by CSS,
Code:
domain.name#$#.text_layer { z-style:auto!important; color: initial!important; text-shadow: none!important; }
or you can modify each style properties above if there is other stylesheet which is supposed to be applied to .text_layer.
It is possible to ignore all styles applied to the element by
Code:
domain.name#$#.text_layer { all:inherit!important; }
but note that this does not work on IE and Safari (https://developer.mozilla.org/en/docs/Web/CSS/all).
 
Top