NCS Logo - Click for home page Northstar Developer Center
Platforms
All Platforms
.NET Framework (1.x - 4.x)
Active Server Pages
ASP.NET
C#
SQL Server
VB.NET
Visual Basic

Keywords
.NET Data Types
.NET E-mail
.NET Events
.NET Functions
.NET Object Programming
.NET System.Configuration
.NET System.Diagnostics
.NET System.IO
.NET System.Net
.NET System.Net.Sockets
Active Data Objects
ASP Architecture
ASP Black Belt
ASP Built-in Functions
ASP Built-in Objects
ASP Debugging
ASP Performance
ASP Security
ASP Syntax
ASP.NET Authentication
ASP.NET Controls
ASP.NET Data Access
ASP.NET Features
ASP.NET Master Pages
ASP.NET Page Events
ASP.NET Security
ASP.NET ViewState
Atom
Certifications
COM, DCOM, COM+
Data Access
E-Mail
Errors
Exporting Data
HTML Tips
IIS
Object-Oriented Programming
RSS
SQL
Uncategorized ASP Tips
VB API Programming
VB Forms
VB Syntax
XML

Book Support
Visual Basic 6 Bible
ASP Bible
ASP Weekend Crash Course
ASP.NET At Work
Creating Web Services

Eliminating the Top and Left Margins

Written by Eric Smith, Northstar Computer Systems LLC

By setting the leftmargin and topmargin properties of the BODY tag, you can change how much space is left on the top and left of the page. If you add the parameters like this:
<body leftmargin=0 topmargin=0>
That will eliminate the margins entirely. If you visit http://www.northcomp.com, you can see this in action if you view the page with IE 5.0. The stripe is a background image, but you will see that the text is all forced to the left edge of the page.

If you’re using Netscape, you have to use different parameters for this to work. In Netscape, you can create this tag for the same effect:

<body marginheight=0 marginwidth=0>
If you’re writing for both browsers, you can use this version of the tag, as well:
<body leftmargin=0 topmargin=0 marginheight=0 marginwidth=0>

Keywords: [ Uncategorized ASP Tips ]

Publication Date: 7/1/2000