2
2

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

【web開発 CSS】基本的なwebサイトフレームワーク

Posted at

webサイトを作る際のフレームワークに毎回時間をかけることがもったいないと感じたのでメモしておく。

スクリーンショット 2019-07-28 午後3.33.00.png

html
<header>
   header
</header>

<main>
   main
   <br> <!--sectionを横並びにするための改行、mainの文字列が邪魔するのでつけただけ-->
   <section class="maincontent">
      main content
   </section>

   <section class="submenu">
      submenu
   </section>
</main>

<footer>
   footer
</footer>
css
body{
	margin: 0; /*要素を画面幅いっぱいに表示*/
	min-height: 100vh; /*最低でも画面縦のサイズ*/
}

header{
	height: 100px;
	width: 100%;
	background-color: #696969;
}

main{
	min-height: calc(100vh - 150px); /*headerとfooter以外をmainで占める*/
	width: 100%;
	overflow: hidden; /*はみ出たら非表示(デザインを保つ)*/
	background-color: #b0c4de;
}

footer{
	height: 50px;
	width: 100%;
	background-color: #696969;
}

.maincontent{
	float: left;
	height: 550px;
	width: 80%; /*submenuとの比率*/
	background-color: #778899;
}

.submenu{
	float: right;
	height: 550px;
	width: 20%; /*maincontentとの比率*/
	background-color: #e6e6fa;
}
2
2
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
2
2

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?