S
S
Sergey Gromov2015-12-06 14:06:58
HTML
Sergey Gromov, 2015-12-06 14:06:58

Not quite the original bootstrap grid layout, how do you like this solution?

All bootstrap grid layout designers make up layouts, monotonous and gaudy in terms of code cleanliness, a lot of extra blocks, well, for example

<body>
  <div class="container">
    <div class="row">
      <header>
        <div class="col-md-12"></div>
        <div class="col-md-12"></div>
      </header>
    </div>
    <div class="row">
      <main>
        <div class="col-md-12"></div>
        <div class="col-md-12"></div>
      </main>
    </div>
  </div>
</body>

and what if we make the code a little cleaner, and directly, the tag <html>as a block for backgrounda and <body>directly give the block a class <body class="container">, and then our code will become noticeably more readable and pleasant, well, for example, this is a fresh idea, if someone has already tried something like that, describe what pitfalls you might encounter.
<!DOCTYPE html>
<html lang="ru">
<head>
  <meta charset="UTF-8">
  <meta name="author" content="reskwer">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
  <link rel="stylesheet" href="css/bootstrap-grid.css">
  <link rel="stylesheet" href="css/style.css">
  <title>Document</title>
</head>
<body class="container">
  <header class="row">
    <div class="col-md-6">1</div>
    <div class="col-md-6">2</div>
  </header>
  <nav></nav>
  <main class="row">
    <div class="col-md-6"></div>
    <div class="col-md-6"></div>
  </main>
  <footer class="row">
    <div class="col-md-6"></div>
    <div class="col-md-6"></div>
  </footer>
</body>
</html>

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