Found 10483 Articles for Web Development

Change the font size of a button with CSS

George John
Updated on 06-Aug-2024 12:03:39

26K+ Views

To Change the font size of a button with CSS, we will be using two different approaches. In this article, we will see how to change the font size of button using CSS properties. We are having three different buttons, our task is to change the font size of buttons representing normal, smaller and larger font size of button. Approaches to Change the Font Size of a Button Here is a list of approaches to Change the font size of a button with CSS which we will be discussing in this article with step-wise explaination and complete example codes. ... Read More

Role of CSS flex-wrap property wrap-reverse value

Smita Kapse
Updated on 03-Jul-2020 07:36:20

184 Views

Use the flex-wrap property with wrap-reverse value to wrap flex-items in reverse order.ExampleYou can try to run the following code to implement the wrap-reverse value −Live Demo                    .mycontainer {             display: flex;             background-color: orange;             flex-wrap: wrap-reverse;          }          .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 background color of a button with CSS

Chandu yadav
Updated on 24-Jun-2020 08:07:39

2K+ Views

To change the background color of a button, use the background-color property.You can try to run the following code to change button’s background colorExampleLive Demo                    .btn {             background-color: yellow;             color: black;             text-align: center;             font-size: 13px;          }                     Result       Click below for result:       Result    

Role of CSS Grid Container

Anvi Jain
Updated on 24-Jun-2020 08:06:57

110 Views

Grid Container in CSS has grid items. These items are placed inside rows and columns. Let us create aCSS Grid container and set the number of columns in a Grid:ExampleLive Demo                    .container {             display: grid;             background-color: blue;             grid-template-columns: auto auto;             padding: 20px;             grid-gap: 20px;          }          .container > div {             background-color: orange;             border: 2px solid gray;             padding: 35px;             font-size: 30px;             text-align: center;          }                     Game Board                1          2          3          4          5          6          

CSS object-fit Property Values

Arjun Thakur
Updated on 03-Jul-2020 07:37:12

137 Views

The object-fit property in CSS is used to resize image or video to fit its container. It has the following valuescontain: Content is scaled to fitcover: clipped to fitfill: fills the content box.ExampleYou can try to run the following code to implement object-fit property with the cover value.Live Demo                    .myimg {             width:250px;             height:350px;             object-fit:fill;          }                     SWIFT          

How an <img> or <video> should be resized to fit its container with CSS?

Yaswanth Varma
Updated on 08-Jan-2024 16:15:47

263 Views

The purpose of adding images to websites is to increase their visual appeal and user appeal. But if we didn't have control over the size of the images on websites, they wouldn't be nearly as attractive. Fortunately, CSS makes it quite simple to alter the image size. The CSS image size can be altered using a variety of methods. First, let's examine the reasons why altering the size of an image in CSS matters. The image would fill every pixel of its size if there were no limits on its size. However, every image should fit inside the container that ... Read More

Flip an image on mouse over with CSS

Jennifer Nicholas
Updated on 24-Jun-2020 08:01:49

417 Views

Use the transform CSS property to flip an image. You can try to run the following code to flip an image on mouseover:ExampleLive Demo                    .myimg:hover {             transform: scaleX(-1);          }                     Heading One       Let's flip the image on mouse over:          

Define the number of columns in CSS Grid Layout

Rishi Rathor
Updated on 24-Jun-2020 07:34:15

1K+ Views

Use the grid-template-columns property to define the number of columns in CSS Grid Layout.You can try to run the following code to set a number of columns. Here, 3 column grid is set:ExampleLive Demo                    .container {             display: grid;             background-color: yellow;             grid-template-columns: auto auto auto;             padding: 20px;             grid-gap: 20px;          }          .container > div {             background-color: blue;             border: 2px solid gray;             padding: 35px;             font-size: 30px;             text-align: center;          }                     Game Board                1          2          3          4          5          6          

How to position text to top right position on an image with CSS

Nancy Den
Updated on 24-Jun-2020 07:33:29

1K+ Views

To position text to top right, use the right and top property. You can try to run the following code to implement it:ExampleLive Demo                    .box {             position: relative;          }          img {             width: 100%;             height: auto;             opacity: 0.6;          }          .direction {             position: absolute;             top: 10px;             right: 19px;             font-size: 13px;          }                     Heading One       Below image has text in the top right:                          Top Right Corner          

How to add rounded corners to a button with CSS?

Daniol Thomas
Updated on 02-Jul-2020 14:01:59

2K+ Views

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

Advertisements