[ACCEPTED]-User agent stylesheet overriding my table style? Twitter Bootstrap-twitter-bootstrap

Accepted answer
Score: 119

I actually figured this out myself. I had 3 the <!DOCTYPE html> tag wrongly written. So if you have 2 this problem make sure the doctype declaration 1 is correct!

Score: 1

Please import the docs.css into your application 7 as well. If I must say so, you must have 6 realized that the Twitter Bootstrap Docs are using bootstrap.css 5 and a custom docs.css. Try doing, which 4 you can download from the github package. Then, try 3 playing around with the table classes in 2 docs. css without messing with the master 1 css. Or try adding DOCTYPE in headers.

<link href="/media/bootstrap/css/docs.css" rel= "stylesheet">
Score: 1

If declaring <!DOCTYPE html> in the very beginning doesn't 6 work, then it's probably not your user-agent 5 style sheet casuing it. It may be Bootstrap's 4 style sheet overriding your styles (I've 3 had this problem). Make sure your style 2 sheet is linked to after Bootstrap's style sheet 1 in your HTML.

<link href="css/bootstrap.min.css" rel="stylesheet">
<link href="css/mystylesheet.css" rel="stylesheet"> <!-- Your custom style sheet goes after Bootstrap's -->
Score: 1

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

font-size: medium;

When I wanted:

font-size:8pt;

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

<!DOCTYPE html>

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

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

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

More Related questions