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

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

"border-top-width" Example

   <source lang="html4strict">
   

<html> <head> <style> .style1 {

   border:5px solid #cccccc; 
   border-top-width:6px; 
   font-family:verdana; 
   font-weight:bold

} .style2 {

   border:"none"; 
   font-family:verdana; 
   font-weight:bold 

} </style> </head> <body> Move mouse in and out to see the style change.

This is a div element.

</body> </html>


     </source>
   
  


Border width setting for four directions

   <source lang="html4strict">

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"

                     "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">

   <head>
       <title>border-width</title>
       <style rel="stylesheet" type="text/css">

div {

   padding: 3px;
   border-color: khaki;
   border-style: solid;
   background: lightyellow;
   margin: 5px;
   float: left;
   width: 50px;
   height: 50px;

} div#properties {

   border-top-width: 2px;
   border-right-width: 4px;
   border-bottom-width: 8px;
   border-left-width: 10px;

}

       </style>
   </head>
   <body>
   </body>

</html>

</source>