SitePoint Sponsor

User Tag List

Results 1 to 6 of 6
  1. #1
    SitePoint Enthusiast rexoids's Avatar
    Join Date
    May 2004
    Location
    Sydney
    Posts
    49
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Simple margin problem...

    G'day,

    I can't seem to find the right code to simply get my main table flushly aligned to the edge of the browser... I've tried marginwidth="0" marginheight="0" but it has no effect.

    It also isn't stretching 100% vertically although this has been set...?

    You can view the page here - http://ncdesign.com.au/pegasus/index.html

    As you can see, there is white space between the left blue column and the edge of the browser... any ideas how to fix this would be greatly apprectiated.

    Thanks!

  2. #2
    Who is Mr Blonde? Mr Blonde's Avatar
    Join Date
    Sep 2006
    Location
    Gold Coast, QLD
    Posts
    359
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    you can use CSS:
    HTML Code:
    <table width="100%" height="100%" cellspacing="0" cellpadding="0" border="0" style="margin-left:0;">
    Heavens Rejects : Online Clothing Store
    Alternative Clothing : Mr Blonde
    Front end development : By the Webfella

  3. #3
    SitePoint Enthusiast rexoids's Avatar
    Join Date
    May 2004
    Location
    Sydney
    Posts
    49
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thanks Mr Blonde... but for some reason it's not working? There's still some padding there...?!
    You can view the same page to see... Have I done something wrong?

    Many thanks.

  4. #4
    CSS & JS/DOM Adept bronze trophy
    Join Date
    Mar 2005
    Location
    USA
    Posts
    5,482
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Are you aware that you're using outdated techniques and what seems to be an old version of DreamWeaver?

    Browsers put default margins or padding on body. Use this rule to set them to 0.
    Code:
    html, body {
      margin: 0;
      padding: 0;
    }
    We miss you, Dan Schulz.
    Learn CSS. | X/HTML Validator | CSS validator
    Dynamic Site Solutions
    Code for Firefox, Chrome, Safari, & Opera, then add fixes for IE, not vice versa.

  5. #5
    SitePoint Wizard bronze trophy Tyssen's Avatar
    Join Date
    Oct 2005
    Location
    Brisbane, QLD
    Posts
    4,067
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by Mr Blonde View Post
    you can use CSS:
    HTML Code:
    <table width="100%" height="100%" cellspacing="0" cellpadding="0" border="0" style="margin-left:0;">
    If you're going to use CSS, you'd take it even further and do:

    Code:
    <table id="myTable">
    
    /* CSS */
    width: 100%;
    height: 100%;
    margin-left:0;
    border-collapse: collapse;

  6. #6
    SitePoint Enthusiast rexoids's Avatar
    Join Date
    May 2004
    Location
    Sydney
    Posts
    49
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thanks guys...

    Yes, I'm not surprised that my techniques are outdated (rolleyes), but I'm a lazy, lazy man...

    Anywho... I've got it working in IE now http://http://ncdesign.com.au/pegasus/index.html
    but of course my client uses Safari and Firefox and for some reason the blue column isn't stretching 100&#37; vertically in these browsers...??

    Suggestions are much appreciated!
    Nick


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •