Why do i have this border?

Discussion in 'HTML & Website Design' started by nomadicmatt, Sep 21, 2008.

  1. #1
    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...
     
    nomadicmatt, Sep 21, 2008 IP
  2. JamesMichael Solutions

    JamesMichael Solutions Peon

    Messages:
    52
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #2
    <style>

    body {
    margin-left:0;
    margin-top:0;
    }

    </style>

    This is should be a simple solution.
     
    JamesMichael Solutions, Sep 21, 2008 IP
  3. ferman

    ferman Well-Known Member

    Messages:
    968
    Likes Received:
    8
    Best Answers:
    0
    Trophy Points:
    140
    #3
    just put this code in your style sheet

    body {
    margin:0;
    }
     
    ferman, Sep 21, 2008 IP
  4. xtremegraphix

    xtremegraphix Peon

    Messages:
    13
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #4
    actully you need to put the

    * {
    margin:0;
    }

    That clears all on the document
     
    xtremegraphix, Sep 21, 2008 IP
  5. xira

    xira Active Member

    Messages:
    315
    Likes Received:
    8
    Best Answers:
    4
    Trophy Points:
    68
    #5
    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.
     
    xira, Sep 22, 2008 IP
  6. JamesMichael Solutions

    JamesMichael Solutions Peon

    Messages:
    52
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #6
    This won't work in firefox I believe, throw that code in a style sheet or in the head ->

    <style>

    *code*

    </style>
     
    JamesMichael Solutions, Sep 22, 2008 IP
  7. Stomme poes

    Stomme poes Peon

    Messages:
    3,195
    Likes Received:
    136
    Best Answers:
    0
    Trophy Points:
    0
    #7
    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.
     
    Stomme poes, Sep 22, 2008 IP
    WebSolutions86 likes this.
  8. JamesMichael Solutions

    JamesMichael Solutions Peon

    Messages:
    52
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #8
    Good Post. Rep.
     
    JamesMichael Solutions, Sep 22, 2008 IP
  9. master-mind

    master-mind Well-Known Member

    Messages:
    91
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    111
    #9
    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
     
    master-mind, Sep 22, 2008 IP
  10. DesignSamples

    DesignSamples Banned

    Messages:
    170
    Likes Received:
    6
    Best Answers:
    0
    Trophy Points:
    0
    #10
    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!
     
    DesignSamples, Sep 22, 2008 IP
  11. nomadicmatt

    nomadicmatt Peon

    Messages:
    109
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #11
    border is gone. all fixed.

    thanks for the help
     
    nomadicmatt, Sep 26, 2008 IP
  12. WebSolutions86

    WebSolutions86 Peon

    Messages:
    434
    Likes Received:
    25
    Best Answers:
    0
    Trophy Points:
    0
    #12
    @Stomme poes

    That shows ur deep knowledge of css, thanks

    Reps added :)
     
    WebSolutions86, Sep 30, 2008 IP
  13. Stomme poes

    Stomme poes Peon

    Messages:
    3,195
    Likes Received:
    136
    Best Answers:
    0
    Trophy Points:
    0
    #13
    ++

    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?"
     
    Stomme poes, Oct 1, 2008 IP
  14. lilmikey798

    lilmikey798 Peon

    Messages:
    11
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #14
    you also need to work on the location of your naviagation bar
     
    lilmikey798, Dec 24, 2008 IP