Need a little help about HTML tables

Discussion in 'HTML & Website Design' started by jahangir, Dec 27, 2010.

  1. #1
    I am not very good at HTML but I know only basic things.

    I have created a table to show 2 links with short description on my blog, when I see the preview in browser it is looking perfectly - see below

    [​IMG]

    But after putting that code on the site it is showing extra gap between the lines of first ad (on left) - see below

    [​IMG]

    Here is the code I have

    <style type="text/css">
    <!--
    .style1 {
    	font-family: arial;
    	font-size: 11px;
    	font-weight: bold;
    }
    .style2 {
    	font-size: 11px;
    	font-family: arial;
    	color: #999999;
    }
    a:link {
    	color: #000000;
    	text-decoration: none;
    }
    a:visited {
    	text-decoration: none;
    	color: #000000;
    }
    a:hover {
    	text-decoration: none;
    	color: #cc0000;
    }
    a:active {
    	text-decoration: none;
    	color: #cc0000;
    }
    -->
    </style>
    <table width="550" border="0">
      <tr>
        <td width="275" valign="top"><p><span class="style1"><a href="http://www.decentbanners.com/" target="_blank">Professional Banner Design Services</a><br>
          </span><span class="style2">High quality professional banner ad designs <br>
          from $15.
          Fast turnaround &amp; satisfaction guaranteed.</span><span class="style1"><br>
          </span></p>    </td>
        <td width="275" valign="top"><span class="style1"><a href="http://www.dezineweblog.com/advertise/">Advertise Your Site Here </a><br>
        </span><span class="style2">Promote your site to thousands of visotors at very affordable prices and gain more exposure. </span></td>
      </tr>
    </table>
    
    Code (markup):
    Can anyone please try to help me with this? :)
     
    jahangir, Dec 27, 2010 IP
  2. phpwnes

    phpwnes Peon

    Messages:
    509
    Likes Received:
    7
    Best Answers:
    0
    Trophy Points:
    0
    #2
    make a <div> and create a CSS padding to fix it on that part
     
    phpwnes, Dec 27, 2010 IP
  3. bobwillz

    bobwillz Active Member

    Messages:
    685
    Likes Received:
    0
    Best Answers:
    1
    Trophy Points:
    61
    #3
    First Table (Professional banner design) after this headline .. see there is space when u write other text...
    and 2nd table is ok ,becoz there is no space after headline! so it would be a prob on it !!!
     
    bobwillz, Dec 27, 2010 IP
  4. jahangir

    jahangir Peon

    Messages:
    633
    Likes Received:
    7
    Best Answers:
    0
    Trophy Points:
    0
    #4
    Problem fixed.

    I was just playing with <p> and <br /> and somehow I fixed it myself :D

    You can see how smooth it is appearing on my blog here

    Just for others to know how it got fixed I am pasting the code below

    <style type="text/css">
    <!--
    .style1 {
    	font-family: arial;
    	font-size: 11px;
    	font-weight: bold;
    }
    .style2 {
    	font-size: 11px;
    	font-family: arial;
    	color: #999999;
    }
    a:link {
    	color: #000000;
    	text-decoration: none;
    }
    a:visited {
    	text-decoration: none;
    	color: #000000;
    }
    a:hover {
    	text-decoration: none;
    	color: #cc0000;
    }
    a:active {
    	text-decoration: none;
    	color: #cc0000;
    }
    -->
    </style>
    <table width="550" border="0">
    <tr>
    <td width="275" valign="top"><span class="style1"><a href="http://www.decentbanners.com/" onClick="javascript: pageTracker._trackPageview('/outgoing/decentbannerslink');" target="_blank">Professional Banner Design Services</a><br/></span>
    <span class="style2">High quality professional banner ad designs from $15. Fast turnaround &amp; satisfaction guaranteed.</span>
    </td>
    
    <td width="275" valign="top"><span class="style1"><a href="http://www.dezineweblog.com/advertise/" onClick="javascript: pageTracker._trackPageview('/outgoing/advertiseherelink');">Advertise Your Site Here</a><br/></span>
    <span class="style2">Promote your site to thousands of visotors at very affordable prices and gain more exposure.</span>
    </td>
    </tr>
    </table>
    Code (markup):
     
    jahangir, Dec 27, 2010 IP