T
T
Tatiana2019-07-29 15:23:43
css
Tatiana, 2019-07-29 15:23:43

@media styles clash, how to fix?

I want to make an adaptive, but unfortunately the media styles are interrupted, Why do the styles go astray? did not help others went.

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <link rel="stylesheet" href="css/style.css">
    <link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/css/bootstrap.min.css" integrity="sha384-ggOyR0iXCbMQv3Xipma34MD+dH/1fQ784/j6cY/iJTQUOhcWr7x9JvoRxT2MZw1T" crossorigin="anonymous">
    <link href="https://fonts.googleapis.com/css?family=Roboto:300,400,700&display=swap" rel="stylesheet">
    <title>Good_carboard</title>
</head>
<body>
   <header>
   	<div class="container">
               <div class="row align-items-center">
          <div class="col-4 col-sm-3">
            <div class="logo">
             <!-- Logo -->
            </div>
          </div> 
          <div class="col-8 col-sm-9">
           <div class="numbers"> 8 (347) 271-54-28</div> 
           <div class="numbers num">8 (937) 363-30-00</div> 
           <div class="buttons">
                <button class="but_io">
                    <img class="but_io_img" src="img/logo_phone.png" alt="">
                    <span class="hide">Заказать звонок</span>
                </button>
           </div>
          </div>
        </header>

/* Media */
   @media screen and (max-width: 576px) {
     .logo{
        background-image: url(../img/logo_2.png) center no-repeat;
        width: 35px;
        height: 35px;   
          }
     .hide{
      display: none;
     }
     .numbers{
      display: block;
     }
   }


/* Reset css */


body{
    color: #ffffff;
    margin: 0;
}

button {
    background-color: transparent;
    background-color: #ff9d00;
    padding: 10px;
}

input, button:focus 
{
    outline: none;
    text-decoration: none;
}

input, button:active {
    outline: none;
    text-decoration: none;
}

img{
    max-width: 100%;
}
/* Styles for elements */
.col-8 {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    margin-top: 65px;
    margin-bottom: 23px;
}

.logo{
  background: url(../img/logo_1.png) center no-repeat;
  width: 191px;
  height: 61px;
  background-size: 100%;
  margin-top: 59px;
  margin-bottom: 15px;
}

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