Set Box Shadow Only on Left and Right Sides

REDUAN AHMAD
Updated on 08-Nov-2024 12:08:52

278 Views

In this article, we’ll learn how to create a box-shadow that appears only on the left and right sides of an element using CSS. Box shadows are popular for adding depth and dimension to web elements, but by default, shadows apply to all four sides. Here, we’ll explore a few simple methods to achieve shadows only on the sides. What is Box-Shadow in CSS? The box-shadow property in CSS adds shadow effects around an element. By adjusting values like offset, blur, and spread, you can control the size, direction, and intensity of the shadow. Key elements of a box-shadow ... Read More

Set Equivalent of Cover Value for Background Size in HTML

Pankaj Kumar Bind
Updated on 08-Nov-2024 11:24:08

1K+ Views

When creating responsive images in web design, a common requirement is to make the image fill the entire container while preserving its aspect ratio. Traditionally, the background-size: cover; CSS property is used with background images to achieve this effect. However, for inline images (using the tag), there is a different approach using the object-fit property. This article will walk you through setting up this equivalent effect on an tag, along with a comparison between using an element and a background image. Approach Using object-fit: cover with Tags ... Read More

Use Custom Percentage Values for Padding in Tailwind CSS

Disha Verma
Updated on 08-Nov-2024 11:20:50

201 Views

Tailwind CSS provides numerous predefined utility classes for styling components, like padding. Sometimes, it is difficult to establish the necessary spacing and responsiveness for various screen sizes and content types using these predefined classes. Tailwind CSS allows us to give a percentage value to the padding, which will help in making the project responsive. Using Custom Percentage In Padding The following approaches in Tailwind CSS allow us to achieve a responsive and attractive layout for the project using Custom Percentage in Padding. Extending Tailwind's Configuration Using Arbitrary Values ... Read More

Difference Between npm i and npm ci in Node.js

Moksh Gupta
Updated on 08-Nov-2024 10:52:26

249 Views

Dealing with Node.js, using npm (Node Package Manager), is important for creating and installing the necessary packages for the project. While most developers know what happens when running npm install or npm i, the npm ci often appears in discussions about continuous integration and continuous delivery pipelines alongside reproducible build processes. This article is about the distinction between "npm i" and "npm ci", the situations in which one should be used over the other, and how each is employed. What is npm i (or npm install)? The "npm i" is actually an abbreviation for npm install, which is the main ... Read More

Input Label Animation in HTML and CSS

Jugal
Updated on 08-Nov-2024 10:15:31

577 Views

In this article, we will create Basic Input Label Animation using HTML and CSS. We will create the structure of the Input Label with the help of HTML and design that HTML structure with the help of CSS. What is Input Label Animation? Input Label Animation which we are going to create in this article. When the user clicks on the Input Field to type, the Input Label Name goes on the border of the Input Field. Which looks quite cool. You can see it in the image given below. Approach to Create Input Label Animation To create ... Read More

Create Netflix Login Page in HTML and CSS

Niranjan E
Updated on 08-Nov-2024 09:39:38

572 Views

Netflix is designed with a user-friendly layout and friendly UI, it's a good example for aspiring web developers to learn. Creating a login page similar to Netflix is a good practice. This article will guide you to create a Netflix login page using HTML and CSS. Why create a Netflix Login Page? Creating a Netflix login page in HTML and CSS will help you as a web developer in several ways. It helps to learn various concepts in web development such as how different layouts are created in HTML, and how a login form ... Read More

Java String toUpperCase() Method Example

Arjun Thakur
Updated on 07-Nov-2024 17:48:23

170 Views

In this article, we will learn how to convert all characters in a string to uppercase using the toUpperCase() method in Java. This method has two versions: one that uses the system's default language settings and another that lets you choose a specific language. Changing string characters to uppercase helps keep the text consistent, especially for usernames or titles. Problem StatementGiven a string, write a Java program to convert all its characters to uppercase using the toUpperCase() method.Input Initial String = "Welcome to Tutorialspoint.com"Output Converted String = "WELCOME TO TUTORIALSPOINT.COM" Steps to convert a string to uppercase The ... Read More

Java 8 Clock Offset Method

Samual Sam
Updated on 07-Nov-2024 17:48:09

205 Views

In this article, we will learn how to use the Clock.fixed() method in Java to obtain a fixed instant on the clock. This method, part of the java.time package is primarily used for testing purposes. It requires two parameters: a fixed Instant and a ZoneId (time zone). The Clock.fixed() method returns a clock that always returns the fixed instant, ensuring the clock’s time remains constant.  Problem StatementGiven the need to use the Clock.fixed() method to get a fixed instant in a specific time zone and display the fixed clock, we will write a program that achieves this task.Input Instant: ... Read More

Java 8 Clock Instant Method

Samual Sam
Updated on 07-Nov-2024 17:47:55

271 Views

In this article, we will learn how to use the instant() method in the Clock class in Java to obtain the current instant of a clock object. This method requires no parameters and returns an Instance representing the current timestamp of the clock. The Instant class is a part of the java.time package and represents a specific point on the timeline in UTC. Problem StatementGiven the Clock class in the java.time package, use the instant() method to obtain the current instant of a clock object. The instant() method requires no parameters and returns an Instant representing the current time in the ... Read More

Get Max Catalog Name Length Using DatabaseMetaData in Java

Smita Kapse
Updated on 07-Nov-2024 17:46:03

110 Views

In this article, we will learn how to retrieve the maximum number of characters allowed in a catalog name using the getMaxCatalogNameLength() method in Java. This method belongs to the DatabaseMetaData interface, which provides comprehensive information about the database, including its structure and capabilities. The method is useful for understanding the limitations imposed by the underlying database in terms of catalog name length. Problem StatementGiven a connection to a database, write a Java program to retrieve and display the maximum number of characters that the database allows for catalog names using the getMaxCatalogNameLength() method.Input A MySQL database connection URL, ... Read More

Advertisements