Sir I have following codes

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "">
<html xmlns="">

    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />

<style type="text/css">
#aboutus {
  border: 1px solid silver;
  color: white;
  font-size: 12pt;
  width: 250px;
  margin: 0 auto;
  background: #F0FFF0;
  background: url(images/dream2.jpg);
  background-size: cover;
  text-align: center;
  padding: 20px;
  overflow: auto;

#units {
  border: 1px solid silver;
  color: red;
  width: 220px;
  height: 80px;
  background: white;
  text-align: left;
  padding: 5px;
  float: left;
  margin: 2px;

#units p {
  font-size: 14px;
  color: green;

#units span {
  color: blue;
  font-size: 14px;
  font-style: italic;
    <div id="aboutus">

        <div id="units">
        My Compnay Name
        <p>My company Address</p>
        <span>My Company Contact Numbers</span>

I want to remove gap between second and third line shown in image.

Recommended Answers

All 4 Replies

Can you post an HTML snippet too?

I have uploaded again

You're juggeling a bit with html tags in 'units', but the spacing is caused by the browser default styling (margin-bottom) of the paragraph tag. To get rid of it, set it to '0'.

There are many ways you can do this. Perhaps the simplest is just to restructure your html slightly with:

        <div id="units">
            My Company Name
                My company Address<br />
                <span>My Company Contact Numbers</span>

With CSS there are probably a dozen ways of doing it but the above seems least effort. PS You spelled Company wrong too!

Be a part of the DaniWeb community

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