Jump to content
  • 0

Почему не работает Bootstrap 3 сетка без bootstrap. css?


tigrus2014
 Share

Question

Приветствую! В общем суть вопроса такова... Для того чтобы избавится от длинного css кода в Bootstrap (знаю можно сжимать файл, можно использовать только сетку, это всё не то) из файла bootstrap.css была взята часть кода для галереи таким образом, один только  класс col-md-4,  container и row. Все классы переписаны в другой css файл.

 

<body>
    <div class="container">
	<div class="row">
	<div class="col-md-4">Content columns</div>
	<div class="col-md-4">Content columns</div>
	<div class="col-md-4">Content columns</div>
	</div>
	</div>

    <!-- jQuery (necessary for Bootstrap's JavaScript plugins) -->
    <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.12.4/jquery.min.js"></script>
    <!-- Include all compiled plugins (below), or include individual files as needed -->
    <script src="js/bootstrap.js"></script>
  </body>
html {
  font-family: sans-serif;
  -webkit-text-size-adjust: 100%;
      -ms-text-size-adjust: 100%;
}

body {
  margin: 0;
}

.container {
  padding-right: 15px;
  padding-left: 15px;
  margin-right: auto;
  margin-left: auto;

}


@media (min-width: 768px) {
  .container {
    width: 750px;
  }
}
@media (min-width: 992px) {
  .container {
    width: 970px;
  }
}
@media (min-width: 1200px) {
  .container {
    width: 1170px;
  }
}

.row {
  margin-right: -15px;
  margin-left: -15px;

}

 .col-md-4 {
  position: relative;
  min-height: 1px;
  padding-right: 15px;
  padding-left: 15px;
   float: left;
  width: 33.33333333%;
}


@media (min-width: 992px) {
  .col-md-4 {
    float: left;
  }
  
  .col-md-4 {
    width: 33.33333333%;
  }
}

.clearfix:before,
.clearfix:after,
.container:before,
.container:after,
.row:before,
.row:after {
  display: table;
  content: " ";
}

.clearfix:after,
.container:after,
.row:after {
  clear: both;
}

Дальше пойдет мой код. Отключаю Bootstrap.css и всё падает. Вопрос почему?

Edited by tigrus2014
Link to comment
Share on other sites

1 answer 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