SitePoint Sponsor

User Tag List

Results 1 to 4 of 4
  1. #1
    SitePoint Addict dreado's Avatar
    Join Date
    Jan 2005
    Location
    UK
    Posts
    221
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default Table margin/padding

    I need to embed an external page into a page I am making (I'm loading it in with ajax), the external page was designed for email and uses a table. This page looks fine in its own page, but when I include it in my new page it gets messed up because I have set all margins and padding to 0 (I think).
    Does anyone know what properties I should give the table to recreate the 'default' settings it is currently relying on?

  2. #2
    SitePoint Wizard bronze trophy Tyssen's Avatar
    Join Date
    Oct 2005
    Location
    Brisbane, QLD
    Posts
    4,067
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Would probably need to see the two versions of the table (or their code) to give a more accurate answer.

  3. #3
    SitePoint Addict dreado's Avatar
    Join Date
    Jan 2005
    Location
    UK
    Posts
    221
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Nevermind, I'll just replace
    Code:
    * {
    	margin: 0px;
    	padding: 0px;
    }
    with
    Code:
    body, h1, h2, h3, h4, h5, h6, p, ul, ol, li {
        margin: 0;
        padding: 0;
    }
    I was just curious to know what the default padding settings are for tables (I don't know too much about tables).

  4. #4
    SitePoint Wizard bronze trophy DaveWoods's Avatar
    Join Date
    Dec 2004
    Location
    Derbyshire - UK
    Posts
    2,651
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Couldn't you have done something like

    Code:
    td, th {
        padding: 3px;
    }
    and then just tinkered with that accordingly until you achieved the right amount of padding that you're after?


Bookmarks

Posting Permissions

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