Skip to content
Advertisement

Flexbox is resetting / overriding / changing all my defined CSS Rules for fonts. I don’t know why?

I’ve just started learning CSS flexbox. So I was trying to create a popup modal that requires alignment of three divs side by side and I was able to achieve it using flexbox. But I’m facing a problem:

Flexbox CSS rules are overriding or changing my font-family CSS rules. On removing them I’m able to see all text and paragraphs changing back to defined font family but on including them it’s somehow automatically changing the fonts.

This is how the fonts should look like (without flex). But on running the code given below you’ll notice that it’s ignoring all CSS rules for fonts even after using !important (includes flex).

enter image description here

Please check my comments in CSS to find the part to be removed.

Please run the code below.

JavaScript
JavaScript
JavaScript

If anyone can guide me about my mistake and how can I improve it then it will really help.

Advertisement

Answer

Include the Google CSS import in your HTML

JavaScript

JavaScript
JavaScript
JavaScript
Advertisement