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
+12-12Lines changed: 12 additions & 12 deletions
Original file line number
Diff line number
Diff line change
@@ -205,12 +205,12 @@ <h2>css related interview questions</h2>
205
205
<li><ahref="#units">pixels, em vs percent</a></li>
206
206
<li><ahref="#position">relative, absolute or fixed position.</a></li>
207
207
<li><ahref="#displayVisibility"><code>display:none</code> vs <code>visibility:hidden</code></a></li>
208
-
<li><ahref="#http_request">Will browser make http request for the following case?</a></li>
209
-
<li><ahref="#download_order">Which resource would be downloaded first?</a></li>
210
-
<li><ahref="#optional_tag">What is optional tag?</a></li>
211
-
<li><ahref="#div_span">What are the differences between div and span?</a></li>
212
-
<li><ahref="#div_section_article">How you would differentiate div, section and article?</a></li>
213
-
<li><ahref="#svg_canvas">How to select svg or canvas for your site?</a></li>
208
+
<li><ahref="#inlineBlock">inline, inline-block vs block</a></li>
209
+
<li><ahref="#boxModel">box Model</a></li>
210
+
<li><ahref="#overflow">overflow</a></li>
211
+
<li><ahref="#mediaQueries">media queries</a></li>
212
+
<li><ahref="#pseudoClass">pseudo class and element</a></li>
213
+
<li><ahref="#verticalCenter">vertical center issues</a></li>
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>
@@ -311,7 +311,7 @@ <h2>6. display vs visibility</h2>
311
311
<p>if u want to say it smartly, <code>display:none</code> cuases DOM reflow where is <code>visibility:hidden</code> doesn't. btw, what is reflow? answer. sorry i wont tell you, google it.</p>
312
312
<p>ref: <ahref="http://www.vanseodesign.com/css/visibility-vs-display/">visibility vs Display</a></p>
313
313
</div>
314
-
<divid="inline_block">
314
+
<divid="inlineBlock">
315
315
<h2>7. inline block</h2>
316
316
<p><strong>Question:</strong> What are the differences between inline, block and inline-block</p>
317
317
<p><strong>Answer: </strong></p>
@@ -320,7 +320,7 @@ <h2>7. inline block</h2>
320
320
<p><code>inline-block</code>, will be similar to inline and will go with the flow of the page. Only differences is this this will take height and width.</p>
<p><strong>Question:</strong> What are the properties related to box model?</p>
326
326
<p><strong>Answer:</strong> everything in a web page is a box where you can control size, position, background, etc. Each box/content area is optionally surrounded by padding, border and margin. When you set height and width of an element, you set content height and width.</p>
@@ -334,7 +334,7 @@ <h2>8. box model</h2>
334
334
</div>
335
335
</div>
336
336
</div>
337
-
<divid="svg_canvas">
337
+
<divid="overflow">
338
338
<h2>9. overflow</h2>
339
339
<p><strong>Question:</strong> Does overflow: hidden create a new block formatting context?</p>
340
340
<p><strong>Answer:</strong> yes</p>
@@ -362,7 +362,7 @@ <h2>9. overflow</h2>
362
362
<p>ref: <ahref="http://css-tricks.com/the-css-overflow-property/">overflow</a> (read the link and add something from it)</p>
363
363
</div>
364
364
365
-
<divid="div_section_article">
365
+
<divid="mediaQueries">
366
366
<h2>10. media queries</h2>
367
367
<p><strong>Question:</strong> How could you apply css rules specific to a media?</p>
368
368
<p><strong>Answer: </strong><code>@media (max-width:700px){...}</code> means you want to apply rules to those media whose max-width is 700 px. this means every samller device will have this rule.</p>
<p>ref: <ahref="http://mobile.smashingmagazine.com/2010/07/19/how-to-use-css3-media-queries-to-create-a-mobile-version-of-your-website/">how to use media queries</a>, <ahref="https://developer.mozilla.org/en-US/docs/Web/Guide/CSS/Media_queries">css media queries</a>, <ahref="http://www.w3.org/TR/css3-mediaqueries/#media0">W3: media queries</a></p>
375
375
</div>
376
-
<divid="div_span">
376
+
<divid="pseudoClass">
377
377
<h2>11. pseudo class</h2>
378
378
<p><strong>Question:</strong> What are the some peseudo classed u have used?</p>
379
379
<p><strong>Answer: </strong> pseudo class tells you specific state of an element. allow to style element dynamically. The most popular one is <code>:hover</code>. Besides i have used <code>:visited</code>, <code>:focus</code>, <code>:nth-child</code>, <code>nth-of-type</code>, <code>:link</code>, etc.</p>
<p><strong>Question:</strong> How do you align a p center-center inside a div?</p>
400
400
<p><strong>Answer:</strong><code>text-align:center</code>will do the horizontal alignment but <code>vertical-laign:middle</code> will not work here. there are couple of different ways to solve this problem and one of them are positioning. You make the parent as relative position and child as absolute positioning. And then define all position parameter as sero and width 50% and height 30% (sounds messy look at the example and read ref) </p>
0 commit comments