4
nav ul:after { 
    content:""; 
    clear:both; 
    display:block;
}

What does the "" value mean on the content property?

Charles
  • 50,943
  • 13
  • 104
  • 142
Longway_togo
  • 87
  • 11

1 Answers1

5

It's just a clearfix, which means, if your ul elements have floated li, than they will be self cleared, it just behaves similar to overflow: hidden; but unlike overflow: hidden; it wont hide the overflowing content.

Demo (Without clearfix)

Demo 2 (With clearfix)

And why you need to clear and what you need to clear, for that, you can refer my answer here


As you edited your question, content property is used with :before or :after pseudo to embed virtual content on the page, so using content: ""; means just blank, you are not embedding any character in your page.

Community
  • 1
  • 1
Mr. Alien
  • 153,751
  • 34
  • 298
  • 278