question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Incorrect use of display property in article text

See original GitHub issue

The article text incorrectly uses the display property with position values.

Example:

First, set the display property of the parent element to relative. Then for the child element, set the display property to absolute and top to 50%:

The actual code example that follows is correctly using the position property.

News article: https://www.freecodecamp.org/news/how-to-center-anything-with-css-align-a-div-text-and-more/

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Reactions:4
  • Comments:6 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
scissorsneedfoodtoocommented, May 27, 2021

Thanks for catching those typos, @lasjorg. I went in and changed the text display to position wherever applicable.

Please let us know if you notice issues in any other articles.

Read more comments on GitHub >

github_iconTop Results From Across the Web

incorrect use of html display property - css
this is part of my html code. The issue is that my timer with timer id timerel and my html form are not...
Read more >
display - CSS: Cascading Style Sheets - MDN Web Docs
The display CSS property sets whether an element is treated as a block or inline element and the layout used for its children, ......
Read more >
Display
The display property in CSS determines just how that rectangular box behaves. ... Notice it sits right inline with the rest of the...
Read more >
HTML DOM Style display Property
The display property sets or returns the element's display type. Elements in HTML are mostly "inline" or "block" elements: An inline element has...
Read more >
Structural markup and right-to-left text in HTML
This article looks at ways of handling text direction for structural markup in HTML, ie. at the document level and for elements like ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found