Found 1566 Articles for CSS

How to select “last child” with a specific class using CSS?

Tarun Singh
Updated on 02-May-2023 14:20:17

5K+ Views

CSS or cascading style sheet is an essential part of modern web development, as it allows web developers to style their websites and create visually appealing designs. There are times when we want to select the last child of a specific class using CSS, but how? There are different approaches that can be used to select the last child. In this article, we will see how to select the last child with a specific class in CSS. Approach 1: Using :last-child() Selector The :last-child() selector method is the first method available in CSS. This selector is used in ... Read More

How to secure cascading style sheets?

Tarun Singh
Updated on 02-May-2023 14:16:28

356 Views

Web development in this modern era heavily relies on Cascading Style Sheets (CSS), which play a crucial role in the visual appearance or designing of the UI and layout of web pages. The CSS enables website designers to create responsive and captivating websites that are easy on the eyes, regardless of the device used to access them. Nonetheless, CSS, like any other technology, has vulnerabilities, making it susceptible to security threats. However, with the rise of cyber threats and security breaches, securing CSS has become a significant concern for web developers. The attackers can exploit vulnerabilities in CSS code to ... Read More

How to style a href links in React using Tailwind CSS?

Tarun Singh
Updated on 02-May-2023 13:55:12

1K+ Views

React is a popular JavaScript library used for building web applications. When creating a React application, it's important to style your components in an aesthetically pleasing way. One of the ways to achieve this is by using a CSS framework such as Tailwind CSS. In this article, we will see how to style a href links in React using Tailwind CSS with different methods or classes available in Tailwind CSS. Pre-requisite To use the Tailwind CSS in a React application, we’ll first need to install it. Let’s see the steps for creating a new react project and installing tailwind ... Read More

How to create a Share Button with different Social Handles using HTML and CSS?

Riya Kumari
Updated on 28-Apr-2023 17:26:33

8K+ Views

In today's digital age, social media has become an essential part of our lives. Whether it's for personal or professional use, we all want to share our content with the world. That's where social sharing buttons come in handy, allowing users to quickly and easily share content on their favorite social media platforms. In this article, we will explore how to create a share button with different social handles using HTML and CSS. Create a Share Button With Different Social Handles We will walk through step-by-step instructions on how to create a share button with multiple social media options, including ... Read More

4 Different Ways to Center an Element Using CSS

Riya Kumari
Updated on 28-Apr-2023 17:34:24

105 Views

When designing a webpage or document, it's important to ensure that elements are visually balanced and positioned correctly. One common task in web development is to center an element within its container. While it may seem like a simple task, there are multiple ways to achieve this using CSS. In this article, we will explore four different methods for centering elements using CSS. We'll cover techniques using text-align, margin, Flexbox, and CSS Grid, and discuss the pros and cons of each method. Whether you're new to web development or looking to improve your skills, mastering these techniques will help you ... Read More

How to drop fill color to change the image color using HTML and CSS?

Riya Kumari
Updated on 20-Nov-2023 11:50:46

1K+ Views

In the world of web development, it's essential to have knowledge about the latest CSS and HTML techniques to add stunning visual effects to a website. One such effect is the "color drop effect, " which allows you to change the color of an image on hover by dropping a fill color on it. With this effect, you can make your website more interactive and engaging for the visitors. In this article, we will guide you through the process of creating a color drop effect using HTML and CSS. So, whether you are a beginner or an experienced web developer, ... Read More

Bottom Half Hidden Text Revealer on Mouse Over in CSS

Riya Kumari
Updated on 28-Apr-2023 17:18:28

333 Views

Typography is used in web design to engage people, convey a message, and make a visual effect. Compared to print typography, digital typography allows web designers more fluidity and versatility. It's a crucial element in user interface design. It aids in building a strong visual hierarchy, establishing the website's general tone, and striking a solid aesthetic balance. In addition to improving readability and accessibility, typography should be utilized to enlighten people. In this article, we will discuss about how to create an effect in which the bottom half of the text will be hidden and it will appear when the ... Read More

How to design a modern sidebar menu using HTML and CSS?

Riya Kumari
Updated on 28-Apr-2023 17:15:30

2K+ Views

When you think about the layout of a typical website, it is likely that you include a column of important links (navigation links for various sections in the webpage) to the right or left of the main content area. This component is known as ‘sidebar’ and is commonly used as menu across the web. Although it is commonly used, the developers generally add this element to the website for navigating from one page to other, even to different sections of a webpage. Let’s understand this feature and try to create a modern sidebar by only using HTML and CSS. What ... Read More

How to Create Image Stack Illusion by using HTML and CSS?

Riya Kumari
Updated on 28-Apr-2023 16:43:25

1K+ Views

Visual illusions are quite fascinating when it comes to web development. Using visual illusions in our websites attracts users since it can play with their minds. It tricks our brains into believing something which is actually not present. These illusions can be created using various techniques in CSS. One of most commonly used illusion is image stack illusion, which simply a delusion of depth. In this article, we will discuss steps involved in creating an image stack illusion by only using HTML and CSS. Let’s get started. What is Image Stack Illusion? Image stack illusion is a visual delusion which ... Read More

Primer CSS Truncate Expand on Hover or Focus

Riya Kumari
Updated on 28-Apr-2023 16:41:40

305 Views

Text display is an essential factor in web designing which affects the user experience and the readability of your website. If your text is displayed properly in an organized manner, the users will easily understand it and hence, will be attracted to your website. However, sometimes, the text may be too long for a specified space in the webpage. To properly display that text, we use the truncate method. This method is offered by Primer CSS in which you can not only truncate your text but also expand it on hover or focus effect. In this article, we will discuss ... Read More

Advertisements