Setting margins

T

TheKeith

I was wondering if it's a good idea to set the margins in my pages with
styles or to use the old non-standards-compliant marginwidth=0
marginheight=0 topmargin=0 leftmargin=0 body properties instead? It would be
nice to just set all of that stuff wit standard-compliant styles instead.
What do you think?
 
F

Fabian

TheKeith said:
I was wondering if it's a good idea to set the margins in my pages
with styles or to use the old non-standards-compliant marginwidth=0
marginheight=0 topmargin=0 leftmargin=0 body properties instead? It
would be nice to just set all of that stuff wit standard-compliant
styles instead. What do you think?

Better use styles.

body { margin: 0px; }

Or seperately: margin-left, margin-top, margin-right and margin-bottom.
 
P

picayunish

TheKeith wrote in news:eek:[email protected]:
I was wondering if it's a good idea to set the margins in my pages with
styles or to use the old non-standards-compliant marginwidth=0
marginheight=0 topmargin=0 leftmargin=0 body properties instead? It
would be nice to just set all of that stuff wit standard-compliant
styles instead. What do you think?

Margins and paddings in the style sheet is a very good idea.
Even the old browser versions understand it.
 
K

Kris

TheKeith said:
I was wondering if it's a good idea to set the margins in my pages with
styles or to use the old non-standards-compliant marginwidth=0
marginheight=0 topmargin=0 leftmargin=0 body properties instead? It would be
nice to just set all of that stuff wit standard-compliant styles instead.
What do you think?

marginwidth, marginheight

IE, the browser that these were made for, understands the CSS equivalent
perfectly.

topmargin, leftmargin

The browser these were made for, NN4, is on its way out and has a very
hard time understanding CSS at all. I cannot remember how long ago it is
that I decided to no longer care for an equal (graphical) user
experience for thos who use this piece of antique.

To do it in CSS:

html, body { margin: 0; padding: 0; }
 
T

Toby A Inkster

TheKeith said:
I was wondering if it's a good idea to set the margins in my pages with
styles or to use the old non-standards-compliant marginwidth=0
marginheight=0 topmargin=0 leftmargin=0 body properties instead?

It is best to do *anything* presentational with CSS.
 
S

Steve Pugh

TheKeith said:
I was wondering if it's a good idea to set the margins in my pages with
styles or to use the old non-standards-compliant marginwidth=0
marginheight=0 topmargin=0 leftmargin=0 body properties instead? It would be
nice to just set all of that stuff wit standard-compliant styles instead.
What do you think?

The various non-standard HTML attributes fall into three categories:

1. Totally useless
rightmargin and bottommargin are only supported by the browsers that
also support the CSS equivalents.

2. Very nearly totally useless
topmargin and leftmargin are supported by IE3 which had very poor CSS
support. But IE3 is so rarely encountered these days and I doubt that
page margins are the top problem met by anyone still using it.

3. Fairly useless
marginwidth and marginheight are supported by NN4 which has problems
with CSS page margins, indeed with much of CSS. NN4 is seen more often
than IE3 but the comments above also apply in the most part.

So unless you have _very_ good reason to aim for an identical
presentation in NN4 and/or IE3 then I wouldn't recommend these
attributes.

If you go the CSS route then be sure to specify both margin and
padding for body as different browsers have different defaults (e.g.
Opera has zero default margin but non-zero default padding, whilst IE
is the opposite).

Steve
 
E

EightNineThree

TheKeith said:
I was wondering if it's a good idea to set the margins in my pages with
styles or to use the old non-standards-compliant marginwidth=0
marginheight=0 topmargin=0 leftmargin=0 body properties instead? It would be
nice to just set all of that stuff wit standard-compliant styles instead.
What do you think?

I think you should set the margins by using transparent gifs.
Then, use the <blink> tag around all important text and make sure your
"contact" link is a spinning mailbox.


--
Karl Core

At times one remains faithful to a cause only because its opponents do not
cease to be insipid.
Friedrich Nietzsche

eightninethree AT eightninethree.com
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,582
Members
45,070
Latest member
BiogenixGummies

Latest Threads

Top