AllSupported
Home How To Linux Search
  1. Home
  2. /
  3. CSS
  4. /
  5. Overwride CSS Class

Overwride CSS Class

By Tech Writer • January 15, 2017 • 1 min read
The properties of a second class will override those already set. There is no need to use !important here. For example:
.red { background-color: red; }
.background-none { background: none; }
and
<a class="red background-none" href="#carousel">...</a>
  Credits: https://stackoverflow.com/questions/20954715/how-to-override-the-properties-of-a-css-class-using-another-css-class#20955958    

Related Articles

Use jQuery to select current menu item in css

 This tip is great for use with Joomla and mmenu. @micha149 has shown me this jQuery snippet which will catch all absolute and relative URLs. var url = window.location.href; // Will only work if st

Dynamically resizing images based on viewport

&lt;style&gt; .img { /* basic responsive img */ max-width: 100%; height: auto; width: auto\9; /* IE8 */ } &lt;/style&gt;       http://www.dynamicdrive.com/forums/entry.php?293-3-Ways-to-Resize-S

How to swap CSS class names without touching the CSS codes

  This technique might be very useful for this that deal with templates where the CSS themes may be overridden but you wish to keep certain classes references even when the template undergoes version

AllSupported

Your trusted source for tech support and tutorials.

Categories

  • How To (90)
  • Linux (35)
  • PHP (26)
  • Productivity (23)

Resources

  • About Us
  • Contact
  • RSS Feed

Connect

Stay updated with the latest tech support articles and tutorials.

© 2025 AllSupported. All rights reserved.