A Pen by Barron M Brock on CodePen.
Created
February 18, 2019 17:54
-
-
Save bmansk8/8ecc0df15098cc2b4fa6cf39fc9b4cfc to your computer and use it in GitHub Desktop.
Bootstrap doc v.2
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<script src="https://cdn.freecodecamp.org/testable-projects-fcc/v1/bundle.js"></script> | |
<nav id="navbar"> | |
<header class="header_style">Bootstrap 4</header> | |
<ul> | |
<a class="nav-link" href="#Getting_started"><li>Getting started</li> </a> | |
<a class="nav-link" href="#Layout"><li>Layout</li> </a> | |
<a class="nav-link" href="#Content"><li>Content</li> </a> | |
<a class="nav-link" href="#Componets"><li>Componets</li> </a> | |
<a class="nav-link" href="#Utilities"><li>Utilities</li> </a> | |
</ul> | |
</nav> | |
<main id="main-doc"> | |
<section id="Getting_started" class="main-section"> | |
<header>Getting started</header> | |
<p>Here is a quick starter template.Be sure to have your pages set up with the latest design and development standards. That means using an HTML5 doctype and including a viewport meta tag for proper responsive behaviors. Put it all together and your pages should look like this:</p> | |
<!--this is my pre tag problem resize the screen to see what I mean --> | |
<pre><code id="starter_template"> | |
<!doctype html> | |
<html lang="en"> | |
<head> | |
<!-- Required meta tags --> | |
<meta charset="utf-8"> | |
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"> | |
<!-- Bootstrap CSS --> | |
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.1.3/css/bootstrap.min.css" | |
integrity="sha384-MCw98/SFnGE8fJT3GXwEOngsV7Zt27NXFoaoApmYm81iuXoPkFOJwJ8ERdknLPMO" | |
crossorigin="anonymous"> | |
<title>Hello, world!</title> | |
</head> | |
<body> | |
<h1>Hello, world!</h1> | |
<!-- Optional JavaScript --> | |
<!-- jQuery first, then Popper.js, then Bootstrap JS --> | |
<script src="https://code.jquery.com/jquery-3.3.1.slim.min.js" integrity="sha384- | |
q8i/X+965DzO0rT7abK41JStQIAqVgRVzpbzo5smXKp4YfRvH+8abtTE1Pi6jizo" crossorigin="anonymous"></script> | |
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.3/umd/popper.min.js" integrity="sha384- | |
ZMP7rVo3mIykV+2+9J3UJ46jBk0WLaUAdn689aCwoqbBJiSnjAK/l8WvCWPIPm49" crossorigin="anonymous"></script> | |
<script src="https://stackpath.bootstrapcdn.com/bootstrap/4.1.3/js/bootstrap.min.js" integrity="sha384- | |
ChfqqxuZUCnJSK3+MXmPNIyE6ZbWh2IMqE241rYiqJxyMiZ6OW/JmZQ5stwEULTy" crossorigin="anonymous"></script> | |
</body> | |
</html> | |
</pre></code> | |
</section> | |
<section id="Layout" class="main-section"> | |
<header>Layout</header> | |
<p><strong>Containers</strong> are the main thing you use in bootstrap. Other than custom classes like <strong>text-center</strong>. Simply saying</p> | |
<pre><code><div class="container"> | |
<!-- Content here --> | |
</div></code></pre> | |
<p>will get your div in a container.</p> | |
<p>Responsive grids are also a part of Bootstrap. They are built with <a href="https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_Flexible_Box_Layout/Basic_Concepts_of_Flexbox" target="_blank">flexbox</a>. Very similar to flexbox bootstrap uses grids and colums. Here is an example</p> | |
<pre><code> | |
<div class="container"> | |
<div class="row"> | |
<div class="col-sm"> | |
One of three columns | |
</div> | |
<div class="col-sm"> | |
One of three columns | |
</div> | |
<div class="col-sm"> | |
One of three columns | |
</div> | |
</div> | |
</div> | |
</code></pre> | |
</section> | |
<section id="Content" class="main-section"> | |
<header>Content</header> | |
<p>Page defaults for the <strong>html</strong> and <strong>body</strong> elements are updated to provide better page-wide defaults. More specifically:</p> | |
<ul> | |
<li>The <strong>box-sizing</strong> is globally set on every element—including <strong>*::before</strong> and | |
<strong>*::after</strong>, to <strong>border-box</strong>. This ensures that the declared width of element is never | |
exceeded due to padding or border. | |
<ul> | |
<li class="nested_li">No base font-size is declared on the <html>, but 16px is assumed (the browser default). | |
font-size: 1rem is applied on the <body> for easy responsive type-scaling via media queries while respecting | |
user preferences and ensuring a more accessible approach.</li> | |
</ul> | |
</li> | |
<li>The <body> also sets a global font-family, line-height, and text-align. This is inherited later by some form elements to prevent font inconsistencies.</li> | |
<li>For safety, the <body> has a declared background-color, defaulting to #fff.</li> | |
</ul> | |
<p>All heading elements—e.g., <h1>—and <p> are reset to have their margin-top removed. Headings have margin-bottom: .5rem added and paragraphs margin-bottom: 1rem for easy spacing.</p> | |
<p>All lists—<ul>, <ol>, and <dl>—have their margin-top removed and a margin-bottom: 1rem. Nested lists have no margin-bottom.</p> | |
</section> | |
<section id="Componets" class="main-section"> | |
<header>Componets</header> | |
<p><strong>Badges!</strong>. Badges are also a neet component of bootstrap. Badges also scale to match the size of the | |
immediate parent element by using relative font sizing and em units.</p> | |
<pre><code><h1>Example heading <span class="badge badge-secondary">New</span></h1></code></pre> | |
<p>Badges can also be used as part of links or buttons to provide a counter.</p> | |
<pre><code><button type="button" class="btn btn-primary"> | |
Notifications <span class="badge badge-light">4</span> | |
</button></code></pre> | |
<p>Bootstrap also includes several predefined button styles, each serving its own semantic purpose, with a few extras thrown in for more control.</p> | |
<pre><code><button type="button" class="btn btn-primary">Primary</button> | |
<button type="button" class="btn btn-secondary">Secondary</button> | |
<button type="button" class="btn btn-success">Success</button> | |
<button type="button" class="btn btn-danger">Danger</button> | |
<button type="button" class="btn btn-warning">Warning</button> | |
<button type="button" class="btn btn-info">Info</button> | |
<button type="button" class="btn btn-light">Light</button> | |
<button type="button" class="btn btn-dark">Dark</button> | |
<button type="button" class="btn btn-link">Link</button></code></pre> | |
</section> | |
<section id="Utilities" class="main-section"> | |
<header>Utilities</header> | |
<p><strong>Display</strong> is also a function that bootstrap uses to make contianers responsive. Change the value of the display property with our responsive display utility classes. We purposely support only a subset of all possible values for display. Classes can be combined for various effects as you need.</p> | |
<p>Display utility classes that apply to all breakpoints, from xs to xl, have no breakpoint abbreviation in them. This is because those classes are applied from min-width: 0; and up, and thus are not bound by a media query. The remaining breakpoints, however, do include a breakpoint abbreviation.</p> | |
<p>As such, the classes are named using the format:</p> | |
<ul> | |
<li>.d-{value} for xs</li> | |
<li>.d-{breakpoint}-{value} for sm, md, lg, and xl.</li> | |
</ul> | |
<p>Where <strong>value</strong> is one of:</p> | |
<ul> | |
<li>none</li> | |
<li>inline</li> | |
<li>inline-block</li> | |
<li>block</li> | |
<li>table</li> | |
<li>table-cell</li> | |
<li>table-row</li> | |
<li>flex</li> | |
<li>inline-flex</li> | |
</ul> | |
<p>The media queries effect screen widths with the given breakpoint or larger. For example, .d-lg-none sets display: none; on both lg and xl screens.</p> | |
</section> | |
<footer>Created by Barron V Brock 2018. And help from the fcc forums XD</footer> | |
</main> | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#topic{ | |
display: block; | |
color: black; | |
text-align: center; | |
padding: 14px 16px; | |
text-decoration: none; | |
font-size:18px; | |
} | |
.header_style{ | |
color:black; | |
font-size: 30px; | |
margin:10px; | |
text-align:center; | |
font-size:1.8em; | |
font-weight:thin; | |
} | |
#navbar{ | |
position:fixed; | |
top:0px; | |
left:0px; | |
width:150px; | |
height:100%; | |
} | |
#navbar ul{ | |
height:88%; | |
overflow-y:auto; | |
overflow-x:hidden; | |
} | |
#navbar li{ | |
color: #4d4e53; | |
padding:8px; | |
padding-left:45px; | |
list-style: none; | |
position:relative; | |
left:-50px; | |
width:100%; | |
} | |
#navbar a{ | |
color: #4d4e53; | |
text-decoration:none; | |
} | |
#navbar li:hover{ | |
background-color: #A9A9A9; | |
color: white; | |
} | |
.nested_li{ | |
margin-right:10vw; | |
} | |
main section header{ | |
text-align:center; | |
font-size:40px; | |
margin-top:200px; | |
font-family: monospace; | |
} | |
main section pre{ | |
overflow-wrap: break-word; | |
white-space: pre-wrap; | |
} | |
main section p{ | |
width:75vw; | |
margin-left:10vw; | |
font-family: monospace; | |
font-size:15px; | |
} | |
main section ul{ | |
width:75vw; | |
margin-left:10vw; | |
} | |
main section ul li{ | |
font-family: monospace; | |
font-size:15px; | |
margin-top:10px; | |
} | |
main section pre{ | |
width:75vw; | |
padding:10px; | |
outline-style:solid; | |
outline-color:grey; | |
margin-left:10vw; | |
box-shadow:12px 12px 15px grey; | |
} | |
footer{ | |
margin-top:100px; | |
margin-bottom:-100px; | |
width:75vw; | |
margin-left:10vw; | |
font-family: monospace; | |
font-size:20px; | |
} | |
/*ahh my really sucky media query please | |
dont roast me to hard*/ | |
@media (max-width: 1080px){ | |
#navbar{ | |
position:fixed; | |
width:100%; | |
height:100px; | |
display:block; | |
background-color:#9BD4F5; | |
} | |
#navbar a{ | |
display: inline; | |
float:left; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment