Category CSS

Cascading Style Sheets is a style sheet language used for describing the presentation of a document written in a markup language such as HTML or XML. CSS is a cornerstone technology of the World Wide Web, alongside HTML and JavaScript.

How to style a select dropdown with only CSS?

Sometimes, we want to style a select dropdown with only CSS. We’ll look at how to style a select dropdown with only CSS, in this article. How to style a select dropdown with only CSS? We set the appearance property,…

How to vertically align text in a div with CSS?

Sometimes, we want to vertically align text in a div with CSS. We’ll look at how to vertically align text in a div with CSS, in this article. How to vertically align text in a div with CSS? Use flexbox,…

How to pass mouse events through absolutely-positioned element with CSS?

To pass mouse events through absolutely-positioned element with CSS, we set the pointer-events property. For instance, we can write <div class=”some-container”> <ul class=”layer-0 parent”> <li class=”click-me child”></li> <li class=”click-me child”></li> </ul> <ul class=”layer-1 parent”> <li class=”click-me child”></li> <li class=”click-me child”></li>…

How to disable all div content with CSS?

We set the pointer-events property, to disable all div content with CSS. For instance, we can write #my-div { pointer-events: none; } to select the div with ID my-div and disable all mouse events on it by setting pointer-events to…

How to disable HTML links with CSS?

We set the pointer-events property, to disable HTML link with CSS. For instance, we can write <a class=”disabled” href=”#”>…</a> to add a link. Then we can write a.disabled { pointer-events: none; } to disable the link with class disabled by…

How to remove pseudo elements with CSS?

We set the content property, to remove pseudo elements with CSS. Then, we write p:after { content: none; } After each p element by setting their content property to none is to remove the content. Post Views: 141