• Looking for a Top Flight Web Development Team?
  • Professional & Affordable Web Design Services
  • Shaping Imaginations using Cutting-Edge Technologies
  • Dynamic Solutions for Dynamic Businesses
  • Analysis.. then Solutions with a High Tech Flair
  • Satisfied Customers In Over 30 Countries
  • National Association of
    Accredited Internet Professionals
  • (+1) 718-710-4533
 
Custom Website Design Pricing
 
Eliminating Default Margins

Article by David Rutstein; Web Designer, Internet Marketing Expert and CEO, www.webdesignoffice.us

Since the inception of the very first HTML document, margins existed that surrounded the document, like in the case with this document. The margins are there to act as a cushion between the edges of the browser and the contents of the page, so it's easier to read this content. As good as margins are, wouldn't it be nice to be able to eliminate them in some cases, where the design of the page calls for their termination? While most developers think it's not possible to "flush out" the default margins of a HTML document, it actually is, although only possible in IE 3+, and NS 4+. In this tutorial, I'll show you how.

 

-Eliminating the document margin in IE 3+


To get rid of the document margin in IE 3 and above, so content presses right against the edges of the browser, use the IE exclusive "leftmargin" and "topmargin" attributes:

 

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

It's as simple as that!

 

-Eliminating the document margin in NS 4+


To get rid of the document margin in NS 4 and above, use the NS 4 exclusive "marginwidth" and "marginheight" attributes instead:

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

-Putting it all together

By putting the two techniques together, we can create a document that flushes out its' margins in both IE 3+ and NS 4+:

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

Try out the above declaration on your page, and you'll see what I mean.

Resources:

 

  • AAA Logo is a powerful logo maker design software. It allows you to create attractive logos in minutes, print them or put on your website or business card. You can start from one of build-in logo template or design your own using imported clipart or one of more then 2000 logo objects embedded in AAA Logo.


  • We provide innovative design solutions for web page, print & multimedia. We offer affordable graphic design, large format, logo design, printing, poster, email stationery and website design


  • - Professional website design and hosting in Houston, Texas. Designing websites since 1994.


  • 100's of web templates to choose from with many free web templates and webmaster tools.

  • Affordable website solutions from Hoover Web Design that include custom web design, website maintenance, web hosting , website design templates and many webmaster free webmaster tools.
 

Back
to Top