Responsive Blog Post. #CodePenChallenge_typeset

FEATURED

In this example below you will see how to do a Responsive Blog Post. #CodePenChallenge_typeset with some HTML / CSS and Javascript

Creating a Responsive Blog Post by using CSS. View in full page and try to resize the screen.

Thumbnail
This awesome code was written by Amli, you can see more from this user in the personal repository.
You can find the original code on Codepen.io
Copyright Amli ©
  • HTML
  • CSS
  • JavaScript
    <h1 class="center">A Tremendous Post Title</h1>

<p class="top m0 small-font center"><strong><em>June 11th, 2018</em> by Writerton McWriterpants</strong></p>

<h2>An Inspiring Subtitle</h2>

<p><img src="https://s3-us-west-2.amazonaws.com/s.cdpn.io/t-1/cherry-blossoms-unsplash.jpg" alt="cherry blossoms"></p>

<p class="small-font justify">Spring has sprung! In this tremendous blog article we're going to cover some points. This is where I'm telling you that what I'm going to tell you. Then I'm going to tell you those things. Then, because your special, and I'm to tell you what I told you. <strong class="block medium-font center">Here comes a blockquote:</strong></p>

<blockquote>
<p class="medium-font center">Lorem ipsum dolor sit amet, consectetur adipiscing elit. Vivamus mollis fringilla dolor, a sollicitudin turpis posuere elementum.</p>
</blockquote>

<p class="small-font justify">That quote was from the famous latin composer... nope, just kidding. Emmet generated it because that's a feature that it has. In the next section, we're really going to get into the meat of this blog post.</p>

<h3>All the Good Stuff is in These Paragraphs</h3>

<p class="small-font justify indent"><em>Donec accumsan lacinia blandit</em>. Nunc ornare ante id sapien ullamcorper sollicitudin. Vestibulum vel odio sapien. Nam quis est maximus, cursus nibh at, dictum lorem. Donec vestibulum quam quis lorem egestas semper. Nullam et congue libero, a ultricies urna. Vivamus sed efficitur nisl. Fusce dapibus, lectus vel laoreet mattis, quam tellus fermentum diam, et luctus sem tortor in lorem. Nunc interdum ipsum ligula. Pellentesque sed diam erat.</p>

<p class="small-font justify indent">Aliquam porta metus nec erat ullamcorper accumsan. Etiam egestas sit amet ante vitae lacinia. Donec ultricies eu nisl vel mattis. Suspendisse vestibulum sed velit lacinia imperdiet. Vivamus in nibh ullamcorper, laoreet arcu ut, gravida nulla. Curabitur in diam tempus, cursus mauris a, posuere tellus. Pellentesque purus orci, commodo non ex eu, porttitor sagittis erat. Vestibulum at orci nec turpis pharetra imperdiet quis ut urna. Donec eget accumsan tortor. In interdum mauris at velit gravida, in euismod lacus sodales. Curabitur pellentesque nunc nulla, id convallis enim eleifend vel.</p>

<p class="small-font justify indent">Vivamus mollis fringilla dolor, a sollicitudin turpis posuere elementum. Quisque risus dolor, rhoncus sed imperdiet vel, tristique ac nisi. Sed dapibus aliquam nibh, at posuere dolor lobortis ac. Nam quis urna ac magna facilisis blandit. Maecenas vel arcu nec ipsum venenatis malesuada. Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos himenaeos. Etiam semper ac sem at interdum. Ut massa est, egestas id sem at, commodo consequat velit.</p>

<h3>Some Key Takeaways</h3>

<p class="small-font justify">After reading this tremendous blog article, these are the salient points:</p>

<ul>
<li>A bullet point</li>
<li>Another one
<ol>
<li>Sub point one</li>
<li>Sub point two</li>
</ol>
</li>
<li>Another one</li>
<li>How about four?</li>
</ul>

<p class="m0 small-font justify">In a pellentesque eros. Morbi elementum venenatis est quis cursus. Nunc vitae mi maximus, volutpat enim nec, ultricies libero. Donec pharetra dui arcu, vel sagittis dolor scelerisque nec!</p>

/*Downloaded from https://www.codeseek.co/uzcho_/responsive-blog-post-codepenchallenge_typeset-oyWVJB */
    @charset "utf8";

@import url('https://fonts.googleapis.com/css?family=PT+Sans|Signika+Negative');


/* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Root */
*,
*:after,
*:before,
html
	{box-sizing:border-box}

body{
	background:url("https://learn.shayhowe.com/assets/images/triangles/triangles.svg")repeat-y;
	background-position:110% 0;
	margin:0;
	padding:50px 20%
	}

h1,
h2,
h3
	{font-family:'Signika Negative',sans-serif}

h1,
h2,
h3,
li,
p,
strong
	{font-weight:400}

h2,
h3
	{margin:100px 0 0 0;color:#008080}

li
	{font-size:16px}

li,
p
	{font-family:'PT Sans',sans-serif;word-spacing:2px}

.medium-font
	{font-size:18px}

.small-font
	{font-size:15px}

.center
	{text-align:center}

.justify
	{text-align:justify}

.m0
	{margin:0}

.indent
	{text-indent:20px}

p.top:before,
strong.block:before{
	background-image:radial-gradient(circle,#fff,#fff,#fff,#fff,#fff,#fff,#808080,#fff,#fff,#fff,#fff,#fff,#fff);
	background-position:center -12px;
	background-size:16px 24px;
	background-repeat:repeat-x;
	content:"";
	width:100%;
	height:16px;
	bottom:-24px;
	display:block;
	position:absolute;
	transition:all .5s ease
	}

img,
strong.block,
blockquote
	{display:block;position:relative}

img,
blockquote
	{border-radius:10px}
/* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ End Root */


/*                                          ! Responsive Blog Post Start Here ...
=======================================================================================================================*/
h1
	{margin:0;font-size:40px}

p.top
	{position:relative;color:#bc003b}

h2
	{font-size:34px}

img
	{width:100%}

strong.block
	{width:230px;margin:10px auto 0 auto}

blockquote{
	background:#f1f1f1;
	width:90%;
	margin:30px auto;
	padding:16px;
	font-style:italic;
	box-shadow:0 8px 6px -6px #595959
	}

blockquote p:before,
blockquote p:after
	{font-size:1.5em;vertical-align:sub;font-weight:400}

blockquote p:before
	{content:'\00201C';margin-right:0.2em}

blockquote p:after
	{content:'\00201D';margin-left:0.2em}

h3
	{font-size:30px}

@media (max-width:320px){
	strong.block
		{width:100%}
	}

@media (max-width:800px){
	body
		{background:transparent;padding:50px 16px}
	
	h1
		{font-size:34px}
	
	h2
		{font-size:30px}
	
	h2,
	h3
		{margin:50px 0 0 0}
	
	h3
		{font-size:26px}
	}

@media screen and (min-width:801px) and (max-width:900px){
	body
		{background-position:125% 0}
	}

@media screen and (min-width:901px) and (max-width:1100px){
	body
		{background-position:120% 0}
	}


/*Downloaded from https://www.codeseek.co/uzcho_/responsive-blog-post-codepenchallenge_typeset-oyWVJB */
    

Comments