How to Add Vertical Space Between Rows in Twitter Bootstrap Without Modifying the \'row\' Class?

Linda Hamilton
Release: 2024-10-30 09:18:27
Original
408 people have browsed it

How to Add Vertical Space Between Rows in Twitter Bootstrap Without Modifying the

Adding Vertical Space Between Rows in Twitter Bootstrap

Adding a top margin to "row" elements can enhance the visual appeal of your webpage. However, directly editing the "row" class in the Twitter Bootstrap framework is discouraged, as it's a crucial component of the page structure.

To address this, a more suitable approach involves creating a new CSS class, such as "top-buffer," that provides the desired margin.

<code class="css">.top-buffer {
  margin-top: 20px;
}</code>
Copy after login

By applying this class to a specific row, you can add a top margin without affecting the default behavior of the "row" element. For instance, if you want to add a 20-pixel top margin to a particular row, simply use the following markup:

<code class="html"><div class="row top-buffer">
  ...
</div></code>
Copy after login

This method allows you to add a top margin to individual rows whenever necessary, leaving the core "row" class unmodified.

The above is the detailed content of How to Add Vertical Space Between Rows in Twitter Bootstrap Without Modifying the \'row\' Class?. For more information, please follow other related articles on the PHP Chinese website!

source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Latest Articles by Author
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template