www.webdeveloper.com
Results 1 to 2 of 2

Thread: table td padding right of below td affecting top td as well

  1. #1
    Join Date
    Mar 2007
    Posts
    4

    table td padding right of below td affecting top td as well

    <tr>
    <td colspan="2">
    <div class="parbase marqueeimage">
    <div style="width: 600px; height: 200px; ">
    <img src="http://www-qa.te.com:80/content/dam/te/global/english/email/adm/2014/singapore-airshow-evite-marquee-picture.jpg"/>
    </div>
    </div>
    </td>
    </tr>
    <tr>
    <td colspan="2" style="padding-right:15px; padding-left:15px; padding-bottom:20px;">
    <table border="0" cellspacing="0" cellpadding="0" width="570px">
    <tbody>
    <tr>
    <!-- style="font-family: 'Arial','sans-serif'; font-size: 12px; vertical-align:top; width: 50%;" -->
    <td style="padding-top: 20px; vertical-align:top;">
    <div class="parsys centerPar">
    <div class="text section">

    style="font-family: 'Arial','sans-serif'; font-size: 12px; color: #555555;">
    <p style="color: #555555;"> <p>Hello may be derived from hullo, which the American Merriam-Webster dictionary describes as a "chiefly British variant of hello,"[13] and which was originally used as an exclamation to call attention, an expression of surprise, or a greeting</p></p>
    </div>
    </div>
    </td>
    </tr>
    </tbody>
    </table>
    </td>
    </tr>


    the below td padding-right:15px is applying for image td as well, how to avoid the padding-rigth for image td?

  2. #2
    Join Date
    Mar 2014
    Posts
    19
    wow. do you really need so much inline css?

    can you better explain - i tweaked your code, so at least it would work, and i couldnt really get what the problem was.

    the text below the image has 15px padding on each side..? the img was okay..

    see what i looked at - didnt really check it thoroughly, but there were errors anyway.

    Code:
    <!DOCTYPE html>
    <html>
      <body>
        
        <table>
          <tr>
            
            <td colspan="2">
              
              <div class="parbase marqueeimage">
                
                <div style="width: 600px; height: 200px; ">
                  
                  <img src="http://www-qa.te.com:80/content/dam/te/global/english/email/adm/2014/singapore-airshow-evite-marquee-picture.jpg"/>
                  
                </div>
                
              </div>
              
            </td>
            
          </tr>
          
          <tr>
            
            <td colspan="2" style="padding-right:15px; padding-left:15px; padding-bottom:20px;background-color:red">
              
              <table border="0" cellspacing="0" cellpadding="0" width="570px">
                
                <tbody>
                  
                  <tr>
                    
                    <td style="padding-top: 20px; vertical-align:top;">
                      
                      <div class="parsys centerPar">
                        
                        <div class="text section">
                          
                          <p style="color: #555555;">
                            
                            <p>
                              Hello may be derived from hullo, which the American Merriam-Webster dictionary describes as a "chiefly British variant of hello,"[13] and which was originally used as an exclamation to call attention, an expression of surprise, or a greeting
                          </p>
                        </p>
                        
                      </div>
                      
                    </div>
                  
                </td>
              
            </tr>
          
        </tbody>
        
      </table>
      
    </td>
    
    </tr>
    </table>
    
    </body>
    </html>

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center



Recent Articles