0

I am using Twitter Bootstrap via cdn and I need to change a little bit the column height of a table but I am not sure how to do it. I am using cdn so I don't have the downloaded bootstrap.css file. I tried to overwrite the class table-striped and change it's default styling but no luck.

Is it possible to do it with cdn?

Thanks.

Mike
  • 777
  • 3
  • 16
  • 41
  • In general, your styles need to follow the bootstrap.css as explained here: http://stackoverflow.com/questions/18068397/how-to-customize-bootstrap Also be aware of CSS specificity. Using `.table-striped` in your CSS may not be enough to override the specificity of the Bootstrap selector. – Carol Skelly Jan 31 '17 at 22:26

1 Answers1

3

You, obviously, can't change the existing CSS file.

You need to load another CSS file and write a new rule-set to replace the rules in the existing one.

The trickiest part of this will be making sure that the selector you use is specific enough so that it overwrites the earlier rules.

You can file the exact selector used to apply the rules you want to change using the Inspector built into the developer tools in your browser. Inspect the element and look at the styles.

You can copy/paste the selector directly. That way your selector will be equally specific and, because your stylesheet is loaded after the Bootstrap one, will replace any rules that set the same property.

Quentin
  • 914,110
  • 126
  • 1,211
  • 1,335