Solved

Can't get rid of 1 pixel spacing above and below embedded table using style tags

Posted on 2014-04-24
3
4 Views
Last Modified: 2016-06-21
If you put the code in an asp.net page you will see that there is a pink, 1 pixel space above and below the embedded table.

                <table style="width:100%; padding:0px; border-spacing:0px; border-collapse:separate;">
                    <tr style="background-color: #d75f07; height: 10px; color: white; text-align: center">
                        <td>

                            <asp:Label ID="lblGeneralAnnouncementHeader0" runat="server" style="font-size: medium" /> &nbsp;<asp:Label ID="lblGeneralAnnouncement0" runat="server" style="font-size: small" />

                        </td>
                    </tr>
                    <tr style="background-color: pink; color: white; text-align: center">
                        <td align="center">
                            <table style="width:1170px; height:105px; padding:0px; border-spacing:0px; border-collapse:collapse; background-color: purple">
                                <tr>
                                    <td>

                                    </td>
                                </tr>
                            </table>
                        </td>
                    </tr>
                    <tr style="background-color: #d75f07; height: 10px; color: white; text-align: center">
                        <td>

                        </td>
                    </tr>
                </table>   

Open in new window

0
Comment
Question by:tatton777
3 Comments
 
LVL 15

Expert Comment

by:Ess Kay
Comment Utility
in TD tag (line 10), add

padding-top: 0px;

same for all other sides

td {
  padding-top:0px;
  padding-bottom:0px;
  padding-right:0px;  
}
0
 
LVL 26

Accepted Solution

by:
Alan Warren earned 500 total points
Comment Utility
Hi tatton777
This fixed it on my machine:
<head runat="server">
    <title></title>
  <style type="text/css">
    table { 
      border-spacing: 0;
      border-collapse: collapse;
    }
    td{padding: 0px;}

  </style>
</head>

Open in new window

Respectfully yours,
Alan
0
 
LVL 5

Expert Comment

by:knowlton
Comment Utility
No comment has been added to this question in more than 21 days, so it is now classified as abandoned.

I have recommended this question be closed as follows:

Accept: Alan Warren (https:#a40021621)

If you feel this question should be closed differently, post an objection and the moderators will review all objections and close it as they feel fit. If no one objects, this question will be closed automatically the way described above.

knowlton
Experts-Exchange Cleanup Volunteer
0

Featured Post

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

Just a quick little trick I learned recently.  Now that I'm using jQuery with abandon in my asp.net applications, I have grown tired of the following syntax:      (CODE) I suppose it just offends my sense of decency to put inline VBScript on a…
Today is the age of broadband.  More and more people are going this route determined to experience the web and it’s multitude of services as quickly and painlessly as possible. Coupled with the move to broadband, people are experiencing the web via …
Here's a very brief overview of the methods PRTG Network Monitor (https://www.paessler.com/prtg) offers for monitoring bandwidth, to help you decide which methods you´d like to investigate in more detail.  The methods are covered in more detail in o…
This tutorial demonstrates a quick way of adding group price to multiple Magento products.

763 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

8 Experts available now in Live!

Get 1:1 Help Now