HTML CSS Reference/CSS Attributes and Javascript Style Properties/border width

Материал из Web эксперт
Версия от 08:19, 26 мая 2010; Admin (обсуждение | вклад) (1 версия)
(разн.) ← Предыдущая | Текущая версия (разн.) | Следующая → (разн.)
Перейти к: навигация, поиск

"border-width" Example

    
<html>
<head>
<style>
.style1 { 
    border:5px solid #EEEEEE; 
    border-width:6px; 
}
.style2 { 
    border:"none"; 
    font-weight:bold 
}
</style>
</head>
<body>
<div id="myL" 
     style="width:230; 
            height:100; 
            background-color:beige"
            onmouseover="this.className="style1""
            onmouseout="this.className="style2"">
            
            Move mouse in and out.
</div>
</body>
</html>



"border-width" is applied to

+----------------+--------------------------------------------------------------+
| Applied_To     |<a>                             <acronym>                     |
|                |<b>                             <bdo>                         |
|                |<big>                           <blockquote>                  |
|                |<body>                          <button>                      |
|                |<caption>                       <center>                      |
|                |<cite>                          <code>                        |
|                |<custom>                        <dd>                          |
|                |defaults                        <del>                         |
|                |<dfn>                           <dir>                         |
|                |<div>                           <dl>                          |
|                |<dt>                            <em>                          |
|                |<embed>                         <fieldset>                    |
|                |<font>                          <form>                        |
|                |<frame>                         <hn>                          |
|                |<i>                             <img>                         |
|                |<input type="button">           <input type="checkbox">       |
|                |<input type="file">             <inputtype="image">           |
|                |<input type="password">         <input type="radio">          |
|                |<input type="reset">            <input type="submit">         |
|                |<input type="text">             <ins>                         |
|                |<isindex>                       <kbd>                         |
|                |<label>                         <li>                          |
|                |<listing>                       <marquee>                     |
|                |<menu>                          <nobr>                        |
|                |<object>                        <ol>                          |
|                |<p>                             <pre>                         |
|                |<q>                             runtimeStyle                  |
|                |<s>                             <samp>                        |
|                |<small>                         <span>                        |
|                |<strike>                        <strong>                      |
|                |style                           <sub>                         |
|                |<sup>                           <table>                       |
|                |<td>                            <textarea>                    |
|                |<th>                            <tt>                          |
|                |<u>                             <ul>                          |
|                |<var>                           <xmp>                         |
+----------------+--------------------------------------------------------------+



"border-width" Possible Values

Possible Values
medium       Default value
thin         Thinner border than medium
thick        Thicker border than medium
length       A floating point number followed by a unit designator



"border-width" Syntax and Note

Note:
This style property defines the width for all sides of the border.
Syntax:
    
element { border-width: value }
elementID.style.borderWidth = "value"
document.all.elementID.style.borderWidth = "value" // IE only