Layout: Align to very top corner in css?

started by Xianx on Oct 28, 2004 — RSS Feed

Xianx Xianx
Posts: 1

I was working on a banner/header for a page and i was kinda disappointed that it wouldn't align to the very top corner instead it seemed to have 10 px padding on the top and left side but i tryed to make those 0px each and it didnt work what will make this work? Im very new to CSS...

Kk5st Kk5st
Posts: 15

In your stylesheet, do this:
html, body {
   padding: 0;
   margin: 0;
   }
Depending on the browser, the html or body will have an intrinsic margin or paddiing.  This will zero everything out and give you a defined starting place.

cheers,

gary

Andre Street Andre Street
Posts: 1

I tried this for my page but it didn't work. I have a number of include files for my banners and other things. Could this be part of the problem. my home page has the same basic format without the use of include files and its fine.

Andre Street http://www.streetgalleries.com

Shean Hoxie Shean Hoxie
Posts: 2

Your site has an empty table sitting on the top div, remove the table and it should align to the top without any spacing

Shean Hoxie Hoxie Web Design http://www.thehox.com

Obama Usa Obama Usa
Posts: 1

Thanks everyone for your support, you're the best!!

[url=http://pret-auto.org][color=][u]pret auto[/u][/color][/url]

Krystine Tawnie Krystine Tawnie
Posts: 28

The rounded corners techniques are evolving day by day. Hope all browsers support CSS3 fully, and render all the pages consistently! It’s such a pain to ensure the same page looks the same in all browsers. Can’t they make life easier for us?



Search engine marketing company in India

You must login to reply