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 float

    to bottom of a

    when you can't use position:relative and position:absolute

    How to align multiple images in “li” on center

    How to do drop-down box like “More action” in gmail

    Keeping content “fixed” under slideshow of different image sizes

    Can't figure out how to make a box with multiple images with CSS/HTML

    How to control the area of background so it only makes a limited area has color other area don't?

    Using `.toggle()` rather than applying a class to show content

    How to use ASP.NET Authorization Yet Permit Access to .css Files?

    How does a CSS rule override another CSS rule?

    how to resolve border-radius property issue in all versions of browsers? [duplicate]

    How to apply this CSS class to a given LinkButton?

    How to get divs 100% of browser using css?

    How to get a border around this polygon?

    How to use JSF generated HTML element ID with colon “:” in CSS selectors?

    How can I create two columns of text next to each other using CSS?

    Different JEditorPanes show html content, using the same css rules

    How can I center a button in the cell of a table using CSS ASP.NET

    How to create a floating div with jQuery

    how can i get a css table-cell link not to stretch the clickable area

    How can I make list item spacing more acceptable in html/css email for all viewers?

    Entire window becomes blur after a modal is shown jQuery why?

    How to Add flexibility to SASS for another color

    how to make button with image responsive

    How to use @Media queries

    How to use toggle css classes on an element onclick?

    How to switch between tabs using href?

    How do Pinterest DropDown menu's work?

    CSS: how to style a div so that it has no effect

    Prevent div from showing after slideUp() - jQuery

    How to select a child element inside a div using CSS