Solved

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

Posted on 2014-04-24
3
5 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
ID: 40020992
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
ID: 40021621
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
ID: 41664117
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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
which object should i use (efficiency) 5 45
Connecting database in Xamarin? 6 48
Please explain "Multi-Tenant Services" 5 60
Need a starter for ETL protocol? 4 32
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 …
Real-time is more about the business, not the technology. In day-to-day life, to make real-time decisions like buying or investing, business needs the latest information(e.g. Gold Rate/Stock Rate). Unlike traditional days, you need not wait for a fe…
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …

932 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

10 Experts available now in Live!

Get 1:1 Help Now