10.01.2021

Web Button Standard Sizes

  1. The size CSS at-rule descriptor, used with the @page at-rule, defines the size and orientation of the box which is used to represent a page. Most of the time, this size corresponds to the target size of the printed page if applicable. Size may either be defined with a 'scalable' keyword (in this case the page will fill the available dimensions) or with absolute dimensions.
  2. Apr 23, 2008 Button 1 120 x 90; Button 2 120 x 60; Micro bar 88 x 31; Micro button 80 x 15; Vertical banner 120 x 240; Square button 125 x 125; Skyscrapers. Skyscraper 120 x 600; Wide skyscraper 160 x 600; Half page 300 x 600; References. Ad Unit Guidelines; Wikipedia Standard Ad Sizes; Standard Images Sizes; Image Dimensions In Common Usage.
  3. In our 4-part series about Call to Action buttons, we have come to the 3rd post in which I explain the impact of shape and size on the effectiveness of a button. With the help of several studies I will show you the best practices in order to increase the CTR (Clickthrough Rate) of the buttons.

Learn how to style buttons using CSS.

Welcome to Free Buttons.com! Enhance your website with the quality Free Buttons images provided here. Original & professional buttons sets, perfect for any website design project. Choose from a varied selection of free custom hand made buttons. If you use any of the images provided on this site, make sure to put a link back to FreeButtons.com.

Basic Button Styling

Example

.button {
background-color: #4CAF50; /* Green */
border: none;
color: white;
padding: 15px 32px;
text-align: center;
text-decoration: none;
display: inline-block;
font-size: 16px;
}
Try it Yourself »

Button Colors

Use the background-color property to change the background color of a button:

Example

.button1 {background-color: #4CAF50;} /* Green */
.button2 {background-color: #008CBA;} /* Blue */
.button3 {background-color: #f44336;} /* Red */
.button4 {background-color: #e7e7e7; color: black;} /* Gray */
.button5 {background-color: #555555;} /* Black */
Try it Yourself »

Button Sizes

Use the font-size property to change the font size of a button:

Example

.button1 {font-size: 10px;}
.button2 {font-size: 12px;}
.button3 {font-size: 16px;}
.button4 {font-size: 20px;}
.button5 {font-size: 24px;}
Try it Yourself »

Use the padding property to change the padding of a button:

Example

.button1 {padding: 10px 24px;}
.button2 {padding: 12px 28px;}
.button3 {padding: 14px 40px;}
.button4 {padding: 32px 16px;}
.button5 {padding: 16px;}
Try it Yourself »

Rounded Buttons

Use the border-radius property to add rounded corners to a button:

Example

.button1 {border-radius: 2px;}
.button2 {border-radius: 4px;}
.button3 {border-radius: 8px;}
.button4 {border-radius: 12px;}
.button5 {border-radius: 50%;}
Try it Yourself »

Colored Button Borders

Use the border property to add a colored border to a button:

Example

.button1 {
background-color: white;
color: black;
border: 2px solid #4CAF50; /* Green */
}
..
Try it Yourself »

Hoverable Buttons


Use the :hoverCen tech laser level 90980. selector to change the style of a button when you move the mouse over it.

Tip: Use the transition-duration property to determine the speed of the 'hover' effect:

Example

.button {
transition-duration: 0.4s;
}
.button:hover {
background-color: #4CAF50; /* Green */
color: white;
}
..
Try it Yourself »

Shadow Buttons

Use the box-shadow property to add shadows to a button:

Example

.button1 {
box-shadow: 0 8px 16px 0 rgba(0,0,0,0.2), 0 6px 20px 0 rgba(0,0,0,0.19);
}
.button2:hover {
box-shadow: 0 12px 16px 0 rgba(0,0,0,0.24), 0 17px 50px 0 rgba(0,0,0,0.19);
}
Try it Yourself »

Disabled Buttons

Use the opacity property to add transparency to a button (creates a 'disabled' look).

Tip: You can also add the cursor property with a value of 'not-allowed', which will display a 'no parking sign' when you mouse over the button:

Example

Try it Yourself »

Button Width


By default, the size of the button is determined by its text content (as wide as its content). Use the width property to change the width of a button:

Example

.button1 {width: 250px;}
.button2 {width: 50%;}
.button3 {width: 100%;}
Try it Yourself »

Web Button Standard Sizes Chart

Button Groups


Remove margins and add float:left to each button to create a button group:

Example

Try it Yourself »

Bordered Button Group


Use the border property to create a bordered button group:

Example

Try it Yourself »

Vertical Button Group

Html - Resizing a button


Use display:block instead of float:left to group the buttons below each other, instead of side by side:

Example

Try it Yourself »

Button on Image

Try it Yourself »

Animated Buttons

Example

Add an arrow on hover:

Try it Yourself »

Example

Add a 'pressed' effect on click:

Try it Yourself »Web

Example

Fade in on hover:

Try it Yourself »

Example

Add a 'ripple' effect on click:

Try it Yourself »

This is an experimental technology
Check the Browser compatibility table carefully before using this in production.

The sizeCSSat-rule descriptor, used with the @page at-rule, defines the size and orientation of the box which is used to represent a page. Most of the time, this size corresponds to the target size of the printed page if applicable.

Size may either be defined with a 'scalable' keyword (in this case the page will fill the available dimensions) or with absolute dimensions.

See All Results For This Question

Syntax

Values

Web Button Standard Sizes
auto
The user agent decides the size of the page. In most cases, the dimensions and orientation of the target sheet are used.
landscape
The content of the page is displayed in landscape mode (i.e. the longest side of the box is horizontal).
portrait
The content of the page is displayed in portrait mode (i.e. the longest side of the box is vertical). This is the default orientation.
<length>
Any length value (see <length>). The first value corresponds to the width of the page box and the second one corresponds to its height. If only one value is provided, it is used for both width and height.
<page-size>
A5
This matches the standard, ISO dimensions: 148mm x 210mm.
A4
This matches the standard, ISO dimensions: 210mm x 297mm. (most frequently used dimensions for personal printing.)
A3
This matches the standard, ISO dimensions: 297mm x 420mm.
B5
This matches the standard, ISO dimensions: 176mm x 250mm.
B4
This matches the standard, ISO dimensions: 250mm x 353mm.
JIS-B5
This correspond to the JIS standard dimensions: 182mm x 257mm.
JIS-B4
This correspond to the JIS standard dimensions: 257mm x 364mm.
letter
This keyword is a equivalent to the dimensions of letter paper in North America i.e. 8.5in x 11in.
legal
This keyword is a equivalent to the dimensions of legal papers in North America i.e. 8.5in x 14in.
ledger
This keyword is a equivalent to the dimensions of ledger pages in North America i.e. 11in x 17in.

Formal definition

Related at-rule@page
Initial valueauto
Computed valueas specified, but with relative lengths converted into absolute lengths

Formal syntax

Examples

Specifying size and orientation

Nesting inside a @media rule

Specifications

SpecificationStatusComment
CSS Paged Media Module Level 3
The definition of 'size' in that specification.
Working DraftInitial definition

Web Button Standard Sizes Dimensions

Browser compatibility

The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
Update compatibility data on GitHub
DesktopMobile
ChromeEdgeFirefoxInternet ExplorerOperaSafariAndroid webviewChrome for AndroidFirefox for AndroidOpera for AndroidSafari on iOSSamsung Internet
size descriptorChromeNo support NoEdgeNo support NoFirefoxNo support NoIENo support NoOperaNo support NoSafariNo support NoWebView AndroidNo support NoChrome AndroidNo support NoFirefox AndroidNo support NoOpera AndroidNo support NoSafari iOSNo support NoSamsung Internet AndroidNo support No

Web Page Standards

Legend

No support
No support

Cached

See also