Register

If this is your first visit, please click the Sign Up now button to begin the process of creating your account so you can begin posting on our forums! The Sign Up process will only take up about a minute of two of your time.

Results 1 to 6 of 6
  1. #1
    Junior Member
    Join Date
    May 2003
    Location
    michigan
    Posts
    29
    Member #
    1357
    So you're making a web page, but you can't seem to ditch the white space on the edges of your page. This tutorial is for you!


    • Open up your html document in notepad
    • Find where it says <body>
    • Inside of the <body> tag Enter the following attributes:

      Code:
      leftmargin="0" rightmargin="0" topmargin="0"
      bottommargin="0" marginheight="0" marginwidth="0"
    • Your body tag should now look something like this:

      Code:
      <body bgcolor="#EEEEEE" text="#003366" link="#003366" vlink="#003366" alink="#003399" 
      leftmargin="0" rightmargin="0" topmargin="0" 
      bottommargin="0" marginheight="0" marginwidth="0">

      If you are working with tables, you will need to set the width of the table to 100% . It is also a good idea to set cellpadding, and cellspacing to 0. Your table tag should look something like this:


      Code:
      <table width="100%" height="90%" border="0" cellpadding="0" cellspacing="0">

    Hope that helps!


    ub3r

  2.  

  3. #2
    Unpaid WDF Intern TheGAME1264's Avatar
    Join Date
    Dec 2002
    Location
    Not from USA
    Posts
    14,485
    Member #
    425
    Liked
    2783 times
    Actually, those tags aren't cross-platform compatible (read: Netscape doesn't get them at all). I will often combine these in conjunction with the margin properties of CSS to come up with something that will work in as many browsers as possible.

    Usually my CSS is something to the extent of
    BODY
    {
    margin: 0px;
    }

    Occasionally though, I'll define each margin element as 0 other than the bottom, which is 5.
    If I've helped you out in any way, please pay it forward. My wife and I are walking for Autism Speaks. Please donate, and thanks.

    If someone helped you out, be sure to "Like" their post and/or help them in kind. The "Like" link is on the bottom right of each post, beside the "Share" link.

    My stuff (well, some of it): My bowling alley site | Canadian Postal Code Info (beta)

  4. #3
    WDF Staff smoseley's Avatar
    Join Date
    Mar 2003
    Location
    Boston, MA
    Posts
    9,729
    Member #
    819
    Liked
    205 times
    Originally posted by TheGAME1264
    Actually, those tags aren't cross-platform compatible
    Internet Explorer supports:
    • topmargin
    • bottommargin
    • leftmargin
    • rightmargin

    Netscape supports:
    • marginwidth
    • marginheight

    In combination, those 6 properties will cover all browsers that I'm aware of.

  5. #4
    Unpaid WDF Intern TheGAME1264's Avatar
    Join Date
    Dec 2002
    Location
    Not from USA
    Posts
    14,485
    Member #
    425
    Liked
    2783 times
    I didn't know Netscape supported marginwidth and marginheight. I was always under the impression that it didn't.
    If I've helped you out in any way, please pay it forward. My wife and I are walking for Autism Speaks. Please donate, and thanks.

    If someone helped you out, be sure to "Like" their post and/or help them in kind. The "Like" link is on the bottom right of each post, beside the "Share" link.

    My stuff (well, some of it): My bowling alley site | Canadian Postal Code Info (beta)

  6. #5
    Junior Member
    Join Date
    Jun 2003
    Location
    Tennessee
    Posts
    9
    Member #
    1875
    A bit of old thread, but even so, CSS would seem to be a more adequate solution, seeing as it is more efficient; at least imo. I would prefer to use CSS over loading up the page with un-needed tags.

    I think the 1 CSS class .vs. the 6 body margin sets wins out .

  7. #6
    WDF Staff smoseley's Avatar
    Join Date
    Mar 2003
    Location
    Boston, MA
    Posts
    9,729
    Member #
    819
    Liked
    205 times
    SaintDog... it all depends on whether you want to be backwards compatible.

    For HTML 4.0, you HAVE to use CSS, though, because NONE of the margin properties are supported.


Remove Ads

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
All times are GMT -6. The time now is 11:09 AM.
Powered by vBulletin® Version 4.2.3
Copyright © 2019 vBulletin Solutions, Inc. All rights reserved.
vBulletin Skin By: PurevB.com