Snippets tagged “pseudo-element”
8 snippets use this tag.
- How to Align the Placeholder Text of an Input Field in HTMLCSS
The ::placeholder pseudo-element allows styling the placeholder text of a form element. Here you will find out how to align an input field’s placeholder text.
- How to Apply CSS Styles to Only the Half of a Word or Character?CSS
Learn how to make a word or character have half style or triple style. Use only CSS to get the effect, or do it with the help of JavaScript and jQuery.
- How to Change Default Text Selection Color Using CSSCSS
Use the CSS ::selection selector to change the default highlight color while selecting texts. Use only CSS and do cool tricks to have a better user experience. All with examples.
- How to Create Polaroid Image With CSSCSS
Do you want to get '90s vibes with just only CSS? This tutorial is just for you to create a Polaroid image effect for the website. Follow the steps and get examples.
- How to Increase the Space Between Text and Underlining in CSSCSS
Although CSS does not provide many options for the underlines below texts, there are some ways to do this. Read our snippet and find out the solutions.
- How to Maintain the Aspect Ratio with CSSCSS
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.
- How to Make HTML <dt> and <dd> Elements Stay on the Same LineHTML
In this snippet, we’re going to demonstrate some ways of forcing the HTML <dt> and <dd> elements stay on the same line. You can use the CSS float property.
- How to Use Font Awesome Icon as Content in CSSCSS
Today, icon fonts are quite common, and more and more developers are taking advantage of them in their designs. See how you can add them as a content.