Found 1566 Articles for CSS

Building Tooltip using CSS

AmitDiwan
Updated on 30-Oct-2023 14:22:30

142 Views

A tooltip is used to set extra information. This is visible on the web page when visitor moves the mouse pointer over an element. The tooltip text can be given directions such as top, bottom, right, and left. Create a Tooltip To create a tooltip, create a Tooltip container and set the text for the Tooltip in it. The Tooltip text is set using the − Hover over me Some toolTip text The Tooltip is positioned using the position property − position: relative; However, the Tooltip text ... Read More

How to create a delete confirmation modal with CSS and JavaScript?

AmitDiwan
Updated on 07-May-2020 10:54:53

2K+ Views

To create a delete confirmation modal with CSS and JavaScript, the code is as follows −Example Live Demo    body {       font-family: Arial, Helvetica, sans-serif;    }    .modal {       text-align: center;       display: none;       position: fixed;       z-index: 1;       padding-top: 100px;       left: 0;       top: 0;       width: 100%;       height: 100%;       background-color: rgba(0, 0, 0, 0.4);    }    .modalContent {       font-size: 20px;   ... Read More

Advance CSS layout with flexbox

AmitDiwan
Updated on 27-Oct-2023 14:23:54

461 Views

CSS3 provides a layout mode Flexible Box, commonly called as Flexbox. Flexbox (flexible box) is a layout mode of CSS3. Using this mode, you can easily create layouts for complex applications and web pages. It includes the container, flex items, etc. The container has the following properties − flex-direction flex-wrap flex-flow justify-content align-items align-content Here are all the Flexbox examples in a single image. It uses the flex, flex-wrap, justify-content, align-items, etc. − Style the Parent Container We have styled the parent container here. The flex container becomes flexible by setting the display property to flex ... Read More

How to create a Modal Box with CSS and JavaScript?

AmitDiwan
Updated on 07-May-2020 10:51:21

486 Views

To create a modal box with CSS and JavaScript, the code is as follows −Example Live Demo    body {       font-family: Arial, Helvetica, sans-serif;    }    .modal {       text-align: center;       display: none;       position: fixed;       z-index: 1;       padding-top: 100px;       left: 0;       top: 0;       width: 100%;       height: 100%;       background-color: rgba(0, 0, 0, 0.4);    }    .modalContent {       font-size: 20px;     ... Read More

Setting Cross Browser Opacity using CSS

AmitDiwan
Updated on 27-Dec-2023 16:08:34

236 Views

The property opacity is the modern solution and works for Firefox, Safari, opera, and every version of chrome. The -moz-opacity property is the opacity property for Firefox while the –khtml-opacity property is for safari. The filter property is to give opacity like effect. Using all these values together as a fallback for modern opacity allows us to use opacity in all browsers. Set the images We will check the cross-browser opacity for the images. The second image above will get opaque on all browsers − Opacity for the 2nd image The opacity for the second image ... Read More

How to create a full screen video background with CSS?

AmitDiwan
Updated on 07-May-2020 10:48:31

466 Views

To create a full screen video background with CSS, the code is as follows −Example Live Demo    * {       box-sizing: border-box;    }    body {       margin: 0;       font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;       font-size: 17px;    }    .backgroundVideo {       position: fixed;       right: 0;       bottom: 0;       min-width: 100%;       min-height: 100%;    }    .content {       position: fixed;       bottom: 0;     ... Read More

CSS to put icon inside an input element in a form

AmitDiwan
Updated on 31-Oct-2023 11:40:21

4K+ Views

To show how to put an icon inside an input element in a form using CSS, use the Font Awesome. For adding the font awesome icons on a web page, include the CDN − Place Icons Inside an Input Element We have used the Font Awesome icons here for Username, Email and password − Icon for the Username For the Username, the following icon is included − ... Read More

How to create a comparison table with CSS?

AmitDiwan
Updated on 07-May-2020 10:44:56

380 Views

To create a responsive table with CSS, the code is as follows −Example Live Demo    table {       border-collapse: collapse;       border-spacing: 0;       width: 100%;       border: 1px solid #ddd;    }    th, td {       text-align: center;       padding: 16px;       font-weight: bold;       font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;       font-size: 18px;    }    th:first-child, td:first-child {       text-align: left;    }    tr:nth-child(even) {       background-color: #f2f2f2    } Comparison Table Example Features Basic Pro Free Yes No Customer Support No Yes Validity 1 Year Lifetime Warranty No 5 Years OutputThe above code will produce the following output −

How to create a responsive table with CSS?

AmitDiwan
Updated on 07-May-2020 10:42:19

1K+ Views

To create a responsive table with CSS, the code is as follows −Example Live Demo    body{       font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;    }    div{       overflow-x: auto;    }    table {       border-collapse: collapse;       border-spacing: 0;       width: 100%;       border: 1px solid rgb(0, 0, 0);    }    th, td {       text-align: left;       padding: 8px;    }    tr:nth-child(even){background-color: #f2f2f2} Responsive Table Example First Name Last Name marks marks marks marks marks marks marks marks marks marks JACK ROY 50 60 10 20 40 50 10 20 30 40 Evelyn Monroe 24 14 22 44 55 44 11 55 22 33 Joe Anderson 54 22 99 55 91 61 81 11 22 55 OutputThe above code will produce the following output −On resizing the window the scrollbar will appear as follows −

CSS Transparency Using RGBA

AmitDiwan
Updated on 31-Oct-2023 11:42:46

1K+ Views

Use the RGBA() values for CSS transparency. Set the alpha channel parameter to specify the opacity for color − .transparent { background-color: rgba(0, 0, 255, 0.582); } RGBA color value includes the rgba(red, green, blue,  alpha). Here, the alpha is to be set for transparency i.e. − 0.0: fully transparent 1.0: fully opaque Transparency With RGBA The following is the code for implementing CSS transparency using RGBA. Here, we have set the alpha parameter to a value 0.582 for transparency − Example ... Read More

Advertisements