शैली लंबवतसंपत्ति संरेखित करें
उदाहरण
किसी तालिका में कुछ पाठ के लंबवत संरेखण को "नीचे" पर सेट करें:
document.getElementById("myTd").style.verticalAlign = "bottom";
परिभाषा और उपयोग
लंबवत संरेखण गुण किसी तत्व में सामग्री के लंबवत संरेखण को सेट या लौटाता है।
ब्राउज़र समर्थन
Property | |||||
---|---|---|---|---|---|
verticalAlign | Yes | Yes | Yes | Yes | Yes |
वाक्य - विन्यास
लंबवत संरेखण संपत्ति लौटाएं:
object.style.verticalAlign
लंबवत संरेखण संपत्ति सेट करें:
object.style.verticalAlign = value
सम्पत्ति की कीमत
Value | Description |
---|---|
length | Raises or lower an element by the specified length. Negative values are allowed |
% | Raises or lower an element in a percent of the "line-height" property. Negative values are allowed |
baseline | Align the baseline of the element with the baseline of the parent element. This is default |
sub | Aligns the element as it was subscript |
super | Aligns the element as it was superscript |
top | The top of the element is aligned with the top of the tallest element on the line |
text-top | The top of the element is aligned with the top of the parent element's font |
middle | The element is placed in the middle of the parent element |
bottom | The bottom of the element is aligned with the lowest element on the line |
text-bottom | The bottom of the element is aligned with the bottom of the parent element's font |
initial | Sets this property to its default value. Read about initial |
inherit | Inherits this property from its parent element. Read about inherit |
टेक्निकल डिटेल
डिफ़ॉल्ट मान: | आधारभूत |
---|---|
प्रतिलाभ की मात्रा: | एक स्ट्रिंग, किसी तत्व में सामग्री के लंबवत संरेखण का प्रतिनिधित्व करती है |
सीएसएस संस्करण | सीएसएस 1 |
और ज्यादा उदाहरण
उदाहरण
<td> तत्व का लंबवत संरेखण लौटाएं:
alert(document.getElementById("myTd").style.verticalAlign);
संबंधित पृष्ठ
सीएसएस ट्यूटोरियल: सीएसएस टेक्स्ट
सीएसएस संदर्भ: लंबवत-संरेखित संपत्ति
❮ स्टाइल ऑब्जेक्ट