Jump to content
  • 0

Выравнивание div через inline-block


FotGOD
 Share

Question

Здравствуйте. Пытаюсь выравнять 2 блока через inline-block. Но они выходят все равно не на одном уровне. Подскажите что не так и как исправить?

 <style>
   *{
        box-sizing: border-box;
        padding: 0;
       
   }
    .container{
       
       
        border: 1px solid red;
        margin: auto;
        
    }
    
    .row{
        background: rgb(206, 200, 200);
       
        
       
    }
    .col-1{
        width: 200px;
        border: 2px solid white;
        display: inline-block;
        height: 100px;
        
        
      
    }
    .col-2{
        width:600px;
        border: 2px solid white;
        display: inline-block;
        height: 100px;
       
        
    }
 
    </style>
</head>

<body>
    <div class="container">
        <div class="row">
                <div class="col-1"> <p>Корзина покупок <br> в корзине 3 товара...</p> </div>
                <div class="col-2"> <h1>Логотип компани</h1></div>
        </div>
        <div class="row">
            // 3 колонки
        </div>
        <div class="row">
            2 колонки
        </div>
    </div>


</body>

RFs6R7S2QG4.thumb.jpg.91fc9156236c73b06f10861a7508c126.jpg

Link to comment
Share on other sites

2 answers to this question

Recommended Posts

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. See more about our Guidelines and Privacy Policy