2
I’m making a CSS to control the printing of a page.
The only thing I’m going to show in print is an image that’s on the page.
So in CSS I did like this:
*:not(#imagem-draw){
display: none;
}
But the result is that it shows nothing. How can I do this with CSS ?
<div id="content" class="colorir">
<div class="main">
<div id="draw-action">
<div id="desenho">
<img src="img/imagem.png" alt="" class="desenho" id="sketch-draw">
</div>
</div>
</div>
</div>
Try
body *:not(#imagem-draw)
.– KaduAmaral
Then I switched to this, but the screen went blank.
– Diego Souza
Post the HTML code in the body of the question.
– KaduAmaral
Very large. Not necessary... has a lot of element and an image in the middle.
<img src="img/imagem.png" alt="Seu Desenho" class="desenho" id="sketch-draw">
– Diego Souza
Because then, do not post the whole code, but I need to see the hierarchy until you get to the image, there is no way to mount a CSS without knowing the structure of HTML.
– KaduAmaral
I posted the hierarchy.
– Diego Souza