Introduction to Tailwind CSS
Tailwind CSS is a utility-first CSS framework that streamlines web development by providing a set of pre-designed utility classes. These classes enable rapid styling without writing custom CSS, promoting consistency and scalability. Tailwind’s approach shifts focus from traditional CSS components to functional classes, empowering developers to efficiently build responsive and visually appealing interfaces with minimal effort....
read more
Hide scroll bar, but while still being able to scroll using CSS
To hide the scrollbar use -webkit- because it is supported by major browsers (Google Chrome, Safari or newer versions of Opera). There are many other options for the other browsers which are listed below:...
read more
How to set position of an image in CSS ?
To change the position of an image in CSS, you can use properties such as object-position and float. The object-position property aligns the position of the image within its container using x and y coordinates. On the other hand, the float property is used to move an element within the container to the left or right of the image placement....
read more
How to Change Style of Scrollbar using Tailwind CSS ?
Tailwind does not provide any built-in utilities for styling scrollbars, but you can customize the scrollbar appearance using CSS. To change the scrollbar’s appearance using Tailwind, we need to use the scrollbar-* classes. These classes are used to customize various aspects of the scrollbar, such as its width, color, and behavior....
read more
How to take screenshot of a div using JavaScript ?
A screenshot of any element in JavaScript can be taken using the html2canvas library. This library can be downloaded from its official website. The below steps show the method to take a screenshot of a <div> element using JavaScript....
read more
How to place Font Awesome icon to input field ?
Place Font Awesome icon in your form is an innovative idea, that will bring attention to your website. It is as simple as putting Font Awesome icon on any button. The <i> tag and <span> tag are used widely to add icons on the webpages. To add any icons on the webpages, it needs the font-awesome link inside the head section. The font-awesome icon can be placed by using the fa prefix before the icon’s name....
read more
How to Align modal content box to center of any screen?
...
read more
How to align flexbox columns left and right using CSS ?
The flex columns can be aligned left or right by using the align-content property in the flex container class. The align-content property changes the behavior of the flex-wrap property. It aligns flex lines. It is used to specify the alignment between the lines inside a flexible container....
read more
CSS Interview Questions and Answers
CSS stands for Cascading Style Sheets and CSS is essential for creating visually engaging web pages and user interfaces for web applications. It is a language used to make websites look good by controlling how things like colors, fonts, and layout are displayed on a webpage. It was first proposed by Håkon Wium Lie in 1994....
read more
Difference between em and rem units in CSS
While setting the size of any element in CSS, we have two choices. The first one is absolute units and the other is relative units. Absolute units are fixed and not relative to anything else. They are always identical in any case. They involve cm, mm, px, etc. On the other side, relative units are relative to something else. It may be the size of the parent element or the size of the main HTML. Relative units cover em, rem, vw, vh, etc. These are scalable units and help in responsive design. Many of us might get confused between the relative units, especially the em and the rem units. Let’s break down the difference between those two. Basically that both rem and em are scalable and relative units of size, but with em, the unit is relative to the font size of its parent element, while the rem unit is only relative to the root font size of the HTML document. The “r” in rem stands for “root”....
read more
Display div element on hovering over <a> tag using CSS
In this article, we will know how to render the div element by hovering over the <a> tag using CSS, & will understand its implementation through the example. We can apply an adjacent sibling CSS selector property to the <a> tag that will display the hidden div element’s content while hovering over it. The Adjacent sibling selector is a CSS Combinators, used to select the element that is adjacent or the element that is next to the specified selector tag. CSS combinators explain the relationship between two selectors. CSS selector is used to apply the various styling properties to the selected elements based on the patterns & it can be a simple selector or a complex selector that consists of more than one selector connected using combinators....
read more
How to Create a Dropdown List with Array Values using JavaScript ?
In this article, we will see how to add elements to the select element from the JavaScript array. We can also get selected values in the dropdown list using JavaScript. Here we will populate the dropdown list with an array. Below is a description of popular approaches used in JavaScript....
read more