473,387 Members | 1,611 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

Margins in the body tag

Hi,

I've been using the BODY tag with leftmargin="0" topmargin="0" etc etc.

W3c validator tells me this is not right....

What is the correct way to push the content right to the top left?

Any suggestions gratefully received!

-Alec
Jul 20 '05 #1
2 6300
Peter Wranger wrote:
Hi,

I've been using the BODY tag with leftmargin="0" topmargin="0" etc etc.

W3c validator tells me this is not right....

What is the correct way to push the content right to the top left?


With CSS.

body { margin: 0; }

--
Mark.
Jul 20 '05 #2
On Wed, 19 May 2004 11:15:58 +0100, Mark Tranchant
<ma**@tranchant.plus.com> wrote:
Peter Wranger wrote:
Hi,
I've been using the BODY tag with leftmargin="0" topmargin="0" etc etc.
W3c validator tells me this is not right....
What is the correct way to push the content right to the top left?


With CSS.

body { margin: 0; }


Nope, it is:

body { margin: 0; padding: 0;}

This will work in IE4+, Opera 3.5+, Netscape 6.0+, all Mozilla/Firefox,
all Safari etc.

--
Rijk van Geijtenbeek

The Web is a procrastination apparatus:
It can absorb as much time as is required to ensure that you
won't get any real work done. - J.Nielsen
Jul 20 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

9
by: Frances Del Rio | last post by:
when I test my stuff with the validator in HomeSite it tells me the body tag no longer reads margin attributes.. does this mean now margins are to be specified only in CSS? I work for an...
0
by: Spartanicus | last post by:
I've been caught out by what I thought was an Opera 7.5p1 issue: http://www.spartanicus.utvinternet.ie/test/opera7.5p1_css_background_image_issue.htm but as was pointed out to me this is actually...
7
by: Richard Lawrence | last post by:
Hi, Consider the following: #Content { margin:0px 210px 50px 200px; padding:10px; } If I use it with the following HTML:
8
by: Jukka K. Korpela | last post by:
I just noticed that most browsers render <table border="1"><tr><td><p>foo</p></td></tr></table> the same way as <table border="1"><tr><td>foo</td></tr></table> That is, they ignore the p...
12
by: Secret Guy | last post by:
I'm trying to understand generally how to make a grid of variously sized boxes using CSS. The first idea I had was to make a box where I can see the margin, padding, border and content edges, and...
7
by: Kyle James Matthews | last post by:
Hello all, Please have a look at http://www.digitalovertone.com/v3/example.htm. Netscape, Mozilla, and Firefox all insert an upper margin on 1 em on the content on the left, and an upper margin...
1
by: drdeadpan | last post by:
Hi, I've been reading about IE having issues rendering the correct margins in FLoated elements. Basically, my code renders fine in FF but not in IE. Look at this link in FF and IE to see what...
11
by: listerofsmeg01 | last post by:
Argh! I'm going nuts trying to get a constant margin after a floated div that works cross browser. This works in IE but not Firefox: <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en"...
6
by: Paul Wake | last post by:
Do paragraph bottom margins overrule body margins? (To explain what I mean, http://www.xmission.com/~wake/computerrules.html has 5% margins, including the bottom margin, in IE, but not in Firefox....
4
by: =?Utf-8?B?SGVyYg==?= | last post by:
Using the WebForms.ReportViewer when I export to PDF, the margins of the report are too large. How can I change the margins of my report to make better use of the printed page space?
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.