How-to articles, tricks, and solutions about ELEMENT
Very often developers want to create a div element, that can change its width/height as the window width changes. That can be done by maintaining the aspect ratio of the element.
On this page you can see how to make a <div> element a clickable link.
How to Make a Div not Larger Than its Contents. Create <div> with the class "box". Place <h2> tag in the div and write some content in it. Fast solution!
CSS suggests a variety of versions of a cursor. Learn how to create and make the cursor hand when the user hovers over a list item in different ways. See examples!
How CSS overriding works, what is the cascading order and inheritance, what are the priorities and some tricks to override them.
Read this JavaScript tutorial and learn several simple and fast methods that are used for removing all the child elements of the DOM node with examples.
Do not know how to remove space between the inline-block elements? Read the tutorial and find the easiest techniques for the solution to your problem.
Read this tutorial and learn about the two methods that are used to retrieve an HTML element’s actual width and height. Find the best method for your case.
Scaling the content of an <iframe> may be needed if you want to display an object in the area not matching its original size. Read and find possible solutions.
Sometimes, you may need to select all the child elements except the last element. For that purpose, you can use the :not and :last-child pseudo- classes.
Read our snippet and find out how to select all child element recursively in CSS. Use a child selector that matches all elements of a specified element.
In this snippet, we want to display how you can select the last element of a specific type. For that, you need to use the CSS :last-of-type pseudo-class.
In this snippet, you’ll find out how to select the last second element with pure CSS. To achieve the goal, you need to use the CSS :nth-last-child() pseudo-class.
To set a box shadow on one side of an element, use the box-shadow property. Read and find examples of adding box shadows outside and inside an element.
Learn how to set a background color in general, how to have gradient and changing background colors with examples.
In this tutorial, we’ll show how you can easily set distance between flexbox items. For this, we’ll use the CSS justify-content property with two of its values.
On this page, you can find some methods allowing to vertically align elements in a <div>. Read and find the method depending on the specific situation.
On this page, you’ll learn how to vertically align inline (inline-block) elements. Try examples with many different methods (CSS padding, vertical-align, etc.).
There are a few different ways you can remove an element from an array in Java. Here are a few options: