browser margin control query

Do you have a question? Post it now! No Registration Necessary.  Now with pictures!

Threaded View
Is there a 'correct' method for fixing page contents to top 0px left 0px??

(supplementary q) if one is targeting "young" "hip" "now" kinda traffic is
it unreasonable to just ignore those with (relatively) primitive browsers

(that's the the questions up front for brucie :p -- the rest is just
explanatory flim flam

I know of two ways to control the "gutters"

 [#1] :- (I've not tried this myself - dunno if it is even valid??)

<body topmargin="0" leftmargin =" 0" >

[#2] :- (Method I use when I don't want to see the default browser
margins/gutters - I know this is gnored by primitive browsers -- so I guess
that explains the supplementary question!)
<div id="maincontent" style="position: absolute; left: 0px; top: 0px;
z-index: 1;">

blah  tables images and other divs blah


(NB I also tried super glue but Sony told me that I'd voided my monitor's
warranty ...)

Re: browser margin control query

Quoted text here. Click to load it

CSS. Set the margins and padding of the body to zero.

Quoted text here. Click to load it

Would any of these "young" "hip" "now" kinda people be at university,
and thus may be stuck using whatever old garbage is available?
Would any of them be browsing on mobile devices?
Would any of them be spending all their money on "young" "hip" "now"
kinda things rather than geeky computer stuff?

Quoted text here. Click to load it

Invalid, only supported by IE.
The equivalent margnwidth="0" marginheight="0" is supported by
Netscape and Opera, and is equally invalid.

Also needs to be added to every HTML page, creating clutter and adding
to bandwidth -
<body topmargin="0" leftmargin="0" rightmargin="0" bottommargin="0"
margnwidth="0" marginheight="0">
compared to just
<body> and a one off CSS rule.

Quoted text here. Click to load it

Well, I suppose that on the plus side it will work in Netscape 4.

I'd go for the far simpler
body {margin: 0; padding: 0;}

Which won't work in NN4, but which will work in pretty much everything


"My theories appal you, my heresies outrage you,
 I never answer letters and you don't like my tie."  - The Doctor

Re: browser margin control query

"Steve Pugh" wrote in message
Quoted text here. Click to load it
Quoted text here. Click to load it

Hey thanks Steve ... I like it and I'll make the change to my css's and then
remove the <div> from the templates that use it and meanwhile all existing
pages can be left as they are ... css rocks!

I never liked NN4 anyway ...

Re: browser margin control query

Abby Hart wrote:
Quoted text here. Click to load it

That will look pretty bad in a maximized browser window with text right
up against the edge of the screen, but use CSS like this if you know
what you're doing:

body {
    margin : 0;
    padding : 0;

Quoted text here. Click to load it

No. Most of my "young", "hip", "loserish" friends have modern browsers
at home, but will often have to use Netscape 4 or worse at school. It
should be fine for your site to not look as good but still be usable in
older browsers, though.

Site Timeline