How to stretch the form submit button using CSS?


Tags: html,css,button,padding,stretch

Problem :

how do I stretch a form submit button using CSS? I'd like to have some kind of horizontal padding between the text inside the button and the button left and right end. Is this possible, and if so, how?

alt text

Tips for making the button prettier (without using images) are also much appreciated :-).



Solution :

Increase the width of the button.

<input type="submit" class="btn" />

CSS:

.btn{
  width:250px; /* adjust value */
}

    CSS Howto..

    RoR - howto convert some HTML-elements with css to Rails

    Using CSS to style a Sencha Touch form - how do I find the elements?

    JavaScript CSS how to add and remove multiple CSS classes to an element

    How to write a:hover in inline CSS?

    How to use the plus sign process of css selectors in LESS?

    How can I caption an image inside a paragraph

    ?

    Hide the element, but show for that place blank

    How to nest classes in css modules and react?

    How do I display epub format book in pure HTML5/CSS/Jquery

    How can I have a transparent overlay and center with flex box?

    How can you separate the navigation bar list from the body list?

    How to properly align two elements in CSS

    How can I make this work?

    How to resize div with CSS by the border

    How to use CSS to control the style of an HTML unordered list?

    How to reapply .css file after UpdatePanel asynchronous call completed

    How do I achieve this particular hover effect?

    CSS: How to do image change on rollover

    how to make colors generated via Javascript be stored permanently in CSS file with or without use of PHP

    CSS: how to position element in lower right?

    How can I create a nav bar with a repeat image inside?

    How to create a medal in css [closed]

    CSS dropdown submenu with dynamic width: how to align left?

    How to create a layout with 2 menu bars in css?

    how to position two image as a background image on div by css

    How to do HTML/CSS form helpers/popover

    How to apply CSS to second word in a string?

    How to rotate + flip element with CSS

    CSS menu list items need to show inside div container

    CSS: How do I stop hover effects from pushing my text?