Found 1594 Articles for CSS

How to Get this Text-Wrapping Effect With HTML/CSS?

Yaswanth Varma
Updated on 20-Apr-2023 14:36:16

788 Views

Utilizing the CSS word-wrap property, large words are broken up and wrapped onto the following line. When an unbreakable string exceeds the length of the contained box, this feature is utilized to avoid overflow. This attribute specifies where a word should break when it becomes too long for the container, preventing overflow. When the content goes above the boundary of the container, it specifies how the words should be broken. Syntax Following is the syntax for text-wrapping word-wrap: normal | break-word | initial l inherit ; For getting better understanding on how to get this text-wrapping effect with HTML/CSS, ... Read More

How to style a select dropdown with only CSS?

Tapas Kumar Ghosh
Updated on 10-May-2023 11:13:20

246 Views

The website navigation plays an important role while building the website because it contains the dropdown list. The collection of various lists that exists in one or more navigation is called a dropdown list. To create the dropdown list it needs the select and option element. The option element is used under the select element which collects the list of various types like products, subjects, courses, etc. In this article, we are going to design the select dropdown with only CSS. Syntax option1 option1 The select element is used to ... Read More

Difference between CSS and JavaScript

Pradeep Kumar
Updated on 19-Apr-2023 17:22:08

3K+ Views

A website is developed using HTML. HTML is the backbone and provides the skeleton for the website. But using HTML alone, we can’t create our desired website. Cascade styling sheets is another language that adds another layer to the website. It applies formatting to the website, changes the layout of the website and makes the website appear beautiful. JavaScript is a programming language that makes a website functionable. It adds animations, pop up screens and a lot more to interact with the user. What is CSS? CSS stands for Cascading Style Sheets. CSS is a language which is used ... Read More

Which table property specifies the width that should appear between table cells in CSS?

Shubham Vora
Updated on 19-Apr-2023 14:27:27

510 Views

In HTML, a table contains columns and rows. The table cells don’t contain the space between two cells by default. If we add some space between table cells, it can improve the UI of the table. In CSS, the ‘border-spacing’ property adds the space between the table space. Also, we need to use the ‘border-collapse’ CSS property with the ‘separate’ value while using the ‘border-spacing’ CSS property. Syntax Users can follow the syntax below to use the ‘border-spacing’ CSS property to add spaces between the table cells. table { border-collapse: separate; border-spacing: 3rem; ... Read More

Which property specifies the width of a border in CSS?

Shubham Vora
Updated on 19-Apr-2023 14:25:57

294 Views

In CSS, the ‘border’ property is used to apply the border to any HTML element, such as div. Also, we can set the different styles for the border, color, width, etc. In this tutorial, we will learn different approaches to set the width of the border of the element. Also, we will learn to set the width of different sides of the element. Use the border-width CSS property to set the width of the border The ‘border-width’ CSS property is used to define the width of the border. Users can pass the four values to set the width ... Read More

Which property specifies the distance between nearest border edges of marker box and principal box?

Shubham Vora
Updated on 19-Apr-2023 14:23:19

216 Views

In CSS, the ‘marker-offset’ CSS property is used to specify the distance between the nearest border edges of marker box and principal box. In CSS, the marker is a pseudoelement that refers to the bullet points of the lists. Here, we will learn to set the distance between the nearest border edges of marker box and principal box. Syntax Users can follow the syntax below to set the distance between the nearest border edges of the marker box and the principle box. marker-offset: value; Example In the example below, we have created an unordered list of different programming ... Read More

Which property is used to underline, overline, and strikethrough text using CSS?

Shubham Vora
Updated on 19-Apr-2023 14:22:28

366 Views

In CSS, the ‘text-decoration’ property is used to underline, overline, and strikethrough the text. Underlining the text means drawing a line below the text, and overlining the text means drawing a line above the text. Striking through the text means drawing a line on the text to show text is erased. In this tutorial, we will learn to use the different values of the text-decoration CSS property to style text differently. Syntax text-decoration: style decoration color thickness; Values Style – It represents the style of the decorated line, such as solid, dotted, wavy, etc. Decoration - ... Read More

Which property is used as shorthand to specify a number of other font properties in CSS?

Shubham Vora
Updated on 19-Apr-2023 14:20:35

216 Views

Developers can customize the font of the webpage using various CSS properties. For example, the ‘font-size’ property is used to specify the font size, and the ‘font-weight’ CSS property is used to specify the font weight of the text. Furthermore, there are lots of other CSS properties which we can use to customize the fonts. The ‘font’ CSS property can be used as a shorthand of all properties to customize the font. Syntax Users can follow the syntax below to use the ‘font’ shorthand CSS property to customize the web page's font. font: font-style font-weight font-size/line-height font-family; Values ... Read More

What is the difference between overflow: auto and overflow: scroll in CSS?

Shubham Vora
Updated on 19-Apr-2023 14:19:06

501 Views

In CSS, the ‘overflow’ property is used to specify the overflow of the content of the HTML element. For example, if the height of the div element is ‘500px’, and the height of the inside content is ‘1000px’, we need to make the content scrollable. In this tutorial, we will learn the difference between the ‘auto’ and ‘scroll’ values of the CSS ‘overflow’ property. Overflow: auto in CSS In CSS, overflow: auto sets the overflow of the HTML element to auto. It means if the content of the div is overflowing, it sets the ‘scroll’ as a value of ... Read More

Shake a Button on Hover using HTML and CSS

Shubham Vora
Updated on 13-Sep-2024 14:11:44

4K+ Views

To shake a button on hover using HTML and CSS, we should have basic understanding of CSS animations and keyframes. We will be understanding how to utilize CSS animation and keyframes to apply shaking effect to a button on hovering. In this article, we are having buttons wrapped inside a div container. Our task is to shake button on hover using HTML and CSS. Steps to Shake Button on Hover Using HTML and CSS To shake a button on hover using HTML and CSS, we will be utilizing CSS animation and transform properties. We will be following below mentioned steps ... Read More

Advertisements