0

Sir I have these codes

<html>
<head>
<style type="text/css">
#pic {
  float:left;
  width: 170px;
  border: 1px solid red;
  padding: 1px;
  text-align: center;
  font-size:12px;
}

#pic img {
  float:left;
  width: 50px;
  height: 45px;
}

</style>
</head>

<body>
<div id="pic">
<p>
<img src="https://www.gravatar.com/avatar/ecefb26ed5fc91eca453b31a1f7cdfd8?

d=identicon&s=80">
General Manager<br/>
Azhar Sharif<br/>
0302-1234567
</p>
 </div>
<body>

This displays following output

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

Attachments bb.png 11.62 KB
2
Contributors
1
Reply
13
Views
2 Years
Discussion Span
Last Post by gentlemedia
1

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 }
This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.