Article Categories
- All Categories
-
Data Structure
-
Networking
-
RDBMS
-
Operating System
-
Java
-
MS Excel
-
iOS
-
HTML
-
CSS
-
Android
-
Python
-
C Programming
-
C++
-
C#
-
MongoDB
-
MySQL
-
Javascript
-
PHP
-
Economics & Finance
Web Development Articles
Page 571 of 801
How to Add Commas Between a List of Items Dynamically with CSS?
Lists that contain multiple items are frequently used in websites, and separating them with commas can help enhance readability and user experience. The conventional method of adding commas to lists is to add them manually. However, this can be time-consuming, particularly for long lists. Fortunately, CSS provides an excellent solution to add commas dynamically to lists of items. Syntax .item ~ .item::before { content: ", "; } CSS Selectors Used General Sibling Selector (~) The ~ selector in CSS selects all elements that are preceded by a specified element ...
Read MoreHow to add border to an element on mouse hover using CSS?
CSS provides developers with tremendous power to customize and style their page in whatever way they want. One of the many features it provides to enable this level of customization is the ability to add interactivity to web elements. Hover effects can provide a more dynamic user experience. By applying a border to an element on mouse hover, the user is given a visual cue that they have interacted with that element. Syntax selector:hover { border: width style color; } :hover Selector The :hover selector in CSS is used to ...
Read MoreHow to Style Google Custom Search Manually using CSS?
Google Custom Search Engine (GCSE) allows you to integrate Google's powerful search functionality into your website. While Google provides default styling, you can customize the appearance using CSS to match your site's design. Syntax .gsc-control { /* Styles for the main search container */ } .gsc-input-box { /* Styles for the search input wrapper */ } #gsc-i-id1 { /* Styles for the search input field */ } .gsc-search-button-v2 { /* Styles for the search button */ } ...
Read MoreHow to add an image as the list-item marker in a list using CSS?
CSS allows you to replace the default bullet points in lists with custom images using the list-style-image property. This creates visually appealing lists that match your website's design theme. Syntax selector { list-style-image: none | url(image-path) | initial | inherit; } Possible Values ValueDescription noneNo image is used (default behavior) url()Specifies the path to the image file initialSets the property to its default value inheritInherits the value from the parent element Example: Custom Image as List Marker The following example demonstrates how to use a custom ...
Read MoreHow to change the height of br tag?
The tag is a commonly used HTML element for adding line breaks in web content. However, sometimes the default height of a line break may be insufficient, requiring you to increase the spacing between lines. In this article, we will explore methods to effectively change the height of a tag using CSS properties and additional line break elements. Syntax selector { line-height: value; } Approach We are going to see two different approaches to apparently change the height of the tag. They are as follows − ...
Read MoreHow to change opacity while scrolling the page?
In this article, we will learn how to modify the opacity of HTML elements based on the user's scrolling position. This technique adds dynamic visual effects to your website and can be accomplished using JavaScript or jQuery along with CSS. Approaches We will explore two methods to change opacity while scrolling ? Using JavaScript − Native JavaScript with scroll event listeners Using jQuery − jQuery library for simplified syntax Method 1: Using JavaScript Here's how to implement opacity changes during scrolling with vanilla JavaScript ? Steps Define the target element ...
Read MoreHow to change Font Size Depending on Width of Container?
Changing font size depending on the width of a container is essential for creating responsive typography that adapts to different screen sizes and devices. You can achieve this using CSS viewport units, media queries, or JavaScript plugins to ensure your text remains readable and visually appealing across all devices. Syntax /* Using viewport units */ selector { font-size: vw; } /* Using media queries */ @media (max-width: value) { selector { font-size: value; } } ...
Read MoreHow to crop an image using canvas?
In this article, we will discuss how to crop an image using HTML5 Canvas. When you crop an image, you essentially trim away parts of it to create a new image with a specific size or composition. This can be useful for resizing images to fit specific frames or removing unwanted parts of an image. Approaches We have two different approaches to crop an image using canvas − Using the drawImage() method Using the getImageData() method Let us look at each approach in detail. Approach 1: Using the drawImage() Method The drawImage() ...
Read MoreHow to darken an Image using CSS?
To darken an image using CSS, we can apply various techniques such as adjusting brightness with filters, creating overlays with opacity, or using gradient overlays. This effect is commonly used to enhance text readability over background images or create visual emphasis. Syntax /* Method 1: Using filter property */ img { filter: brightness(percentage); } /* Method 2: Using overlay with opacity */ .container::after { background-color: black; opacity: value; } /* Method 3: Using linear-gradient overlay */ .element { background-image: ...
Read MoreHow to Create Wave Background using CSS?
To create wave background using CSS is a popular technique used to add a unique and dynamic visual element to web pages. We will be understanding two different approaches to create wave background using CSS. In this article, we are having a blank webpage and our task is to create wave background using CSS. Approaches to Create Wave Background Here is a list of approaches to create wave background using CSS which we will be discussing in this article with stepwise explanation and complete example codes ? Wave Background Using SVG ...
Read More