Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What is the effect of content: "\0020"; property?

Tags:

.container:after { content: "\0020"; display: block; height: 0; clear: both; visibility: hidden; overflow:hidden;} 
Contents

Please explain what is the effect of "content: "\0020"; property?

like image 496
zarpio Avatar asked Jul 18 '12 11:07

zarpio


1 Answers

\0020 inserts the Unicode code point U+0020, which is a space. So the code is equivalent to content: ' ';.

content: x replaces the content (= the displayed text) with the value x.

However, in the snippet you’ve posted, this content is made invisible anyway so you won’t actually see anything. The code is a clearfix implementation to re-float elements on the page.

like image 87
Konrad Rudolph Avatar answered Oct 11 '22 07:10

Konrad Rudolph