Set border to '6px double #666' for an image : img border « Tags « HTML / CSS






Set border to '6px double #666' for an image

      
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" 
  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  
<html xmlns="http://www.w3.org/1999/xhtml" lang="en">
    <head>
        <title></title>
<style type="text/css">
img {
  width: 300px;
  border: 6px double #666;
  background: #fff;
  padding: 4px;
  display:block;
}

a:link {
  display:block;
}

a:hover img {
  border-style: solid;
  background: #999;
}

</style>

    </head>
    <body>

<a href="http://www.www.java2s.com"><img src="http://www.java2s.com/style/logo.png" alt="Face" /></a>
    </body>
</html>

   
    
    
    
    
  








Related examples in the same category

1.Remove border from an image
2.CSS Image Border
3.img width: 300px; border: 6px double #666; background: #fff; padding: 4px; display:block;
4.a img width: 300px; border: 0; display: block;