how to disable width: 100%; and box-sizing: border-box;


Tags: css

Problem :

I have submit button in wrapper div. I have global settings for all this situations where input is in wrapper like that.

I want just for one to be in center of wrapper, but property width:100%; and box-sizing: border-box; is on full width so my text-align: center; property will not work. I want to disable full width to margin button to center of wrapper.

Question:

How to disable width: 100%; and box-sizing: border-box; with CSS?

Therefore I can center input to center.

HTML:

<div class="wrapperInput">
    <input type="submit" class="submit" value="Submit">
</div>  

CSS:

#wrapper .wrapperInput input {
    width: 100%;
    -webkit-box-sizing: border-box;
    -moz-box-sizing: border-box;
     box-sizing: border-box;
}


Solution :

Try with:

#wrapper .wrapperInput input {
    width: auto;
    -webkit-box-sizing: content-box;
    -moz-box-sizing: content-box;
     box-sizing: content-box;
}

    CSS Howto..

    How to uniformly darken colors?

    Css Sub menu needed to show on the left not on the right of the menu

    how to align in centre using html css

    How to change css content hover effect background color css php in this situation?

    How to order rows (or divs) vertically using blueprint css?

    How do I tile background images in this specific way?

    How to remove jquery mobile button color or override button css?

    How to get use the functionality same as “-webkit-appearance” in firefox?

    How to use 'dynamic CSS' in Rails

    css, how to stop an element being squashed by container

    How to Determine CSS selector on a DOM object?

    how to use font-faces in css file within spring 3

    CSS: How to align text, next to image inside a span?

    How put div element to bottom of another div element

    How to give sentence case to sentences through CSS or javascript? [closed]

    How to turn off visjs active shadow box?

    How to change the color of item selection radcombobox with a css style?

    WordPress TwentyTen menu: how to CSS-select sub-menus in a specific position?

    how to make div background image responsive

    jQuery - How to get elements height value and use it in another element via css code?

    How to implement Read more / Read less in pure CSS

    CSS - How to make the A Link work inside a DIV with background image

    How to include a non-standard font-face in azure?

    How to target a specific div out of 4 divs with the same class with CSS

    How to disable scrollbars in Webmethods 8?

    Why css3 slideshow does not work

    CSS & HTML & JQuery - How to display a div OVER other divs and set to them a shady background

    CSS how can i turn the scrolling off during the animation?

    How to handle hiding dynamic elements in JQUERY with different names but same CSS class

    Flexbox: How do I create my thumbnails to span 100% of the container width?