r/WebdevTutorials • • Dec 17 '20

Bootstrap is hard (!?)

For someone who knows an average amount of HTML & CSS (and a little bit of JS) I find it kinda hard to integrate bootstrap in my website. Am I the only one facing issues?

I know it's supposed to make my work easier, but when I apply my own CSS properties, it messes up the bootstrap elements & classes, and I find it almost impossible to debug it.

Do you have a hack/special way of dealing with bootstrap? And normal CSS?

37 Upvotes

26 comments sorted by

View all comments

11

u/mirana_bot Dec 17 '20 edited Dec 17 '20

I've been using bootstrap for years from v3 to v4. and made 100+ templates with it.

the only advice I can give to you is don't apply your own styles to the bootstrap classes as much as possible especially on the grid system because they have media query styles. for example you don't want to style the .row, .col classes directly like override them with so much styles. just use them as a container of your element.

on components like button, create your own class then override the bootstrap css there.

you can message me the link of your website so I can give you more advice on how to deal with bootstrap.

3

u/huhwhatnowwhat Dec 17 '20

THIS!!!

Do as much as you can with the bootstrap classes (which will be a lot) before writing your own css.

When you write your own, don’t target bootstrap rules. Add your own class.

2

u/not_a_gumby Dec 17 '20

Correct way of doing it.

1

u/SadSenpai420 Dec 17 '20

Definitely never forgetting this from now on xD