[thelist] Table alignment

David Altherr einstein314 at hotmail.com
Wed Aug 29 15:03:55 CDT 2001


Actually there is a fifth margin tag that you can include in the body tag:
the 'rightmargin' attribute which is the intuitive counterpart for the
'leftmargin' attribute.  In fact it would appear that the need for the
redundant attributes is an IE vs. Netscapse issue, or so an HTML validator
tells me; see returned compatibility info below:

MARGINHEIGHT: Netscape 4
MARGINWIDTH: Netscape 4
TOPMARGIN: IE 3,4,5
LEFTMARGIN: IE 3,4,5
RIGHTMARGIN: IE 4,5

Again, I have not personally tested all of these; results returned by
www.netmechanic.com:

http://results.netmechanic.com/aps5/compat.cgi?f=240/1552/23-16990&p=1&vi=0&
s=NetMechanic&fv=5&lr=5&ld=6.57

 However, when developing a full width site, I noticed erratic behavior when
viewing the page via IE 5 if I did not include the 'rightmargin' tag: the
right margin would return to the default margin width when navigating via
links on the page, but not when manually typing the URIs into the Address
bar. (???)

-David Altherr
www.davidaltherr.net



> Hi Tim.  You need to set your margin height to "0" - as there is a natural
> margin on the top and left sides of every browser. Here is an example of
> code (it resides in the "body" tag):
>
> <body marginwidth=0 leftmargin=0 marginheight=0 topmargin=0>
>
> this also removes the left margin.  The code "leftmargin" and "topmargin"
> are for older versions of Explorer that do not recognize
marginwidth/height.
>
> That should solve your problem.
>
>
> --
> Eric Langlitz


> > Hello Evolters.  I am having a hard time getting a table to align with
the
> > top of my page. This has been driving me nuts as this should not be a
> > problem. I know there must be something simple that I am overlooking,
but,
> > at the moment I am too blind to see it. The code for the top of the page
is
> > </head>
> > <body bgcolor="lightblue">
> >  <table bgcolor="white" border="0" cellpadding="0" cellspacing="0"
> > width="765">
> >   <tr>
> > It is that simple. Why does it sit 12px or so down from the top of the
page?
> > Thanks to all that help me stop banging my head!
> >
> > Tim Kuhn





More information about the thelist mailing list