slbgdp
slbgdp

Reputation: 223

Where to find bootstrap classes' css definitons?

What I want is, for example, to change the css background color of navigations bar of .navbar-default, which can be done by .navbar-default{background-color:#000;}

But I want is, to see the full css style definitions of .navbar-default class, so I can look and change every element(text-color, hovering colors and every other thing) as I like. Rather than inspecting webpage elements for css codes from browsers, I want to look in a place where the definitions contain.

Upvotes: 9

Views: 10177

Answers (4)

Lahiru Pinto
Lahiru Pinto

Reputation: 1681

This is for new version

https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.css

Just check the header import link and remove .min part if its minimised link

Upvotes: 1

Sreetam Das
Sreetam Das

Reputation: 3409

If you are using the CDN "version" of Bootstrap, then you won't be able to edit the CSS.

A good way to do what you want is by using your own local copy of the bootstrap.css file. You'll find herein all the definitions, and you can alter them as per your wish.

Conversely, you could also edit the .sass or .less files if you want more control.

edit:

Since the OP is using CDN, follow the following steps and you should be just fine:

  • Identify the element/ tag that you want to edit: div, input, etc.
  • Identify the attribute you want to edit: color, height, etc.
  • most importantly: identify the class or id of the element.

After you've done the above, create a new styles file, for example: styles.css, and write your new custom CSS rules in there as per CSS rules.

Include this file by linking it in your .html file using the link tag

Voila!

Upvotes: 1

Gerard
Gerard

Reputation: 15786

You can find all in readable format here

Upvotes: 9

Dhruvil21_04
Dhruvil21_04

Reputation: 2189

You can find and edit it in bootstrap.min.css

Upvotes: 0

Related Questions