armasmike
asked on
Html code easy help
here is my code really easy stuff.
very easy know i have two screen shot one is in IE 9 but it happens in 8 and 10 and other in Firefox 24 and it looks fine.
the Black line is coming from here bgcolor="#000000" in the code i put it there so it sticks out.
there is spacing between the two tables i don't want there to be any.
How can i fix this ?
firefox.JPG
ie8.JPG
<html><head>
</head>
<BODY >
<TABLE cellpadding="0" cellspacing="0" border="0" bgcolor="#000000"><tr><td><img src="_userimg-Header-Image.jpg">
</td></tr></table>
<TABLE cellpadding="0" cellspacing="0" border="0" background="_userimg-menu-background.gif" ><tr><td >The Menu</td></tr></table>
</BODY>
</HTML>
very easy know i have two screen shot one is in IE 9 but it happens in 8 and 10 and other in Firefox 24 and it looks fine.
the Black line is coming from here bgcolor="#000000" in the code i put it there so it sticks out.
there is spacing between the two tables i don't want there to be any.
How can i fix this ?
firefox.JPG
ie8.JPG
Try this
<TABLE cellpadding="0" cellspacing="0" border="0" ><tr><td><img src="_userimg-Header-Image.jpg" border="0">
</td></tr></table>
<TABLE cellpadding="0" cellspacing="0" border="0" background="_userimg-menu-background.gif" border="0" ><tr><td >The Menu</td></tr></table>
ASKER
both of that didn't work.
Padas taking out the bgcolor="#000000" you still have the spacing.
Padas taking out the bgcolor="#000000" you still have the spacing.
I tested this and there was no space. However, I'm running IE 10.
Just to rule out margins for the table, tr and td, try this:
Just to rule out margins for the table, tr and td, try this:
<html>
<head></head>
<style> table, tr, td { border-collapse: collapse; margin: 0; padding: 0; } </style>
<BODY>
<TABLE cellpadding="0" cellspacing="0" border="0" bgcolor="#000000">
<tr><td><img src="_userimg-Header-Image.jpg"></td></tr>
</table>
<TABLE cellpadding="0" cellspacing="0" border="0" background="_userimg-menu-background.gif">
<tr><td >The Menu</td></tr>
</table>
</BODY>
</HTML>
Threw in a border-collapse and empty padding, just in case.
If dsacker solution does not work, please post the link to your page.
ASKER
no that didn't work in IE 8,9, or 10 here is the site url
http://ultra.armaswebdesign.com/
it works great in firefox
http://ultra.armaswebdesign.com/
it works great in firefox
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Your right i didn't ask a very good question.
Not a problem. Your award and response is of the highest respect. Either find the offending style or simply add a class of your own and use that. It will take a little work, but that should get you there.
This is why you should always post your link. What you just did is unfortunately very common. By posting just the "simple" code you *think* is the issue forces us to spend time unnecessarily. If you view the source of your page, the actual code is nothing like your "simple" example.
Just use this as a learning experience for next time and post the entire code or link and we can help you much quicker.
Now, if I take away the class, header-image, the line goes away.
HOWEVER! your code is a mess. And that will cause issues.
Start here http://www.w3schools.com/html/default.asp or here http://www.codecademy.com/tracks/web and get the basics down.
The problems I see
1) No doctype
2) Duplicated content
3) Style tag outside of Head tag
4) Script tags should either be in the Head section or just above the closing Body tag
5) You have 2 Body tags and there should only be 1
6) Please check the validator http://validator.w3.org
Please take all of this constructively. Just take care of the errors, learn the basics and the rest will be easy.
Good luck on your project.
Just use this as a learning experience for next time and post the entire code or link and we can help you much quicker.
Now, if I take away the class, header-image, the line goes away.
HOWEVER! your code is a mess. And that will cause issues.
Start here http://www.w3schools.com/html/default.asp or here http://www.codecademy.com/tracks/web and get the basics down.
The problems I see
1) No doctype
2) Duplicated content
3) Style tag outside of Head tag
4) Script tags should either be in the Head section or just above the closing Body tag
5) You have 2 Body tags and there should only be 1
6) Please check the validator http://validator.w3.org
Please take all of this constructively. Just take care of the errors, learn the basics and the rest will be easy.
Good luck on your project.
When I tried to go to http://ultra.armaswebdesign.com/ , my anti-virus blocked it as a malicious web site.
<style>table { margin: 0;} </style>