Clear



To force an element to start below any floated elements, we can use the clear property with a value of left, right, or both. An element whose clear property is set to left will start below all left-floated boxes in the same block formatting context, while a clear value of right will clear all right-floated boxes. If clear is set to both, the element will start below any floated box in that context. Figure 2 shows the example above, but this time, the second paragraph has a clear value of left.

A cleared elementAn illustration of a cleared p element. The img floats above a non-cleared p element, but not the cleared p element which is not drawn until after the bottom of the img element.
To achieve this clearing, we add space above the cleared element’s top margin until it’s clear of the affected floated boxes. As a result, we can’t use the top margin on the cleared element if we want a specific amount of space between it and the floated box. Space is added above the cleared element’s top margin until it’s free of the float, but that’s all. If we want to create space beneath the floated box, we must set the bottom margin of the floated element, or set top padding on the cleared element.

Internet Explorer for Windows will automatically clear all floated children of an element that has a layout, though this implementation disagrees with the CSS specification.

Urdu:

کسی بھی عناصر شروع سے نیچے شروع کرنے کے لئے ایک عنصر مجبور کرنے کے لئے ، ہم ، بائیں بازو کی ایک قیمت کے ساتھ واضح خصوصیت کا استعمال ، یا دونوں کر سکتے ہیں . حق کی ایک واضح قیمت ٹھیک - شروع خانوں صاف ہو جائے گا ، جبکہ جس کا واضح جائیداد چھوڑ کرنے کے لئے مقرر ایک عنصر ، ایک ہی بلاک فارمیٹنگ تناظر میں تمام بائیں شروع خانوں کے نیچے شروع ہو جائے گا . واضح دونوں کے لئے مقرر کیا جاتا ہے تو ، عنصر اس تناظر میں کسی بھی پیش باکس کے نیچے شروع ہو جائے گا . چترا 2 مندرجہ بالا مثال سے ظاہر ہوتا ہے ، لیکن اس وقت ، دوسرے پیراگراف بائیں بازو کی ایک واضح اہمیت کی حامل ہے .

ایک صاف عنصر . ایک صاف P عنصر کی ایک مثال . IMG ایک غیر صاف P عنصر اوپر floats کے ، لیکن صاف P عنصر IMG عنصر کے سب سے نیچے کے بعد تک تیار نہیں ہے نہیں ہے.
یہ متاثر شروع خانوں کی واضح ہے جب تک اس کے صاف کرنے کی حاصل کرنے کے لئے ، ہم صاف عنصر کے سب سے اوپر مارجن سے اوپر کی جگہ کا اضافہ . ہم نے اسے اور شروع باکس کے درمیان کی جگہ کا ایک مخصوص رقم چاہتے ہیں تو اس کے نتیجے میں ، ہم صاف عنصر پر سب سے اوپر مارجن استعمال نہیں کر سکتے . خلائی یہ فلوٹ مفت ہے جب تک صاف عنصر کے سب سے اوپر مارجن سے اوپر شامل ، لیکن یہ سب کی ہے. ہم شروع باکس کے نیچے کی جگہ بنانے کے لئے چاہتے ہیں، ہم شروع عنصر کے سب سے نیچے مارجن مقرر ، یا صاف عنصر پر سب سے اوپر بھرتی قائم کرنا ضروری ہے .

یہ عمل سی ایس ایس کی تفصیلات سے اتفاق نہیں کرتے اگرچہ ونڈوز کے لیے انٹرنیٹ ایکسپلورر خود کار طریقے سے تمام صاف کریں ، ایک ترتیب ہے کہ ایک عنصر کے بچوں شروع ہو جائے گا .


No comments:

Post a Comment