Pen Settings

HTML

CSS

CSS Base

Vendor Prefixing

Add External Stylesheets/Pens

Any URLs added here will be added as <link>s in order, and before the CSS in the editor. You can use the CSS from another Pen by using its URL and the proper URL extension.

+ add another resource

JavaScript

Babel includes JSX processing.

Add External Scripts/Pens

Any URL's added here will be added as <script>s in order, and run before the JavaScript in the editor. You can use the URL of any other Pen and it will include the JavaScript from that Pen.

+ add another resource

Packages

Add Packages

Search for and use JavaScript packages from npm here. By selecting a package, an import statement will be added to the top of the JavaScript editor for this package.

Behavior

Auto Save

If active, Pens will autosave every 30 seconds after being saved once.

Auto-Updating Preview

If enabled, the preview panel updates automatically as you code. If disabled, use the "Run" button to update.

Format on Save

If enabled, your code will be formatted when you actively save your Pen. Note: your code becomes un-folded during formatting.

Editor Settings

Code Indentation

Want to change your Syntax Highlighting theme, Fonts and more?

Visit your global Editor Settings.

HTML

              
                <div id="body-in">
	<div id="main">
		<p>フォーラム<br>参考: <a href="https://wp-simplicity.com/suport/topic/%e5%9b%ba%e5%ae%9a%e3%83%9a%e3%83%bc%e3%82%b8%e3%81%ae%e9%80%94%e4%b8%ad%e3%81%ab%e6%96%b0%e7%9d%80%e8%a8%98%e4%ba%8b%e3%82%92%e8%a1%a8%e7%a4%ba%e3%81%97%e3%81%9f%e3%81%84/" target="_blank">固定ページの途中に新着記事を表示したい</a><br>参考: <a href="https://wp-simplicity.com/suport/topic/%e6%96%b0%e7%9d%80%e8%a8%98%e4%ba%8b%e3%81%ab%e6%97%a5%e4%bb%98%e3%82%92%e8%a1%a8%e7%a4%ba%e3%81%97%e3%81%9f%e3%81%84/" target="_blank">新着記事に日付を表示したい</a><br>サイドバー編・参考: <a href="https://wp-simplicity.com/suport/topic/%e3%80%8c%e6%96%b0%e7%9d%80%e8%a8%98%e4%ba%8b%e3%80%8d%e3%81%ae%e3%82%a6%e3%82%a3%e3%82%b8%e3%82%a7%e3%83%83%e3%83%88%e3%82%92%e3%80%81%e6%9b%b4%e6%96%b0%e6%97%a5%e9%a0%86%e3%81%ab%e3%81%97%e3%81%9f/" target="_blank">「新着記事」のウィジェットを、更新日順にしたい。</a>
		</p>
		<p>上記の質問を受けてショートコードを作成しました。そのショートコードを記事内などに入れて出力されたhtmlをこのhtml欄にコピペした後、cssを変更・追加・修正しています。</p>

		<div class="insertList">
			<h3>挿入された新規記事一覧</h3>
			<ul>
				<li>
					<div class="thumb">
						<a href="#">
							<img src="https://wp-simplicity.com/wp-content/uploads/2017/02/pexels-photo-127968-150x150.jpg" class="list-thumb wp-post-image" alt="twitter デフォルトシェアボタンテスト" width="148" height="150">
						</a>
					</div>
					<div class="content">
						<h3>
			<a href="#" title="twitter デフォルトシェアボタンテスト">
				Simplicity2.4.9公開。Jetpackで管理者にPV表示機能追加、簡単SSL化機能など。
			</a>
		</h3>
						<p>
							<span class="post-date">
				<span class="fa fa-clock-o fa-fw"></span>
							<span class="published">2016/8/16</span>
							</span>
							<span class="category"><span class="fa fa-folder fa-fw"></span><a href="#" title="未分類">未分類</a></span>
						</p>
						<div class="excerpt">Simplicityを2.4.9にバージョンアップしました。 主な変更点は以下。 Jetpack管理者PV表示機能追...</div>
						<div class="read">
							<a href="#" title=" twitter デフォルトシェアボタンテスト ">記事を読む</a>
						</div>
					</div>
				</li>
				<hr>
				<li>
					<div class="thumb ">
						<a href="# ">
							<img src="https://wp-simplicity.com/wp-content/uploads/2017/02/IQ80ATETJQ-150x150.jpg " class="list-thumb wp-post-image " alt="ブログカードテスト " width="150 " height="150 ">
						</a>
					</div>
					<div class="content ">
						<h3>
			<a href="# " title="ブログカードテスト ">
				Simplicity2.4.8公開。クライアントソフトからでもアイキャッチ自動設定出来るようにした
			</a>
		</h3>
						<p>
							<span class="post-date ">
				<span class="fa fa-clock-o fa-fw "></span>
							<span class="published ">2016/8/16</span>
							</span>
							<span class="category "><span class="fa fa-folder fa-fw "></span><a href="# " title="未分類 ">未分類</a></span>
						</p>
						<div class="excerpt ">Simplicityを2.4.8にバージョンアップしました。 主な変更点は以下。 アイキャッチ自動挿入機能でクライア...</div>
						<div class="read ">
							<a href="# " title="ブログカードテスト ">記事を読む</a>
						</div>
					</div>
				</li>
				<hr>
			</ul>
		</div>
	</div>
	<div id="sidebar">
		<div class="text-widget">
			<div class="insertList">
			<h3>挿入された新規記事一覧</h3>
			<ul>
				<li>
					<div class="thumb">
						<a href="#">
							<img src="https://wp-simplicity.com/wp-content/uploads/2017/02/pexels-photo-127968-150x150.jpg" class="list-thumb wp-post-image" alt="twitter デフォルトシェアボタンテスト" width="148" height="150">
						</a>
					</div>
					<div class="content">
						<h3>
			<a href="#" title="twitter デフォルトシェアボタンテスト">
				Simplicity2.4.9公開。Jetpackで管理者にPV表示機能追加、簡単SSL化機能など。
			</a>
		</h3>

					</div>
				</li>
				<hr>
				<li>
					<div class="thumb ">
						<a href="# ">
							<img src="https://wp-simplicity.com/wp-content/uploads/2017/02/IQ80ATETJQ-150x150.jpg " class="list-thumb wp-post-image " alt="ブログカードテスト " width="150 " height="150 ">
						</a>
					</div>
					<div class="content ">
						<h3>
			<a href="# " title="ブログカードテスト ">
				Simplicity2.4.8公開。クライアントソフトからでもアイキャッチ自動設定出来るようにした
			</a>
		</h3>
						
					</div>
				</li>
				<hr>
				<li>
					<div class="thumb">
						<a href="#">
							<img src="https://wp-simplicity.com/wp-content/uploads/2017/02/pexels-photo-127968-150x150.jpg" class="list-thumb wp-post-image" alt="twitter デフォルトシェアボタンテスト" width="148" height="150">
						</a>
					</div>
					<div class="content">
						<h3>
			<a href="#" title="twitter デフォルトシェアボタンテスト">
				Simplicity2.4.9公開。Jetpackで管理者にPV表示機能追加、簡単SSL化機能など。
			</a>
		</h3>

					</div>
				</li>
				<hr>
				<li>
					<div class="thumb ">
						<a href="# ">
							<img src="https://wp-simplicity.com/wp-content/uploads/2017/02/IQ80ATETJQ-150x150.jpg " class="list-thumb wp-post-image " alt="ブログカードテスト " width="150 " height="150 ">
						</a>
					</div>
					<div class="content ">
						<h3>
			<a href="# " title="ブログカードテスト ">
				Simplicity2.4.8公開。クライアントソフトからでもアイキャッチ自動設定出来るようにした
			</a>
		</h3>
						
					</div>
				</li>
				<hr>
			</ul>
		</div>
		</div>
	</div>						 
</div>
              
            
!

CSS

              
                .insertList {
	h3 {
		font-size: 1.8em;
	}
	ul {
			list-style: none;
			margin: 0;
			padding: 0;
	
			li {
				margin: 0;
				//margin-bottom: 20px;
				display: flex;
				flex-flow: row wrap;
				justify-content: space-between;
				//align-items: center;
				
				.thumb {
					position: relative;
					width: 150px;
					height: 150px;
					//margin-right: 5px;
					
					img {
						position: absolute;
						top: 50%;
						left: 50%;
						transform: translate(-50%,-50%);
						width: 100%;
						height: auto;
						margin: 0;
					}
				}
				.content {
					align-self: stretch;
					position: relative;
					flex: 1;
					padding-left: 10px;
					
					h3 {
						margin: 0 0 10px;
						color: #333;
						font-size: 24px;
						font-weight: bold;
						line-height: 1.3;
						
						a {
							color: inherit;
							text-decoration: none;
							font-size: inherit;
							font-weight: inherit;
							line-height: inherit;
						}
					}
					p {
						// position: absolute;
						// bottom: 0;
						// right: 5px;
						display: block;
						font-size: 16px;
						line-height: 1;
						padding: 2px 4px;
						margin: 0 0 10px;
						color: #666;
						background-color: rgba(#666,.2);
						//border-radius: 5px 0 0 5px;
						
						a {
							color: inherit;
						}
					}
					.excerpt {
						font-size: 16px;
						color: #333;
						margin: 0 0 10px;
					}
					.read {
						color: #333;
						
						a {
							color: inherit;
							text-decoration: none;
						}
					}
				}
			}
		hr {
			display: inline-block;
			height: 1px;
			width: 100%;
			background-image: linear-gradient(left,#999, #999 50%, transparent 50%, transparent 100%);
background-size: 6px 2px;
			border: none;
			margin: 40px 0;
			
			&:last-child {
				display: none;
			}
		}
	}
}

/* --------------------------
サイドバー用 スタイル
ただし、サムネイルとタイトルと
そのリンクだけの場合のバージョン
-------------------------- */

#sidebar {
	.insertList {
		ul {
			margin: 0;
			padding: 0;
			list-style: none;
			
			li {
				display: flex;
				flex-flow: row wrap;
			}
		}
		.thumb {
			width: 75px;
			height: 75px;
			
			img {
				display: block;
				width: 100%;
				height: auto;
			}
		}
		.content {
			position: relative;
			flex: 1;
			padding-left: 10px;
			
			h3 {
				margin: 0;
				font-size: 16px;
				line-height: 1.3;
				color: #333;
				a {
					color: inherit;
					text-decoration: none;
					font-size: inherit;
					font-weight: inherit;
					line-height: inherit;
				}
			}
		}
		hr {
			display: inline-block;
			height: 1px;
			width: 100%;
			background-image: linear-gradient(left,#999, #999 50%, transparent 50%, transparent 100%);
background-size: 6px 2px;
			border: none;
			margin: 10px 0;
			
			&:last-child {
				display: none;
			}
		}
	}
}

/*不要*/
#body-in {
	width: 100%;
}
#main {
	width: 100%;
}
#main,
#sidebar {
	float: none;
	width: 100%;
}
#sidebar {
	padding: 10px 20px;
}

@media (min-width: 60em) {
	#body-in {
		width: 1070px;
	}
	#main {
		width: 720px;
		float: left;
	}
	#sidebar {
		width: 300px;
		float: right;
	}
}
              
            
!

JS

              
                
              
            
!
999px

Console