You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: css.html
+15-15Lines changed: 15 additions & 15 deletions
Original file line number
Diff line number
Diff line change
@@ -198,13 +198,13 @@ <h2>css related interview questions</h2>
198
198
</div>
199
199
200
200
<!-- <h3>If you have hard time to follow this video, you can see the content below. Things you will learn-</h3> -->
201
-
<!-- <ol>
202
-
<li><a href="#doctype">what is the use of html doctype?</a></li>
203
-
<li><a href="#data_attribute">What is the use of data-* attribute?</a></li>
204
-
<li><a href="#keygen">How can you generate public key in html?</a></li>
205
-
<li><a href="#bdo">How do you change direction of html text?</a></li>
206
-
<li><a href="#mark">How can you highlight text in html?</a></li>
207
-
<li><a href="#scopped">can you apply css to a part of html document only?</a></li>
201
+
<ol>
202
+
<li><ahref="#float">float</a></li>
203
+
<li><ahref="#clear">clear sides of floats</a></li>
204
+
<li><ahref="#rapidFire">tricky questions</a></li>
205
+
<li><ahref="#units">pixels, em vs percent</a></li>
206
+
<li><ahref="#position">relative, absolute or fixed position.</a></li>
207
+
<li><ahref="#displayVisibility"><code>display:none</code> vs <code>visibility:hidden</code></a></li>
208
208
<li><ahref="#http_request">Will browser make http request for the following case?</a></li>
209
209
<li><ahref="#download_order">Which resource would be downloaded first?</a></li>
210
210
<li><ahref="#optional_tag">What is optional tag?</a></li>
@@ -214,8 +214,8 @@ <h2>css related interview questions</h2>
214
214
<li><ahref="#mtuli_lang">How to serve html in multiple language?</a></li>
215
215
<li><ahref="#standard_quirks">Explain standard and quirks mode.</a></li>
216
216
<li><ahref="#semantic_html">Array methods in string?</a></li>
217
-
</ol> -->
218
-
<divid="doctype">
217
+
</ol>
218
+
<divid="float">
219
219
<h2>1. float</h2>
220
220
<p><strong>Question:</strong> How float works?</p>
221
221
<p><strong>Answer:</strong> float is to push element on a side of a page with text wrap around it. you can create entire page or smaller area by using float. if size of a floated element changes, text around it will reflow to accomodate the changes. You can have float left, right, none or inherit.</p>
@@ -240,9 +240,9 @@ <h2>1. float</h2>
240
240
<p><strong>extra:</strong> read the positioning constraints in <ahref="http://www.w3.org/TR/CSS1/#floating-elements">W3.org: floating elements</a>.</p>
<p><strong>Question:</strong> How can you clear side of a floating element?</p>
245
+
<p><strong>Question:</strong> How can you clear sides of a floating element?</p>
246
246
<p><strong>Answer:</strong> If you clear a silde of an element, floating elements will not be accepted on that side. With 'clear' set to 'left', an element will be moved below any floating element on the left side. clear is used to stop wrap of an element around a floating element.</p>
<p><strong>Answer:</strong> You can use <code>clear:both</code> in an empty div <code><div style="clear: both;"></div></code>, you can use overflow hidden or scroll and you can float the parent as well.</p>
<p><strong>Question:</strong> How absolute, relative, fixed and static position differ?</p>
300
300
<p><strong>Answer:</strong></p>
@@ -304,7 +304,7 @@ <h2>5. position</h2>
304
304
<p><em>static</em>, 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>
305
305
<p>ref: <ahref="http://www.barelyfitz.com/screencast/html-training/css/positioning/">css positioning in ten steps</a>, <ahref="http://css-tricks.com/absolute-relative-fixed-positioining-how-do-they-differ/">css position</a>, <ahref="https://developer.mozilla.org/en-US/docs/Web/CSS/position">MDN: position</a></p>
306
306
</div>
307
-
<divid="">
307
+
<divid="displayVisibility">
308
308
<h2>6. display vs visibility</h2>
309
309
<p><strong>Question:</strong> What are the differences between visibility hidden and display none?</p>
310
310
<p><strong>Answer:</strong><code>display:none</code> removes the element from the normal layout flow and allow other elements to fill in. <code>visibility:hidden</code> tag is rendered, it takes space in the normal flow but hides it.</p>
0 commit comments