Found 10483 Articles for Web Development

Set the width of a button with CSS

Rishi Rathor
Updated on 03-Jul-2020 07:42:15

5K+ Views

To set the button width, use the CSS width property.ExampleYou can try to run the following code to set the width of a button −Live Demo                    .btn {             background-color: yellow;             color: black;             width: 120px;             text-align: center;             font-size: 15px;             padding: 20px;             border-radius: 15px;             border: 3px dashed blue;          }                     Result       Click below for result:       Result    

Add a pressed effect on button click with CSS

Yaswanth Varma
Updated on 20-Feb-2025 12:47:44

2K+ Views

Adding a pressed effect on button click with CSS makes the user feel more interactive with the web page. It provides an immediate visual effect indicating that the button press has been registered. It helps in improving the user experience. In this article, we have a button on our web page. Our task is to add a pressing effect while clicking the button. Approaches to Add a Pressed Effect on Button Here is a list of approaches to add a pressed effect on button click with CSS which we will be discussing in this article with stepwise explanation and complete ... Read More

Usage of CSS grid-row-gap property

George John
Updated on 24-Jun-2020 08:27:22

81 Views

Set gap between Grid rows with CSS. You can try to run the following code to implement the grid-row-gap property.ExampleLive Demo                    .container {             display: grid;             background-color: green;             grid-template-columns: auto auto;             padding: 20px;             grid-column-gap: 20px;             grid-row-gap: 20px;          }          .ele {             background-color: orange;             border: 2px solid gray;             padding: 35px;             font-size: 30px;             text-align: center;          }                     Game Board                1          2          3          4          5          6          

Role of CSS flex-wrap property wrap value

Nancy Den
Updated on 03-Jul-2020 07:43:07

131 Views

Use the flex-wrap property with wrap value to wrap flex-items.ExampleYou can try to run the following code to implement the wrap value −Live Demo                    .mycontainer {             display: flex;             background-color: orange;             flex-wrap: wrap;          }          .mycontainer > div {             background-color: white;             text-align: center;             line-height: 40px;             font-size: 25px;             width: 100px;             margin: 5px;          }                     Quiz                Q1          Q2          Q3          Q4          Q5          Q6          Q7          Q8          Q9          

Create a Bordered Button Group with CSS

Chandu yadav
Updated on 24-Jun-2020 08:18:05

445 Views

You can try to run the following code to create a bordered button group with border propertyExampleLive Demo                    .btn {             color: black;             background-color: yellow;             width: 120px;             text-align: center;             font-size: 15px;             padding: 20px;             float: left;             border: 3px solid blue;          }          .mybtn {             background-color: orange;          }                     Result       Click below for result:                Result          Result          Result          Result          Result          

Set the speed of the hover effect with CSS

Daniol Thomas
Updated on 06-Aug-2024 15:41:51

15K+ Views

To set the speed of the hover effect with CSS, we will be using two different approaches. These approaches includes using CSS transition and CSS animation properties. We are having a button and a div element which changes the styles upon hovering on them. Our task is to set the speed of the hover effect with CSS. Approaches to Set the Speed of the Hover Effect with CSS Here is a list of approaches to set the speed of the hover effect with CSS which we will be discussing in this article with step-wise explaination and complete example codes. ... Read More

Create Hoverable Buttons with CSS

Krantik Chavan
Updated on 24-Jun-2020 08:16:45

404 Views

Use the CSS :hover selector to create hoverable buttons. You can try to run the following code to create hoverable buttons:ExampleLive Demo                    .btn {             background-color: yellow;             color: black;             text-align: center;             font-size: 15px;             padding: 20px;             border-radius: 15px;             border: 3px dashed blue;          }          .btn:hover {             background-color: orange;             color: black;             border: 3px solid blue;          }                     Result       Click below for result:       Result    

How to add a colored border to a button with CSS?

Arjun Thakur
Updated on 03-Jul-2020 07:44:36

954 Views

To add colored border, use the CSS border property.ExampleYou can try to run the following code to add a colored border.Live Demo                    .button {             background-color: yellow;             color: black;             text-align: center;             font-size: 15px;             padding: 20px;             border-radius: 15px;             border: 3px dashed blue;          }                     Result       Click below for result:       Result    

Role of CSS flex-wrap property no-wrap value

Nishtha Thakur
Updated on 03-Jul-2020 07:45:12

227 Views

Use the flex-wrap property with nowrap value to avoid flex-items to wrap.ExampleYou can try to run the following code to implement the nowrap value −Live Demo                    .mycontainer {             display: flex;             background-color: orange;             flex-wrap: nowrap;          }          .mycontainer > div {             background-color: white;             text-align: center;             line-height: 40px;             font-size: 25px;             width: 100px;             margin: 5px;          }                     Quiz                Q1          Q2          Q3          Q4          Q5          Q6          Q7          Q8          Q9          

Change the padding of a button with CSS

Yaswanth Varma
Updated on 08-Jan-2024 14:23:04

5K+ Views

Button padding, as used in web development, describes the gap that exists between a button's text or icon and its edges. With CSS (Cascading Style Sheets), you can change a button's padding. The CSS padding property is used to add space to an element's border and surrounding area. Padding is essential since it is the innermost portion of the CSS box model that affects the element's spacing. The CSS box model contains the element's margin and border styles in addition to padding. The CSS padding is important to achieving the ideal balance between design aesthetics and functionality, which is essential ... Read More

Advertisements