HTML | DOM Style flexShrink Property Last Updated : 08 Aug, 2022 Comments Improve Suggest changes Like Article Like Report The Style flexShrink property in HTML DOM is used to set how the specific item can be shrink in relation to the remaining flexible items within the container. Syntax: It is used to return the flexShrink property.object.style.flexShrinkIt is used to set the flexShrink property.object.style.flexShrink = "number|initial|inherit" Property Values: number: It is used to set a number which specify how much item is shrinkable in relation to the remaining flexible items. Its default value is 0.initial: It sets the flexShrink property to its default value.inherit: This property value is inherited from its parent element. Example-1: HTML <!DOCTYPE html> <html> <head> <title> HTML DOM Style flexShrink Property </title> <style> #Geeks { width: 350px; height: 100px; border: 1px solid #c3c3c3; display: flex; } #Geeks div { flex-grow: 1; flex-shrink: 1; flex-basis: 300px; } </style> </head> <body> <h4>Click the button</h4> <button onclick="GFG()">Click Here! <br> </button> <p></p> <div id="Geeks"> <div style="background-color:#64c962; color:white;"> GeeksForGeeks1 </div> <div style="background-color:#2c932a; color:white;" id="Geeks2"> GeeksForGeeks2 </div> </div> <script> function GFG() { // Safari 6.1+ document.getElementById( "Geeks2").style.WebkitFlexShrink = "5"; document.getElementById( "Geeks2").style.flexShrink = "5"; } </script> </body> </html> Output: Example-2: HTML <!DOCTYPE html> <html> <head> <title> HTML DOM Style flexShrink Property </title> <style> #Geeks { width: 350px; height: 100px; border: 1px solid #c3c3c3; display: flex; } #Geeks div { flex-grow: 1; flex-shrink: 1; flex-basis: 300px; } </style> </head> <body> <h3>The flex-shrink Property</h3> <div id="Geeks"> <div style="background-color:#44cc3f;"> </div> <div style="background-color:#34a030;"> </div> <div style="background-color:#2c932a;"> </div> <div style="background-color:#267023;"> </div> <div style="background-color:#175415;"> </div> </div> </body> </html> Output: Supported Browsers: The browser supported by DOM flex-shrink property are listed below: Google Chrome 29.0 and aboveEdge 12.0 and aboveInternet Explorer 10.0 and aboveFirefox 20.0 and aboveOpera 12.1 and aboveSafari 9.0 and above Comment More infoAdvertise with us S SHUBHAMSINGH10 Follow Improve Article Tags : Web Technologies HTML HTML-DOM HTML-Property Similar Reads HTML DOM | Style paddingRight Property The Style paddingRight property is used for setting or returning the right padding of an element. The padding property inserts the user desired space within the border of an element. Syntax : To get the property:object.style.paddingRightTo set the property:object.style.paddingRight = "%|length|initi 2 min read HTML | DOM Style pageBreakBefore Property The pageBreakBefore property in HTML DOM is used to set or return the page-break-before characteristics before the specified element in HTML document. This property works in print and print preview mode. The pageBreakBefore property has no effect on absolutely positioned elements in the HTML DOM. Th 2 min read HTML | DOM Summary Object The DOM Summary Object is used to represent the HTML <summary> element . The Summary element is accessed by getElementById(). Syntax: document.getElementById("ID"); Where âidâ is the ID assigned to the âsummaryâ tag. Example-1: html <!DOCTYPE html> <html> <head> <title> 2 min read HTML | DOM Style userSelect Property The DOM Style UserSelect Property is used to set or return whether the text can be selected by the user or not. Syntax: It is used to return the property: object.style.userSelectIt is used to set the property: object.style.userSelect = "auto|none|text|all" Properties : auto: It has the default value 2 min read HTML | DOM Title Object The Title Object in HTML DOM is used to represent the HTML <title> element. The <title> element can be accessed by using getElementByTagName() method. Syntax: document.getElementByTagName(); Properties: The title object contains single property text which is used to set or return a text 2 min read HTML DOM | Style paddingLeft Property The Style paddingLeft property is used for setting or returning the left padding of an element. The padding property inserts the user desired space within the border of an element.Syntax : To get the property: object.style.paddingLeftTo set the property: object.style.left = "auto|length|%|initial|in 2 min read HTML | DOM Style paddingBottom Property The Style paddingBottom property is used for setting or returning the bottom padding of an element. The padding property inserts the user desired space within the border of an element. Syntax: To get the property:object.style.paddingBottomTo set the property value:object.style.paddingBottom = "%|len 2 min read HTML DOM Style outlineOffset Property The Style outlineOffset property in HTML DOM is used to set or return the outline offset and draw it beyond the border edge. Outlines do not take space, unlike borders. It returns a string that represents the outline-offset property of an element. Syntax: Return the outlineOffset property.object.st 1 min read HTML | DOM Style paddingTop Property The Style paddingTop property is used for setting or returning the top padding of an element. The padding property inserts the user desired space within the border of an element. Syntax : To get the property:object.style.paddingTopTo set the property:object.style.paddingTop = "%|length|initial|inher 2 min read HTML DOM Style listStyleType Property The HTML DOM Style listStyleType property is used to set or return the list-item marker type. It has default values as "disc" for <ul> and "decimal" for <ol> and returns a string that represents the type of the list. SyntaxReturns the listStyleType property.object.style.listStyleTypeSet 2 min read Like