Prashanth Sams Prashanth Sams - 1 year ago 92
CSS Question

How to prioritize custom css over the default Angular-material css

By default, the search label is padded to left.. i.e.,

padding-left: 3px
is assigned by

enter image description here

When I pad it to right by customizing the same in my
file, it's not taken high priority over the default css from

enter image description here

Answer Source

Load your CSS in the proper order.


  <link rel="stylesheet" type="text/css" href="Angular-material.min.css">
  <link rel="stylesheet" type="text/css" href="custom.css">

This is because the C in CSS stands for Cascading. This means that rules that are seen later on overwrite rules that were seen previously.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download