Sir I have these codes

<style type="text/css">
#pic {
  width: 170px;
  border: 1px solid red;
  padding: 1px;
  text-align: center;

#pic img {
  width: 50px;
  height: 45px;


<div id="pic">
<img src="

General Manager<br/>
Azhar Sharif<br/>

This displays following output

I want to remove white space from top and bottom of text and image because there is padding:0.

That space is caused by the default top/bottom margin of the p tag, so you might want to add something like this:

#pic p { margin: 0 }
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.