User agent stylesheet overriding my table style? Twitter Bootstrap

后端 未结 5 2126
难免孤独
难免孤独 2020-12-13 06:00

I\'m using twitter bootstrap. My problem is that font-sizes in tables are wrong. For some reason the User Agent stylesheet is overriding the bootstrap table styles.

5条回答
  •  不思量自难忘°
    2020-12-13 06:08

    I had the same issue as the OP. I wanted lovely small text and some user stylesheet was overiding it and putting:

    font-size: medium;
    

    When I wanted:

    font-size:8pt;
    

    I placed the following at the top of my HTML page:

    
    

    All was good then, a bad habit to get into to not declare doctype at the top. All user stylesheets have now gone.

    To discover what is overriding what on your CSS it is always a good idea to inspect element (F12) and you can modify and untick attributes on the fly until you get to right, then update your CSS file with it!

    However if you do have a user stylesheet issue, these values will be locked.

提交回复
热议问题