Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
66 changes: 66 additions & 0 deletions html_css/styles.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@

/* General styles */

html {
font-family: Helvetica, Arial, sans-serif;
font-size: 10px;
}

h2 {
font-size: 2rem;
}

ul,ol,dl,p {
font-size: 1.5rem;
}

li, p {
line-height: 1.5;
}

/* Unordered list styles */

ul {
padding-left: 2rem;
list-style-type: none;
}

ul li {
padding-left: 2rem;
background-image: url(star.svg);
background-position: 0 0;
background-size: 1.6rem 1.6rem;
background-repeat: no-repeat;
}

/* Ordered list styles */

ol {
list-style-type: upper-roman;
}

/* Description list styles */

dd, dt {
line-height: 1.5;
}

dt {
font-weight: bold;
}
.page {
border-radius: 1rem;
padding: 1em;
margin: 1em;
box-shadow: 8px 8px 20px 4px rgba(0.1,0.1,0.1,0.15);
}
.cookbook {
background: rgba(253, 248, 209, 0.8);
}
.notebook {
background: rgba(254, 203, 255, 0.8);
}
.sciencebook {
background: rgba(184, 247, 254, 0.8);
}

130 changes: 42 additions & 88 deletions html_css/styling-lists.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,96 +4,50 @@
<meta charset="utf-8">
<meta name="viewport" content="width=device-width">
<title>Styling lists</title>
<style>
/* General styles */

html {
font-family: Helvetica, Arial, sans-serif;
font-size: 10px;
}

h2 {
font-size: 2rem;
}

ul,ol,dl,p {
font-size: 1.5rem;
}

li, p {
line-height: 1.5;
}

/* Unordered list styles */

ul {
padding-left: 2rem;
list-style-type: none;
}

ul li {
padding-left: 2rem;
background-image: url(star.svg);
background-position: 0 0;
background-size: 1.6rem 1.6rem;
background-repeat: no-repeat;
}

/* Ordered list styles */

ol {
list-style-type: upper-roman;
}

/* Description list styles */

dd, dt {
line-height: 1.5;
}

dt {
font-weight: bold;
}

</style>
<link rel="stylesheet" href="./styles.css">
</head>
<body>
<h2>Shopping (unordered) list</h2>

<p>Paragraph for reference, paragraph for reference, paragraph for reference, paragraph for reference, paragraph for reference, paragraph for reference.</p>

<ul>
<li>Humous</li>
<li>Pitta</li>
<li>Green salad</li>
<li>Halloumi</li>
</ul>

<h2>Recipe (ordered) list</h2>

<p>Paragraph for reference, paragraph for reference, paragraph for reference, paragraph for reference, paragraph for reference, paragraph for reference.</p>

<ol start="4">
<li>Toast pitta, leave to cool, then slice down the edge.</li>
<li>Fry the halloumi in a shallow, non-stick pan, until browned on both sides.</li>
<li>Wash and chop the salad.</li>
<li>Fill pitta with salad, humous, and fried halloumi.</li>
</ol>

<h2>Ingredient description list</h2>

<p>Paragraph for reference, paragraph for reference, paragraph for reference, paragraph for reference, paragraph for reference, paragraph for reference.</p>

<dl>
<dt>Humous</dt>
<dd>A thick dip/sauce generally made from chick peas blended with tahini, lemon juice, salt, garlic, and other ingredients.</dd>
<dt>Pitta</dt>
<dd>A soft, slightly leavened flatbread.</dd>
<dt>Halloumi</dt>
<dd>A semi-hard, unripened, brined cheese with a higher-than-usual melting point, usually made from goat/sheep milk.</dd>
<dt>Green salad</dt>
<dd>That green healthy stuff that many of us just use to garnish kebabs.</dd>
</dl>
<div class="page notebook">
<h2>Shopping (unordered) list</h2>

<p>Paragraph for reference, paragraph for reference, paragraph for reference, paragraph for reference, paragraph for reference, paragraph for reference.</p>

<ul>
<li>Humous</li>
<li>Pitta</li>
<li>Green salad</li>
<li>Halloumi</li>
</ul>
</div>
<div class="page cookbook" >
<h2>Recipe (ordered) list</h2>

<p>Paragraph for reference, paragraph for reference, paragraph for reference, paragraph for reference, paragraph for reference, paragraph for reference.</p>

<ol start="1">
<li>Toast pitta, leave to cool, then slice down the edge.</li>
<li>Fry the halloumi in a shallow, non-stick pan, until browned on both sides.</li>
<li>Wash and chop the salad.</li>
<li>Fill pitta with salad, humous, and fried halloumi.</li>
</ol>
</div>
<div class="page sciencebook">

<h2>Ingredient description list</h2>

<p>Paragraph for reference, paragraph for reference, paragraph for reference, paragraph for reference, paragraph for reference, paragraph for reference.</p>

<dl>
<dt>Humous</dt>
<dd>A thick dip/sauce generally made from chick peas blended with tahini, lemon juice, salt, garlic, and other ingredients.</dd>
<dt>Pitta</dt>
<dd>A soft, slightly leavened flatbread.</dd>
<dt>Halloumi</dt>
<dd>A semi-hard, unripened, brined cheese with a higher-than-usual melting point, usually made from goat/sheep milk.</dd>
<dt>Green salad</dt>
<dd>That green healthy stuff that many of us just use to garnish kebabs.</dd>
</dl>
</div>


</body>
Expand Down