HTML/CSS/CSS Attributes and Javascript Style Properties/border color

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

border-color: blue

   <source lang="html4strict">

<?xml version = "1.0"?> <!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">

  <head>
     <title>Borders</title>
     <style type = "text/css">
        div{ text-align: center;
                  margin-bottom: 1em;
                  padding: .5em;
                  border-width: thick;
                  border-color: blue;
                  border-style: groove; }
     </style>
  </head>
  <body>
this is a test.
  </body>

</html>

</source>
   
  


"border-color" Example

   <source lang="html4strict">
   

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

   border:5px solid #cccccc; 
   border-color:red; 
   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>
   
  


You can individually change the color of the bottom, left, top and right sides of a box"s border using the properties:

   <source lang="html4strict">

border-bottom-color border-right-color border-top-color border-left-color

</source>