how to unset max-height?


Tags: css

Problem :

how to I reset the max-height property to its default, if it has been previously set in some css rule ? because this doesn't work:

pre {
  max-height: 250px;
}

pre.doNotLimitHeight {
  max-height: auto; //Doesn't work at least in chrome
}


Solution :

Reset it to none:

pre {
  max-height: 250px;
}

pre.doNotLimitHeight {
  max-height: none;
}

Reference


    CSS Howto..

    How do you properly apply hover css to
  • elements with list-style-type: none?
  • How to apply CSS to Selected One in Meteor?

    How to write CSS3 animations with JavaScript objects?

    CSS/JS: How do I copy the edge pixels and repeat them

    How to achieve this layout with div and css?

    How to force the Sass interpreter to output non-css code?

    I am wondering how js fiddle is handling their textareas concerning resizing and their layot

    First and Second touch of a button, how to show images at different times?

    how to make this “div” always visible to users

    How do I animate an entire table row in Angular without affecting the table row border?

    How to Customise the angular material date-picker?

    How to revert back to a value in css [closed]

    CSS: How to build a vertical separator with margin on its top and bottom? [closed]

    How to make a parent --> node relationship in css?

    How to move the Google Chart's annotation to the top or anywhere with CSS?

    How to merge css in wordpress

    How to keep nav menu highlighted after click using js in sidebar

    How to get a smooth sine wave alternation with Javascript/JQuery CSS

    how to to set chat box based on user id using css

    How to property adjust table?

    How to change CSS of last tab in Bootstrap Tab

    HTML / CSS: How to get fixed margin between body and footer

    How to add a banner inside a div at the bottom?

    How to use regex to match css elements

    hide/show html div with javascript

    How to use this CSS font technique?

    IOs Cordova long-press shows text-select magnifying glass even with text-selection disabled, how to remove?

    How to arrange elements vertically?

    How do you override “-moz-user-select: none;” on a child element?

    How to align the header menu from left? i see a unexpected margin on left. Help please