Showing posts with label css. Show all posts
Showing posts with label css. Show all posts

Friday, 29 September 2017

Learn HTML in 30 days with Jeffery Way

Read more

Sunday, 9 July 2017

Hide empty html tags in website using :empty pseudo-class

Sometimes the empty tags can create the alignment or spacing issues, which looks odd to the viewers.

To fix this issue we have a pseudo-class called :empty

You can use this property as below example in your style:

p:empty{ display: none; }

You can also try in the codpen at this link Edit on codepen 

Reference sites:
https://css-tricks.com/almanac/selectors/e/empty/
https://developer.mozilla.org/en-US/docs/Web/CSS/:empty

Read more