Today's Posts Follow Us On Twitter! TFL Members on Twitter  
Forum search: Advanced Search  
Navigation
Marketplace
  Members Login:
Lost password?
  Forum Statistics:
Forum Members: 24,254
Total Threads: 80,792
Total Posts: 566,472
There are 1644 users currently browsing (tf).
 
  Our Partners:
 
  TalkFreelance     Design and Development     HTML/XHTML/DHTML/CSS :

Faux Table > Td padding problem

Thread title: Faux Table > Td padding problem
Reply    
    Thread tools Search this thread Display Modes  
09-13-2011, 05:57 AM
#1
pxs is offline pxs
Status: Junior Member
Join date: Jan 2006
Location:
Expertise:
Software:
 
Posts: 54
iTrader: 0 / 0%
 

pxs is on a distinguished road

  Old  Faux Table > Td padding problem

Im getting a padding-top effect (padding set to 0) for a TD element when viewed in firefox but not when in IE ??

Is this a bug in firefox ??

HTML Code:
<table width="600" border="0" cellspacing="0" cellpadding="0"  style="border: 1px solid #ccc; border-top: none; border-bottom: none;">
          <tr>
            <td width="389" align="left" valign="top" style="padding-left: 10px; padding-right: 10px;font-family:Arial; font-size: 12px;"><p>Dear Mr spaz</p>
              <h2 style="font-size: 31px; color: #003399;">Thank you for your application</h2>
              <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Donec sagittis arcu id felis facilisis id aliquet nunc molestie. </p>
              <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Donec sagittis arcu id felis facilisis id aliquet nunc molestie.  </p>
              <h3 style="font-size: 12px; color: #003399;">Donec sagittis arcu id felis facilisis</h3>
           
           </td>
            <td valign="top" ><a href="#"><img src="images/image.jpg" width="210" height="407" alt="image" /></a></td>
          </tr>
        </table>

09-13-2011, 06:23 AM
#2
Hqtitan is offline Hqtitan
Status: I'm new around here
Join date: Jul 2011
Location:
Expertise:
Software:
 
Posts: 6
iTrader: 0 / 0%
 

Hqtitan is on a distinguished road

  Old

Could be the <tr>, as well. Check the top margin, too.

Reply With Quote
09-13-2011, 07:52 AM
#3
.Nick is offline .Nick
.Nick's Avatar
Status: Request a custom title
Join date: Feb 2005
Location:
Expertise:
Software:
 
Posts: 1,159
iTrader: 3 / 100%
 

.Nick is on a distinguished road

  Old

Without a CSS reset any number of browser-specific styles could be causing it. Here you suggest the issue is with Firefox but on Stack Overflow you say the issue is in IE6.

In Chromium the spacing is the result of built-in styles for paragraph tags:
http://i54.tinypic.com/2eb7amb.png

Reply With Quote
09-13-2011, 12:02 PM
#4
georgi is offline georgi
Status: I'm new around here
Join date: Aug 2011
Location:
Expertise:
Software:
 
Posts: 9
iTrader: 0 / 0%
 

georgi is on a distinguished road

  Old

I strongly recommend you to take a time and to replace every table tags in your code with div tag and css. Those way you will avoid such problems and also div tag is better accepted by google.

best regards,
Georgi

Reply With Quote
09-13-2011, 07:50 PM
#5
Village Genius is offline Village Genius
Village Genius's Avatar
Status: Geek
Join date: Apr 2006
Location: Denver, CO
Expertise: Software
Software: Chrome, Notepad++
 
Posts: 6,894
iTrader: 18 / 100%
 

Village Genius will become famous soon enough

  Old

This isn't tabular data, don't use tables. Tables are not meant to be used for the structure of a page.

Reply With Quote
09-14-2011, 02:11 AM
#6
ronaldroe is offline ronaldroe
Status: I'm new around here
Join date: Aug 2011
Location: Oklahoma City
Expertise: Design, HTML/CSS
Software: Webmatrix, Photoshop
 
Posts: 9
iTrader: 0 / 0%
 

ronaldroe is on a distinguished road

  Old

I won't beat the "don't use tables" horse any more than it has been here (though it is entirely correct). Generally, the problem you run into with tables and spacing is that there's an extra row or other table element there occupying the space. If that isn't the case, it's generally a margin or padding setting on some element within the table pushing things around.

Reply    


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 

  Posting Rules  
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump:
 
  Contains New Posts Forum Contains New Posts   Contains No New Posts Forum Contains No New Posts   A Closed Forum Forum is Closed