Reply to Re: newbie: ? valign top how ?

Your name:

Reply:


Posted by Chris Vancouver on 01/02/06 10:56

Darren & Linda Ingall wrote:
> I have seen on lots of sites with a menu on top of page.
> Home LINK LINK LINK etc...in a cell with a background
> putting a cell in with a background is simple.
> how can you align it with the absolute top of the page everything I try
> leaves a 5 - 10 pixel gap at the top
> an example would be great.
>
> thanks darren
>
>

I had the same question about a month ago and figured it out by using
examples from other people's websites. Here's what I did:

<!-- Eliminate the left and top margin in the body -->
<BODY topmargin=0 leftmargin=0>
<!-- Create a table that has no margin and no padding -->
<TABLE style="position:relative; left:0; top:0; z-index:0;" border=0
cellspacing=0 cellpadding=0>

You can avoid using tables by using div combinations like this:

<div style="position:relative; left:0 top:0; z-index:0;">
<div style="position:absolute; left:x top:y; z-index:1;">
[stuff you want to place exactly in x,y position]
</div>
</div>

The first div tag establishes a box within the body inside which the
second div tag is used to place stuff exactly where you want it. Do a
Google search on "style position css" and you'll get all kinds of good
info. You can also check out the source from my website below for
examples of what I did.

Happy New Year!

--
Chris Vancouver

Increase hits to your website and earn e-gold - place
your ad image in the Dynamic Masterpiece today!

http://www.dynamicmasterpiece.com

[Back to original message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация