Forum Moderators: open

Message Too Old, No Replies

Is there a protected area at top of browser screen?

         

Mark Barrett

9:59 pm on Jun 17, 2005 (gmt 0)

10+ Year Member



I am trying to align a table exactly to the top of the browser screen.

But in IE/NN/Firefox, it's as if there are a few protected pixels that the table cannot enter - so I get a thin row of the background colour above my table. It doesn't make sense but I can't see a way around it!

I'm wondering if CSS, instead of a table for positioning, might be the only answer but at the moment that is only something I know about, not how to do.

I would appreciate any help or guidance.

Thank you

Mark Barrett

jatar_k

10:01 pm on Jun 17, 2005 (gmt 0)

WebmasterWorld Administrator 10+ Year Member



I am a css idiot but I believe this type of thing might help

body {
margin: 0px;
padding: 0px;
}

Mark Barrett

10:40 pm on Jun 17, 2005 (gmt 0)

10+ Year Member



Jatar

Definitely not an idiot - you solved my problem. Thank you for that!

It never occured to me before that there was a default padding set on all the browser windows. But as you showed you can use CSS to turn it off.

I have never had any formal training so things like this I just have to pick up by trial and error.

(It seems it requires padding and margin set to "0" to cover all browsers.)

Thanks again - I will feel very satisfied now when I see that table nestling against the top of the screen.

Mark

jatar_k

10:43 pm on Jun 17, 2005 (gmt 0)

WebmasterWorld Administrator 10+ Year Member



your welcome

>> I have never had any formal training

me either, i just read a lot and break a bunch of stuff then it eventually starts working ;)

Span

10:59 pm on Jun 17, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Just a note. When the value equals zero there's no need for units.

body {
margin:0;
padding:0;
}

jatar_k

11:11 pm on Jun 17, 2005 (gmt 0)

WebmasterWorld Administrator 10+ Year Member



thanks Span

tedster

12:42 am on Jun 18, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Span's useful note comes to us from the Bandwidth Preservation Society - even in these days of widely available broadband it still pays to build in all the efficiency you can find. The packets you save may catch you a customer.