CSS Articles

Page 30 of 130

How to add border to an element on mouse hover using CSS?

Aayush Mohan Sinha
Aayush Mohan Sinha
Updated on 15-Mar-2026 2K+ Views

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 More

Best HTML & CSS Code Editors for Linux

Satish Kumar
Satish Kumar
Updated on 15-Mar-2026 1K+ Views

HTML and CSS are the building blocks of web development. They are the primary languages used for creating beautiful and responsive websites. Whether you're a seasoned developer or a beginner, having the right tools can make your coding experience smoother and more efficient. In this article, we'll explore the best HTML and CSS code editors for Linux. What is a Code Editor? A code editor is a software application that allows developers to write, edit, and manage code. It provides a user-friendly interface with features like syntax highlighting, code completion, and debugging tools. Code editors are available for ...

Read More

How to Style Google Custom Search Manually using CSS?

Shubham Vora
Shubham Vora
Updated on 15-Mar-2026 1K+ Views

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 More

Benefits of CSS in Search Engine Optimization

Biswaindu Parida
Biswaindu Parida
Updated on 15-Mar-2026 1K+ Views

CSS, or Cascading Style Sheets, is a style sheet language used to describe the presentation of a document written in HTML or XML. CSS allows web developers to control a web page's layout, colors, fonts, and other visual elements, playing a crucial role in website design and creating a better online experience for users. CSS Benefits for SEO Faster Loading Clean HTML Structure Mobile ...

Read More

How to add an image as the list-item marker in a list using CSS?

Aayush Mohan Sinha
Aayush Mohan Sinha
Updated on 15-Mar-2026 1K+ Views

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 More

How to change the height of br tag?

Aayush Mohan Sinha
Aayush Mohan Sinha
Updated on 15-Mar-2026 11K+ Views

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 More

How to change opacity while scrolling the page?

Aayush Mohan Sinha
Aayush Mohan Sinha
Updated on 15-Mar-2026 6K+ Views

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 More

How to change Font Size Depending on Width of Container?

Aayush Mohan Sinha
Aayush Mohan Sinha
Updated on 15-Mar-2026 7K+ Views

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 More

How to crop an image using canvas?

Diksha Patro
Diksha Patro
Updated on 15-Mar-2026 3K+ Views

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 More

How to darken an Image using CSS?

Diksha Patro
Diksha Patro
Updated on 15-Mar-2026 21K+ Views

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 More
Showing 291–300 of 1,299 articles
« Prev 1 28 29 30 31 32 130 Next »
Advertisements