I'm using W3C MarkUp Validation Service http://validator.w3.org/ to check my code and I'm coming up with some errors that I can't figure out.
Here's the page that I'm checking: http://www.expresiv.com/2004/company/index.asp
If you validate it, you'll notice that it'll have errors claiming
Line 10, column 34: there is no attribute "MARGINHEIGHT" (explain...).
<BODY class="mainBG" marginheight="0" marginwidth="0" topmargin="0" leftmargin="
There are other errors similar to this listed. Does anyone know how to fix it? I've done everything..... I've tried everything.....
Anyone have any ideas? Thanks ahead of time!
W3C MarkUp Validation Service
Hi skillet,
Remove the attributes pointed out by the validator and replace them with CSS.
<style type="text/css"> body{margin:0;} </style>
W3C MarkUp Validation Service
Tony's answer sets the margin around the body as 0 (zero) for all four sides.
You can also have this which allows you to change margins individually
body{
margin-top: 0px;
margin-right: 0px;
margin-bottom: 0px;
margin-left: 0px;
}
or
body{
margin: 0px 0px 0px 0px
} (relates from top to left clockwise)
Day
W3C MarkUp Validation Service
Thanks... I managed to get it.
I've having a trouble setting the padding of my table cells now. I have this code:<TABLE width="100%" height="65%" border="0" cellpadding="4" cellspacing="0">
I need to convert it to CSS.... Do I use margins or padding, or what? The border gets messed up too, along with the cellspacing. Nothing I do seem to work.
You mind giving an example?
Thanks![/code]
W3C MarkUp Validation Service
Assuming the table is given the class name "myTable" (how original!), give this a try:
table.myTable { width:100%; height:65%; border:0; border-collapse:collapse; } table.myTable td { padding:4px; }
There is a table css property called border-spacing, but it's unsupported by IE. However, border-collapse:collapse gives the same effect as border-spacing:0, so that shouldn't be a problem.
Let us all know how the validation goes...
W3C MarkUp Validation Service
I would think this would work:
table { width: 100%; height: 65%; } td { padding: 4px; border-width:0; } <table cellspacing="0">
W3C MarkUp Validation Service
I learnt how to style tables from Eric Meyer on CSS where he says to leave cellspacing in the mark-up (for IE). On further reseach border-colapse:collapse is definitely the way to go.
What does that guy know anyway.