webdev/html/float.html

89 lines
2.6 KiB
HTML

<!DOCTYPE html>
<html lang="de">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="description" content="Die HTML Struktur in Webseiten">
<title>HTML Struktur</title>
<link rel="stylesheet" href="../css/reset.css">
<link rel="stylesheet" href="../css/code.css">
<link rel="stylesheet" href="../css/style.css">
<link rel="stylesheet" href="../css/struktur.css">
<link rel="stylesheet" href="../css/responsive.css">
</head>
<body>
<header>
<div class="wrapper">
<a href="../index.html"><img src="../img/logo.svg" alt="Mein logo" title="Der Titel meines Bildes"></a>
<nav role="navigation">
<ul>
<li><a href="float.html">Float</a></li>
<li><a href="position.html">Position</a></li>
<li><a href="flexbox.html">Flexbox</a></li>
<li><a href="grid.html">Grid</a></li>
</ul>
</nav>
</div>
</header>
<main role="main" class="wrapper">
<h1>Inhalt strukturieren mit css</h1>
<article>
<h2>Float</h2>
<div class="bigbox">
<div class="box floatleft"></div>
<div class="box clearfix"></div>
<div class="box floatleft"></div>
<div class="box floatleft"></div>
<div class="box clearfix"></div>
</div>
</article>
<article class="">
<h2>Die Boxen</h2>
<pre class="line-numbers language-html">
<code class="language-html">&lt;article&gt;
&lt;h2&gt;Float&lt;/h2&gt;
&lt;div class=&quot;box floatleft&quot;&gt;&lt;/div&gt;
&lt;div class=&quot;box clearfix&quot;&gt;&lt;/div&gt;
&lt;div class=&quot;box floatleft&quot;&gt;&lt;/div&gt;
&lt;div class=&quot;box floatleft&quot;&gt;&lt;/div&gt;
&lt;div class=&quot;box clearfix&quot;&gt;&lt;/div&gt;
&lt;/article&gt;
</code>
</pre>
<h2>& Der Clearfix</h2>
<pre class="line-numbers language-html">
<code class="language-css">.box{
width: 32%;
height: 150px;
background-color: yellowgreen;
margin: 0 2% 2% 0;
overflow:auto;
}
.floatleft{
float: left;
}
.clearfix:after {
content: ".";
clear: both;
display: block;
visibility: hidden;
height: 0px;
}
</code>
</pre>
</main>
<footer>
<div class="wrapper">
<p><a title="Link zu Download" href="https://git.perin.work/andy/webdev">Download</a></p>
</div>
</footer>
<script src="../js/code.js"></script>
</body>
</html>