I
I
Ivan7652021-06-19 16:24:32
css
Ivan765, 2021-06-19 16:24:32

How to separate one block in CSS from another?

60cdf1c776f6b838090973.pngHello! There is a problem. How to make the tag not resize due to the . This is especially noticeable on the phone. I make layout. Maybe a positioning problem? I'm typing from the layout, but for clarity I made a 1000x1000px block. That is, if you reduce the screen size to 999px, it will decrease depending on .And I need these blocks to be independent. You can see the problem in the photo. When the window is reduced to the size of a black block, it decreases with it

body{
              background-image: url(png/background1.png);
              background-repeat: no-repeat;
              background-position: center center;
              background-attachment: fixed;
              -webkit-background-size: cover;
              -moz-background-size: cover;
              -o-background-size: cover;
              background-size: cover;

          }
          
          header{
              grid-area: header;
              font-family: Noto Sans;
              font-style: normal;
              font-weight: 500;
              color: white;
              height: 47px;
              width: 100%;
              background-color: #26529C;
              
          }
          
          .logo{
              margin-top: 10px;
              margin-left: 15px;
          }
          
          main{
              margin-top: 10px;
          }
          
          .testblock{
              width: 1000px;
              height: 1000px;
              background-color: black;
          }
          

        
          
 
          

html, body, div, span, applet, object, iframe,
h1, h2, h3, h4, h5, h6, p, blockquote, pre,
a, abbr, acronym, address, big, cite, code,
del, dfn, em, img, ins, kbd, q, s, samp,
small, strike, strong, sub, sup, tt, var,
b, u, i, center,
dl, dt, dd, ol, ul, li,
fieldset, form, label, legend,
table, caption, tbody, tfoot, thead, tr, th, td,
article, aside, canvas, details, embed, 
figure, figcaption, footer, header, hgroup, 
menu, nav, output, ruby, section, summary,
time, mark, audio, video {
  margin: 0;
  padding: 0;
  border: 0;
  font-size: 100%;
  font: inherit;
  vertical-align: baseline;
}
/* HTML5 display-role reset for older browsers */
article, aside, details, figcaption, figure, 
footer, header, hgroup, menu, nav, section {
  display: block;
}
body {
  line-height: 1;
}
ol, ul {
  list-style: none;
}
blockquote, q {
  quotes: none;
}
blockquote:before, blockquote:after,
q:before, q:after {
  content: '';
  content: none;
}
table {
  border-collapse: collapse;
  border-spacing: 0;
}


<body>
              <header>
                 <img class="logo" src="svg/logo.svg"> 
              </header>

              <main>
                   <!--
                  <div class="block1">
                    <img src="svg/block1.svg" class="block1_rectangle">
                  </div>
                  --> 
                  <div class="testblock">
                  
                  </div>
              </main>

              <footer>

              </footer>

              </body>

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question