- CSS, , , . , , , CSS.
To override the Bootstrap stylesheet with the new CSS rules in your mysite.css stylesheet, make sure that the stylesheet is placed further down in your HTML page than in the bootstrap.css file. Like this:
External:
<!DOCTYPE html>
<html lang="en">
<head>
<link href="/assets/css/bootstrap.css" rel="stylesheet" type="text/css">
<link href="/assets/css/mysite.css" rel="stylesheet" type="text/css">
</head>
</html>
If you do not want to go along the external stylesheet, then using the "inline" rules, as you suggested in your question, will work (for example, override bootstrap.css) too:
Inline:
<!DOCTYPE html>
<html lang="en">
<head>
<link href="/assets/css/bootstrap.css" rel="stylesheet" type="text/css">
</head>
<body>
<table>
<tr>
<td style="border-top: 1px solid red;"></td>
<td></td>
</tr>
</table>
</body>
</html>
source
share