L
L
Levelse2015-02-21 18:40:33
css
Levelse, 2015-02-21 18:40:33

How to hide content under the spoiler, with adaptive layout?

Hello, such a question, it is necessary to hide the content under the spoiler when reducing the screen resolution.
There is a code

<div id="block">
   <p>1000 символов текста</p>
</div>

It is necessary to hide it under the spoiler, at a resolution of less than 768px. I have tried adding a button i.e.
<a href="#spoiler1" data-toggle="collapse" class="btn btn-primary">Открыть</a>
   <div class="collapse" id="spoiler1">
      <div class="well">
         <div id="block">
<p>1000 символов текста</p>
         </div>
      </div>
   </div>

But this code hides everything, and I only need it at a resolution of less than 768px.
Thank you.

Answer the question

In order to leave comments, you need to log in

2 answer(s)
A
Azim Kurt, 2015-02-21
@Symphony

google: media query css

D
Dmitry, 2015-02-22
@soledar10

media screen and (max-width: 768px){
#id{
display: none;
}
}
or
media screen and (max-width: 768px){
.className{
display: none;
}
}

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question