सीएसएस टेबल-लेआउट संपत्ति
उदाहरण
विभिन्न तालिका लेआउट एल्गोरिदम सेट करें:
table.a {
table-layout: auto;
width: 180px;
}
table.b {
table-layout:
fixed;
width: 180px;
}
परिभाषा और उपयोग
table-layout
संपत्ति तालिका कोशिकाओं, पंक्तियों और स्तंभों को रखने के लिए उपयोग किए जाने वाले एल्गोरिथ्म को परिभाषित करती है ।
युक्ति: टेबल-लेआउट का मुख्य लाभ: निश्चित; यह है कि तालिका बहुत तेजी से प्रस्तुत करती है। बड़ी तालिकाओं पर, उपयोगकर्ता तब तक तालिका का कोई भाग नहीं देखेंगे जब तक कि ब्राउज़र ने संपूर्ण तालिका को प्रस्तुत नहीं कर दिया हो। इसलिए, यदि आप टेबल-लेआउट: फिक्स्ड का उपयोग करते हैं, तो ब्राउज़र के लोड होने और शेष तालिका को प्रस्तुत करने के दौरान उपयोगकर्ता तालिका के शीर्ष को देखेंगे। इससे यह आभास होता है कि पृष्ठ बहुत तेज़ी से लोड होता है!
डिफ़ॉल्ट मान: | ऑटो |
---|---|
विरासत में मिला: | नहीं |
एनिमेटेबल: | नहीं। एनिमेटेबल के बारे में पढ़ें |
संस्करण: | सीएसएस 2 |
जावास्क्रिप्ट सिंटैक्स: | वस्तु .style.tableLayout="निश्चित" |
ब्राउज़र समर्थन
तालिका में संख्याएं पहले ब्राउज़र संस्करण को निर्दिष्ट करती हैं जो पूरी तरह से संपत्ति का समर्थन करता है।
Property | |||||
---|---|---|---|---|---|
table-layout | 14.0 | 5.0 | 1.0 | 1.0 | 7.0 |
सीएसएस सिंटेक्स
table-layout: auto|fixed|initial|inherit;
सम्पत्ति की कीमत
Value | Description | Play it |
---|---|---|
auto | Browsers use an automatic table layout algorithm. The column width is set by the widest unbreakable content in the cells. The content will dictate the layout | |
fixed | Sets a fixed table layout algorithm. The table and column widths are set by the widths of table and col or by the width of the first row of cells. Cells in other rows do not affect column widths. If no widths are present on the first row, the column widths are divided equally across the table, regardless of content inside the cells | |
initial | Sets this property to its default value. Read about initial | |
inherit | Inherits this property from its parent element. Read about inherit |
संबंधित पृष्ठ
सीएसएस ट्यूटोरियल: सीएसएस टेबल
एचटीएमएल डोम संदर्भ: टेबललेआउट संपत्ति