SitePoint Sponsor

User Tag List

Results 1 to 2 of 2
  1. #1
    SitePoint Member AKR44's Avatar
    Join Date
    Jun 2003
    Location
    Alaska
    Posts
    16
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    tables in dreamweaver mx

    so i've created these tables, and i didn't notice until i had a background image, but the tables don't go all the way to the edges of the page when i preview it in IE. i made them borderless, but they still don't go all the way to the top or sides of the page (width is set at 100%). how can i fix this? thanks in advance for any help. -Reuben

  2. #2
    Team SitePoint AlexW's Avatar
    Join Date
    Apr 2000
    Location
    Melbourne
    Posts
    832
    Mentioned
    4 Post(s)
    Tagged
    0 Thread(s)
    There are default margins set in browsers (varies from browser to browser but it's usually 8-10pxs) that need to be overridden if you want to go all the way to the window edge.

    The traditional way of doing this was to add margin settings to your <body> tag , something like ;

    <body leftmargin="0" topmargin="0" marginwidth="0" marginheight="0">

    Seems like a lot of code for something simple, but Netscape and IE used handle to it differently so you needed to code for both.

    The only problem with doing things that way is it's not standards compliant. I remember someone referring to those tags as 'the four horsemen of non-compliance'.

    The nicer way to do it is to apply a style to your body tag, either in the head of the document, or preferably in a separately linked CSS doc if your doning the same on multiple pages.

    Something like:
    body {
    padding:0px
    margin:0px
    }
    (margin works for most browsers, Opera treats it as padding, which actually makes more sense to me)

    This method gives you a cleaner document keeping formatting stuff separate from your information stuff.
    Alex Walker
    SitePoint Developer
    SitePoint - Learnable


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
  •