jQuery Add Border to All Images or CSS Add Border to All Images in Webpage

Introduction

Here I will explain how to use CSS to add border to all images in webpage or jQuery to add border to all images in webpage.
Description:


To add border to all images in webpage we need to write CSS class like as shown below

<style type="text/css">
img {
background-color: #A3BB43 ;
border: 1px solid #A3BB43 ;
padding: 5px 5px 5px 5px ;
}
</style>
If you want to see it in complete example check below code

<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>CSS Add Border to All images in webpage</title>
<style type="text/css">
img {
background-color: #A3BB43 ;
border: 1px solid #A3BB43 ;
padding: 5px 5px 5px 5px ;
}
</style>
</head>
<body>
<div>
<img src="AS.jpg" /><br /><br /><br />
<img src="FinalLogo.png" />
</div>
</body>
</html>

Comments