[WEB4LIB] margins in Netscape

Samuel Mcdonald smcdon at rci.rutgers.edu
Fri Jan 21 09:12:37 EST 2000


Hi:

I started messing around the code from Andrew's page and from code scarps
that I had kicking around.  After messing around for a bit I realized the
rightmost white space was *EXACTLY* the same width as the scroll bar.
(one of those in-your-face observations).

Although this is not a truly elegant solution, one workaround is to put a
bunch of <br>'s in the page to ensure that the page is long enough to
scroll.  This will put in the scrollbar and it will look as if the bar
truly spans the page.  Alternatively instead of <br>'s etc. stretching a
transparent 1 pixel graphic long enough to ensure a scroll bar on even the
largest monitors ought to do the trick as well.

eg.
(<br clear="all">)(?)

<img src="transparent_1_pixel.gif" height="150" width="1">

Sometimes the low-tech solution satisfies Occam's razor best.

-Sam

------------------------------------------------------------------------
Samuel J. McDonald                                smcdon at rci.rutgers.edu
Webmaster                              http://www.libraries.rutgers.edu/
Rutgers University Libraries                        Voice (732) 932-7505
Alexander Library, 169 College Ave., New Brunswick, NJ 08901-1163  



On Thu, 20 Jan 2000, Andrew Mutch wrote:

> I know that Netscape and IE handle body margins differently.  So, if you don't
> want a page to have margins, you need to include the following:
> 
> <BODY topmargin=0 leftmargin=0 marginwidth=0 marginheight=0  BGCOLOR="#FFFFFF">
> 
> IE recognizes Top and Left but NN needs the others to eliminate the margins.
> However, for some reason, I can't get Netscape to properly display the page
> without the margins.  On the following page:
> 
> http://www.twp.waterford.mi.us/admin.htm
> 
> I want the colored bars to extend all the way to the right side of the page.  It
> displays properly in IE but with Communicator 4.7, there is a gap between the
> end of the table and the edge of the page. I know this isn't a problem with
> Communicator itself because I was able to display a number of pages [and not in
> frames] without any margins.  They also used the same code so I'm not sure where
> the problem is occuring.  I'm sure someone out there can show me where this is
> getting messed up.
> 
> Andrew Mutch
> Library Systems Technician
> Waterford Township Public Library
> Waterford, MI
> 
> 
> 
> 




More information about the Web4lib mailing list