Hi, I'm in the very very early stages of a website and just playing with a layout I like. I am doing this all in HTML since it will be a simple static site design to well, of course, make me some dough. The site is: http://www.how-to-travel-the-world.com/ my question is why is there a border around the site? I changed all the cellspacing and padding to be 0.... thoughts? note: i know the colors and such are bad but its just to give me spacing and placements ideas. ya know, seeing how things look...
Hi see you have minimal CSS. Perhaps you aren't familiar with it. If you are going to make sites, CSS is your best friend. In any case, if you want to get rid of the border without CSS you can put topmargin="0" bottommargin="0" leftmargin="0" rightmargin="0" in your body tag.
This won't work in firefox I believe, throw that code in a style sheet or in the head -> <style> *code* </style>
No, that topmargin=0 junk doesn't ever go in the <head>, it goes on the body. However, that's only if someone insists on doing it the old and deprecated and no-longer-valid way (which Xira said). It never was meant for stylesheets, as it's not CSS. It's Old School HTML, like the <font> tag. * { margin: 0; } is very nice to have, esp since then all browsers look the same, but know that it's a universal reset resetting EVERY element on the page to 0. Without it, you'll see default browser styles. body { margin: 0; } only zeros the margins on the body and no-one else. The "border" on the page, if it's a space, is the default padding of the body in whatever browser is showing this. You can also do body { margin: 0; padding: 0; } If you have no forms on the page, this is better: * { margin: 0; padding: 0; } zeroing padding on form controls is not a good idea, but great for the rest of the page, especially if you have lists.
if you are talking about the Grey border, then its appearing as you have placed this code in one of your td bgcolor="#C0C0C0" if you are talking about white bg border. then other guys are correct. you need to set body margins to 0. thanks
It's because your main table is 100% width but you are only using 85% in 2 columns. The other 15% has a background color of #C0C0C0. Simply change bgcolor=#ffffff or just remove the background color completely. My 2 cents = Ditch all tables to begin with and sharpen your CSS / xhtml skills. Yes it will take a bit of time to learn it all the while paying off in the future time and time again!
++ Absolutely. You'll have more control over your page styling, as using tables has this big disadvantage of making it hard to rearrange boxes around later when the boss says "Can you make that left sidebar a right sidebar instead?"