Skip to content

Commit 7af7c41

Browse files
committed
added different position
1 parent b4184c1 commit 7af7c41

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

css.html

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -175,8 +175,14 @@ <h2>5. box model</h2>
175175
<p>ref: <a href="http://www.w3.org/TR/CSS21/box.html">W3: box model</a>, <a href="http://css-tricks.com/the-css-box-model/">css box model</a></p>
176176
</div>
177177
<div id="scopped">
178-
<h2>6. rem</h2>
179-
178+
<h2>6. position</h2>
179+
<p><strong>Question:</strong> How absolute, relative, fixed and static position differ?</p>
180+
<p><strong>Answer:</strong> </p>
181+
<p>absolute, place an element exactly where you want to place it. position is relative to parent. if no parent available then relatively place to the page itself.</p>
182+
<p>relative, is position an element relative to itself. for example, if u set postion relative to an elment and set top:10px, it will move 10px down from where it would be normally.</p>
183+
<p>fixed, element is positioned relative to viewport or the browser window itself. viewport doesnt changed if u scroll and hence fixed element will stay right in the same position</p>
184+
<p>static, element will be positioned based on the normal flow of the document. usually, u will use position static to remove other position mibht be applied to an element.</p>
185+
<p>ref: <a href="http://www.barelyfitz.com/screencast/html-training/css/positioning/">css positioning in ten steps</a>, <a href="http://css-tricks.com/absolute-relative-fixed-positioining-how-do-they-differ/">css position</a>, <a href="https://developer.mozilla.org/en-US/docs/Web/CSS/position">MDN: position</a></p>
180186
</div>
181187
<div id="http_request">
182188
<h2>7. something </h2>
@@ -269,6 +275,7 @@ <h2>12. overflow</h2>
269275
&lt;style&gt;<br/> div {<br/> overflow: hidden;<br/> }<br/> p {<br/> float: left;<br/> }<br/>&lt;/style&gt;<br/>&lt;div&gt;<br/> &lt;p&gt;I am floated&lt;/p&gt;<br/> &lt;p&gt;So am I&lt;/p&gt;<br/>&lt;/div&gt;<br/>
270276
</code></pre>
271277
<p><strong>Answer:</strong> yes</p>
278+
<p>ref: <a href="http://css-tricks.com/the-css-overflow-property/">overflow</a> (read the link and add something from it)</p>
272279
</div>
273280
<div id="mtuli_lang">
274281
<h2>13. pre processor</h2>

0 commit comments

Comments
 (0)