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:
In previous articles I explained jQuery display testimonials with CSS example, jQuery get or access session value, jQuery right click context menu example, jQuery Add text to end of div, jQuery disable submit button after click to avoid duplicate
form submission and many articles relating to JQuery,
JavaScript, asp.net,
code snippets. Now I will explain how to add border to all
images in webpage with CSS
or jQuery.
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>
|
Before
Add CSS Class Images will be like this
After
Add CSS Class Images will be like this
If you enjoyed this post, please support the blog below. It's FREE! Get the latest Asp.net, C#.net, VB.NET, jQuery, Plugins & Code Snippets for FREE by subscribing to our Facebook, Twitter, RSS feed, or by email. |
|||
|
|||
0 comments :
Note: Only a member of this blog may post a comment.