A Pen by KINNON.WU

Thumbnail
This awesome code was written by River-Wood, you can see more from this user in the personal repository.
You can find the original code on Codepen.io
Copyright River-Wood ©
  • HTML
  • CSS
  • JavaScript
    <div id="one">
This text is the content of a block-level level element. Within this
block-level element is another block-level element. <p>Look, it's a block-level
paragraph.</p> Here's the rest of the DIV, which is still block-level.
</div>
<div id="two">
This text is the content of a block-level level element. Within this
block-level element is an inline element. <p>Look, it's an inline
paragraph.</p> Here's the rest of the DIV, which is still block-level.
</div>
<div id="three">
This text is the content of a block-level level element. Within this
block-level element is an inline-block element. <p>Look, it's an inline-block
paragraph.</p> Here's the rest of the DIV, which is still block-level.
</div>

/*Downloaded from https://www.codeseek.co/River-Wood/a-pen-by-kinnonwu-yvRoaq */
    div {margin: 1em 0; border: 1px solid;}
p {border: 1px dotted;}
div#one p {display: block; width: 6em; text-align: center;}
div#two p {display: inline; width: 6em; text-align: center;}
div#three p {display: inline-block; width: 6em; text-align: center;}

div#three p {display: inline-block; height: 4em;}


/*Downloaded from https://www.codeseek.co/River-Wood/a-pen-by-kinnonwu-yvRoaq */
    

Comments