HTML CSS Reference/CSS Attributes and Javascript Style Properties/height

Материал из Web эксперт
Перейти к: навигация, поиск

"height" Example

   <source lang="html4strict">
   

<html> <body>

<img id="myImg" src="http://www.wbex.ru/style/logo.png" style="width:74; height:100">

<input type="button" value="Reduce height" onclick="myImg.style.height=50"> <input type="button" value="Restore height" onclick="myImg.style.height=100"> </body> </html>


     </source>
   
  


"height" is applied to

   <source lang="html4strict">

+----------------+--------------------------------------------------------------+ | Applied_To |<a> <acronym> | | |<address> <applet> | | | |

| |
|

| |<button> |

| |
|

| | currentStyle | | |<custom>

| | | |

| |<dir>
| | |
| | | <embed> | | |<fieldset> | | |<form> <frame> | | |<frameset> <hn> | | |
|

| |<iframe> <img> | | |<input type="button"> <inputtype="checkbox"> | | |<input type="file"> <input type="image"> | | |<inputtype="password"> <input type="radio"> | | |<input type="reset"> <inputtype="submit"> | | |<input type="text"> | | | <label> |

| |<legend>
  • | | |<listing> <marquee> | | |<menu> <nobr> | | |<object>
      | | |<option>

      | | |

                                                            |
      |                |                                                    |
      |                |runtimeStyle                                               |
      |                |                          <select>                      |
      |                |                                                 |
      |                |                                              |
      |                |style                                                    |
      |                |                                                  |
      |                |                          |
      

      | | |

      | |
        | | |<xmp> | +----------------+--------------------------------------------------------------+ </source>

        "height" Possible Values

        <source lang="html4strict"> Possible Values auto The height is set automatically integer a fixed height with a number followed by a unit designator percentage Percent of the element"s height


        </source>



        "height" Syntax and Note

        <source lang="html4strict"> Note: The element"s content height. Syntax:

        element { height: value } elementID.style.height = "value" document.all.elementID.style.height = "value" // IE only


        </source>

      <textarea> | | |