Re: Zero Margins on Block Elements?

by "David Meadows" <david(at)heroes.force9.co.uk>

 Date:  Sun, 7 Nov 1999 22:29:26 -0000
 To:  "HWG CSS Style List" <hwg-style(at)hwg.org>
 References:  rr
  todo: View Thread, Original
Don't set any margin at all in the body tag. If you don't set a body margin,
the body will take the browser's default margin.

Then, on your top and bottom tables, set the margin to zero. That would be
like this:

<TABLE style="margin-left: 0; margin-right:0">
 ... table goes here...
</TABLE>

This over-rides the browser's default for the table element (only) and sets
the table flush with the edge of the browser window.

--
David Meadows [ Technical Writer | Information Developer ]
DNRC Minister for Littorasy * david(at)heroes.force9.co.uk

"I must Create a System or be enslav'd by another Man's.
 I will not Reason and Compare: my business is to Create"
        -- William Blake



----- Original Message -----
From: Chris Montgomery <monty(at)astutia.com>
To: HWG CSS Style List <hwg-style(at)hwg.org>
Sent: 07 November 1999 21:54
Subject: Zero Margins on Block Elements?


> Howdy all,
>
> I have two tables, one at the top, the other at the bottom, of all pages
> on my site that I'd like to be flush with the browser window's edges
> (left and right).  However, I want all the rest of the page content in
> between these two top/bottom tables to have left/right margins (similar
> to the default browser margins widths).  I've accomplished this effect
> so far by setting the body margins to zero in the body tag and then
> putting all page content between the top/bottom tables into one table,
> centered, width 95%.  This provides a margin to all page content.  But
> I'd really like to get away from putting all the content into one big
> table.
>
> I'm wondering if it's possible to not set the margins to zero in the
> body tag, use the browser default margins, but still somehow set the
> margins for the top/bottom tables so that they are flush with the window
> edges?  Is this possible with a stylesheet?  Any ideas?
>
> TIA,
>
> Chris Montgomery
>  _____________________________________________________________________
> | astutia.com - Astute e-business applications & web site development |
> |http://www.astutia.com  monty(at)astutia.com  ICQ 7381282  BeeCall monty|
> | 210-490-3249/888-745-7603   Fax 210-490-4692    Mobile 210-823-1624 |
> |      Authorized Reseller for Allaire and NetObjects Software        |
> |_ Find a Job in the San Antonio Job Network http://www.sajobnet.com _|
>
>

HWG hwg-style mailing list archives, maintained by Webmasters @ IWA