We help IT Professionals succeed at work.

Why there is a space between pictures?

eddyperu
eddyperu asked
on
777 Views
Last Modified: 2011-10-19
There is Space between my two table, I ma sending my code nad a picture so you can see it better.
I tried eveything , valign="bottom,top.." but nothing..Any ideas?

Also I put a red boarder so it can be seing more clear the space between drawings.
In the picture you can see that the picture number 2 is touching the picture number 1, the problem is in the picture one.
<tr>
           <td>
            <table border="1"  bordercolor="red" cellpadding="0" cellspacing="0" height="49px">
                <tr>                              
                    <td>
                        <a href="?" onmouseover="swap('dog','images/dog-ON.png')" onmouseout="swap('dog','images/dog-OFF.png')">
                         <img id="dog" src="images/dog-OFF.png" style="border: 0px;" /></a>
                    </td>
                    <td>
                        <a href="?" onmouseover="swap('car','images/Gcar-ON.png')" onmouseout="swap('car','images/car-OFF.png')">
                         <img id="car" src="images/car-OFF.png" style="border: 0px;"/></a>
                    </td>                       
                                                       
                </tr>
            </table>
           </td>           
          </tr>
// The space between this 2 table is here (I think!)
          <tr>
           <td>
            <asp:Panel runat="server" ID="InformationBox">
              <table cellpadding="0" cellspacing="0" border="0" background="images/InformationBox.png" width="874px" height="416px">
                <tr>
                 <td>
                    &nbsp;
                 </td>
                </tr>
              </table>
            </asp:Panel>                
           </td>          
          </tr>

Open in new window

Space-between-tables.bmp
Comment
Watch Question

This one is on us!
(Get your first solution completely free - no credit card required)
UNLOCK SOLUTION
Kevin CrossChief Technology Officer
CERTIFIED EXPERT
Most Valuable Expert 2011
Commented:
This one is on us!
(Get your first solution completely free - no credit card required)
UNLOCK SOLUTION
Joel CoehoornDirector of Information Technology
CERTIFIED EXPERT
Commented:
This one is on us!
(Get your first solution completely free - no credit card required)
UNLOCK SOLUTION

Author

Commented:
HI Everyone,
Thanks for your comments and your help. Yall rock!! :) I make it work and everyone of you is right but the explication is totally crazy, I think is one of the stuff that asp does because.
Well, when anyone use anchors <a> ,ASP reads the anchor and also read the space before the anchors, why? Well ASP needs to know that you are going to start an anchor so when it render the page to the server. It send this "(space)anchor......"as a default. The server read this and do what it say. wear isn't ?  How to prove that? Well, do the same but this time take the anchors away and only leave a simple image, you will see that the pictures doesn't have the white space between them but with anchor it does.
Way how to fix it: If you put the row in one line, it will work great. ASP reads everything as a complete string without white spaces and that is what it is send to the server, in this way you are not giving ASP chance to set up a white space before the anchor.(By default ASP will set a white space before the anchor).
Now, if you are thinking about it will be more easy with CSS, well that is not quite right neither. Css have some bugs about the same issue, you need to use a <span> or <div>in some place  to avoid all this problem.

Thanks for all your help and if is okey with you I will give everyone part of the points, ok? If you are not agree please write me back. :) :) Thanks Experts

Gain unlimited access to on-demand training courses with an Experts Exchange subscription.

Get Access
Why Experts Exchange?

Experts Exchange always has the answer, or at the least points me in the correct direction! It is like having another employee that is extremely experienced.

Jim Murphy
Programmer at Smart IT Solutions

When asked, what has been your best career decision?

Deciding to stick with EE.

Mohamed Asif
Technical Department Head

Being involved with EE helped me to grow personally and professionally.

Carl Webster
CTP, Sr Infrastructure Consultant
Empower Your Career
Did You Know?

We've partnered with two important charities to provide clean water and computer science education to those who need it most. READ MORE

Ask ANY Question

Connect with Certified Experts to gain insight and support on specific technology challenges including:

  • Troubleshooting
  • Research
  • Professional Opinions
Unlock the solution to this question.
Join our community and discover your potential

Experts Exchange is the only place where you can interact directly with leading experts in the technology field. Become a member today and access the collective knowledge of thousands of technology experts.

*This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

OR

Please enter a first name

Please enter a last name

8+ characters (letters, numbers, and a symbol)

By clicking, you agree to the Terms of Use and Privacy Policy.