Need help on css and bootstrap

Need help on css and bootstrap
0

#1

If using bootstrap do i still need css, are those two languages have to work together?


#2

@khaily21 Bootstrap is CSS. :slight_smile: Basically, Bootstrap makes it easier to style pages and standardizes that styling. However, there will be many times where you’ll want to modify the Bootstrap defaults, so you’ll need your own CSS to do that. Does that make sense?


#3

Yes! And what basically to modify the bootstrap default? Thank You for helping I’m kinda new to this trying to get my hands dirty with coding :grinning:


#4

@khaily21 The way that I know is best to override Bootstrap styles is to link to a style.css or similar file and then target the Bootstrap selectors (i.e. container-fluid, nav, table, etc…) that you want to override.

When you link to a style.css file in your index.html, you’ll want to make sure that it comes after the link to Bootstrap.

For example, in the Bootstrap CSS, there may be padding in a fluid container like this:

.container-fluid {
  ...
  padding-left: 15px;
  padding-right: 15px;
  ...
}

If you wanted to override that to make no padding for this selector, you’d add the following to your style.css file:

.container-fluid {
  ...
  padding: 0;
  ...
}

#5

If it ok if I can see a sample of your work on code pen?


#6

Oh yeah how come when I try to link this
in my html it show that Can’t find variable $?


#7

@khaily21

Because you are also trying to include bootstrap.js which requires jQuery (referred as $ by the bootstrap). Add a script tag with link to jQuery before bootstrap.

e.g. http://code.jquery.com/jquery-3.2.1.min.js

Or if you don’t need Bootstrap components or jQuery at the moment just remove bootstrap script tag. That is, use only boostrap css.


#8

This is what I have in my html can you guys please take a look it’s show Can’t find variable:$


#9

@khaily21 Possibly, the problem is in line #6, your script element isn’t closed: <script instead of <script>.


#10

Just closed it now but still not working right


#11

Please can you show your codepen?