Bootstrap Columns


#1

Hello,

This seems rather basic, but is there a different implementation to use bootstrap css in Discourse? The code below is standard bootstrap to make two columns in a row, but within discourse this does not make two rows. When I inspect the elements I notice that row has css, but the col classes have no css. I notice that the col classes are used elsewhere, how can I get the standard bootstrap column system?

EDIT: code formatting

<div class="row">

  <div class="col-sm-6">

  </div>

  <div class="col-sm-6">

  </div>

</div>

(Felix Freiberger) #2

I’d guess that this will be pretty hard. As you already realized, Discourse doesn’t use Bootstrap, and adding Bootstrap will certainly break the UI – Bootstrap is not a small CSS library that can be added to projects later on, it’s a full CSS framework, meant for projects that are built from the ground up against it.

You best bet is to use pure CSS to get what you want. If you need help with that: What do you want to achieve, exactly? :slight_smile:


#3

Thanks @fefrei that makes sense now! Are there any existing css classes that achieve the same effect as responsive columns in bootstrap? If not I can make my own, just don’t want to recreate the wheel if there is already something similar included!


(Felix Freiberger) #4

I don’t think this is that easy to recreate.

What do you want to achieve, exactly? Remember that Discourse uses different CSS for desktop and mobile, so you don’t necessarily need to implement responsiveness yourself – you can just specify different customizations for desktop and movile :slight_smile: