Found 1594 Articles for CSS

Role of CSS flex-direction property row-reverse value

George John
Updated on 04-Jul-2020 06:17:28

191 Views

Use the flex-direction property with row value to set the flex-items horizontally, from right to left.ExampleYou can try to run the following code to implement the row-reverse value −Live Demo                    .mycontainer {             display: flex;             flex-direction: row-reverse;             background-color: orange;          }          .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          

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

Smita Kapse
Updated on 04-Jul-2020 06:16:38

1K+ Views

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

Use CSS width property for a responsive video player

Chandu yadav
Updated on 25-Jun-2020 06:12:23

214 Views

To make your video player responsive, use the width property and set it to 100%ExampleLive Demo                                 video {                width: 100%;                height: auto;             }                                                         To check the effect, you need to resize the browser.    

Achieve Responsiveness for background image with CSS

Anvi Jain
Updated on 04-Jul-2020 06:10:57

198 Views

You can try to run the following code to achieve responsiveness for background image with CSS −ExampleLive Demo                          div {             width: 100%;             height: 300px;             border: 2px dashed blue;             background-image: url('https://www.tutorialspoint.com/python/images/python-data-science.jpg');             background-repeat: no-repeat;             background-size: contain;          }                     To check the effect, you need to resize the browser.          

Use CSS max-width property for responsive image

Ankith Reddy
Updated on 25-Jun-2020 06:10:13

363 Views

You can try to run the following code to implement the max-width property for the responsive imageExampleLive Demo                          img {             max-width: 100%;             height: auto;          }                     To check the effect, you need to resize the browser.          

Use CSS width property for responsive image

George John
Updated on 25-Jun-2020 06:09:28

123 Views

Set the width property to 100% for the responsive image. You can try to run the following code to make your image responsiveExampleLive Demo                                 img {                width: 100%;                height: auto;             }                         To check the effect, you need to resize the browser.          

Building a Responsive Grid-View with CSS

Nitya Raut
Updated on 25-Jun-2020 06:08:40

413 Views

You can try to run the following code to build a responsive grid-view:ExampleLive Demo                          * {             box-sizing: border-box;          }          .header {             border: 1px solid black;             padding: 10px;          }          .leftmenu {             width: 30%;             float: left;           ... Read More

With CSS add transparency to a button

Ankith Reddy
Updated on 24-Jun-2020 16:02:09

3K+ Views

To add transparency to a button, use the CSS opacity property. This creates a disabled look for the button.You can try to run the following code to add transparency to a buttonExampleLive Demo                    .btn1 {             color: black;             text-align: center;             font-size: 15px;          }          .btn2 {             color: black;             text-align: center;             font-size: 15px;             opacity: 0.8;          }                     Result       Click below for result:       Enabled       Disabled    

Usage of CSS align-content property space-between value

George John
Updated on 24-Jun-2020 15:59:06

134 Views

Use the align-content property with value space-between to add space between the flex lines.You can try to run the following code to implement the space-between valueExampleLive Demo                    .mycontainer {             display: flex;             height: 200px;             background-color: red;             align-content: space-between;             flex-wrap: wrap;          }          .mycontainer > div {             background-color: yellow;             text-align: center;             line-height: 60px;             font-size: 30px;             width: 100px;             margin: 5px;          }                     Queue                Q1          Q2          Q3          Q4          Q5          Q6          Q7          Q8          

How to specify the direction of the flexible items inside a flex container with CSS?

Nancy Den
Updated on 24-Jun-2020 15:51:49

105 Views

Use the flex-direction property to specify the direction of the flexible items. You can try to run the following code to implement the flex-direction property:ExampleLive Demo                    .mycontainer {             display: flex;             flex-direction: column;             background-color: orange;          }          .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          

Advertisements