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
+8-4Lines changed: 8 additions & 4 deletions
Original file line number
Diff line number
Diff line change
@@ -70,6 +70,8 @@
70
70
height:280px;
71
71
border:2px solid gray;
72
72
padding:5px;
73
+
overflow-y: scroll;
74
+
overflow-x: hidden;
73
75
}
74
76
.overflowBox{
75
77
padding:5px;
@@ -215,7 +217,7 @@ <h2>css related interview questions</h2>
215
217
<divid="doctype">
216
218
<h2>1. float</h2>
217
219
<p><strong>Question:</strong> How float works?</p>
218
-
<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 litter 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>
220
+
<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>
219
221
<p> if you set, 'float: left;' for an image, it will move to the left until the margin, padding or border of another block-level element is reached. The normal flow will wrap around on the right side.</p>
<p><strong>Question:</strong>When will you use clear?</p>
243
-
<p><strong>Answer:</strong> floating elements will not be accepted on the side you cleared. 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>
244
+
<p><strong>Question:</strong>How can you clear side of a floating element?</p>
245
+
<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>Question:</strong> How can you fix, "floated points don't add up to the height of a parent"?</p>
264
+
<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>
0 commit comments