css: how to override max-width value with a larger (less restrictive) value

Tags: override,css

Problem :

I have a css file with this style:

.filefield-element .widget-edit {max-width: 70%;}

I wanted to increase the max-width without modifying that css file, so I created a custom css file with this style:

.filefield-element .widget-edit {max-width: 99%;}

In the "html/styles" pane, I see that the styles are listed in the correct order:

.filefield-element .widget-edit {
    max-width: 99%;

.filefield-element .widget-edit {
    float: left;
    max-width: 70%;

However, "max-width: 99%" is not overriding "max-width: 70%". It seems that the more restrictive value (70%) is used, even when the less-restrictive value (99%) comes first.

Is there a way to override a max-width value with a larger (less restrictive) value?

Solution :

You can override (unset) max-width with

.foo{ max-width:none; }

... to clear any inherited max-width.

    CSS Howto..

    How to set Highcharts data series in x-axis using crosshairs?

    How to put Logo & navigation in one line

    how to set !important on a multi value css transform?

    How to pause .setInterval() on hover and on .click() of interior content?

    How should I do this in CSS?

    How to have a css element with transitions except initially?

    How to achieve cellpadding with divs or likeiwse?

    How to remove vertical scrollbar from iframe inside the page

    How to place the block on the top of “second” screen using CSS?

    How to fix the css padding

    How to align a link icon after the text via CSS?

    How do I get this div to cover flash control (jw player)?

    How to fix transparent div child in parent?

    How do I make my website’s layout work gracefully with different browser window sizes, like Tumblr does?

    How Do I Trigger My jQuery Event?

    How to do custom text editing in CSS and getting a error in a school project

    How to emulate Google's thick, red underline text decoration

    How to have div horizontally scroll when resized.

    How to change font color of select2 control using css

    How to minify HTML with CSS and Javascript? [closed]

    How can I prevent divs animated using CSS keyframes from colliding

    How do I select the TD of the TH to which it references with only CSS?

    Scroll to next and previous div using scrollTop, how do I accomplish this?

    How to draw a shape using a piece of image in php

    JS manipulation on CSS and how it result on page rendering

    How to bundle Angular 2 component css?

    How to control the size of a table cell in css

    how to pass context value to css

    How to dynamically reload a .css?

    How to display a div's name with jquery and css