How-to articles, tricks, and solutions about CSS

How to Create Custom Checkboxes and Radio Buttons

Learn how to create and style custom checkboxes and radio buttons. Also set custom images as checkboxes and radio buttons. See all with examples.

How to Set the Checkbox Size with HTML and CSS

Learn 2 methods of how to specify the size of a checkbox and have a larger size checkbox. Use width and height properties or the transform property. See examples.

How to Remove and Style the Border Around Text Input Boxes in Google Chrome

Use outline: none to remove the ugly border color for a form field in Chrome. Learn also how to give your own style for showing that the box is active. All with examples.

How to Apply CSS Styles to Only the Half of a Word or Character?

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 Give a Text or Image a Transparent Background Using CSS

Use CSS3 opacity property to make an image or a background transparent. Learn also how to change the opacity while hovering. All with examples.

How to Style a <select> Box Drop-Down with Only CSS?

How to style the select box. Learn 4 ways of replacing the annoying drop-down arrow and setting either a background-image instead of it or a punctuation mark.

How to Create a Placeholder for an HTML5 <select> Box by Using Only HTML and CSS?

Learn how to make a placeholder for a select box. Use only 3 HTML attributes or CSS :invalid pseudo-class and the display property set to none.

How to Use and Style Icons with Pure CSS: An Ultimate Guide

Style Font Awesome icon color, size, shadow, create buttons and lists, animate, rotate and position icons. All in one place with detailed examples.

How to Remove, Replace or Style List Bullets with Pure CSS

Learn the ways of removing, styling and replacing list bullets with images. Also how to make horizontal lists. All with examples.

How to Change Cursor on Hover in CSS

Learn about the ways of changing the default cursor. See funny tricks to do with cursors and set images and icons as a cursor on your website.

How to Change Default Text Selection Color Using CSS

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 Disable the Resizing of the <textarea> Element?

Use the CSS3 resize property with its "none" value to disable the resizing function of the textarea element. Learn the ways of only vertically or horizontally resizing, too.

How to Add the Marquee Effect without Using the Marquee Tag (with CSS, JavaScript and jQuery)

Learn the alternative ways of having continually scrolling text without using the obsolete <marquee> tag. See examples with CSS animations, JavaScript and jQuery.

How to Make Images Responsive with CSS

Responsive images automatically adjust to display images based on the user’s device. Learn How to Make Images Responsive with CSS. Try examples.

How To Change the Color of an HTML5 Input Placeholder Using CSS

Learn How To Change the Color of an HTML5 Input Placeholder with CSS with W3docs tutorial. Try the code examples yourself. Fast solution.

Shadow Effects in CSS

Use text-shadow and box-shadow CSS properties for shadow effects in CSS. See how to have amazing effects for texts, borders and boxes.

How to Add a Frame Around an Image

How to add border as a frame for images. Also add image borders to images. See also Circle and Round frames. All with examples.

How to Set Cellpadding and Cellspacing in CSS

Use CSS padding and border-spacing properties for setting cellpadding and cellspacing for tables. Step by step guide with examples.

How to Style a Horizontal Line

Learn the ways of styling and have attractive horizontal lines: how to change color and size, set images as horizontal lines and a pack full of various kinds of <hr> examples.

How to Style Comment Box Using CSS

Style comment boxes, change the background color, add a background image or set borders to your comment box. See all with examples.

How to Change Link Colors with CSS

Learn about how to change hyperlink colors, inline and external methods with examples. See also how to give different styles to your anchor link and to change underline color with examples.

How to Add Border to Image in CSS

Learn about how to add border to an image, how to add styling to it and how to specify each corner and have circle borders. Practice all with examples.

How to Horizontally Center a <div> in Another <div>

The <div> tag is used to define parts of a page or a document. Learn How to Horizontally Center a <div> in Another <div> with W3docs tutorial.

How to Blur the Background Image in CSS

Learn about how to add blurring effect to your background image withe the CSS filter property. See examples.

How to Add Background Image with CSS

To add background image to your HTML document you should use CSS styles.