D
D
Denis Lvov2020-03-02 13:04:58
css
Denis Lvov, 2020-03-02 13:04:58

How to change font in Bootstrap css?

It may not have anything to do with Bootstrap, but since I'm using it.
I have a tag: I want to assign a class to the tag in css (as is, just this):
<p>Текст</p>

.test {
font-size: 0.9vw;
}


and nothing. nothing happens at all, but if you write it like this: everything works fine. ps !important - this thing doesn't help
<p style="font-size: 0.9vw;">Текст</p>

Answer the question

In order to leave comments, you need to log in

3 answer(s)
T
ThunderCat, 2020-03-02
@dwenlvov

1) Your style should be after bootstrap style. That is, the declaration must be included below the bootstrap css connection (possibly with !important). This is how cascading styles actually work.
2) Also, the .test class should be written after the bootstrap element in the classlist.
In general, it is enough to look at the console and see which style is interrupted by what.

M
Mikhail, 2020-03-02
@RuComMarket

p.test {
font-size: 0.9vw;
}

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question