Home > Article > Web Front-end > How to Add Top Margin to Twitter Bootstrap Rows Without Breaking the Framework?
Adding top margin to rows in Twitter Bootstrap can be a challenge, especially when editing the framework's core scaffolding can lead to unintended consequences.
To avoid disrupting the framework's formatting, a viable solution is to define a new top-buffer class that provides the desired margin. Here's how:
.top-buffer { margin-top:20px; }
With the custom class defined, simply include it on the specific rows where additional top margin is needed. For instance, the following code applies the top margin to the specified row:
<div class="row top-buffer"> ...
By implementing this workaround, developers can maintain Bootstrap's structural integrity while adding the desired spacing to rows when necessary.
The above is the detailed content of How to Add Top Margin to Twitter Bootstrap Rows Without Breaking the Framework?. For more information, please follow other related articles on the PHP Chinese website!