www.webdeveloper.com
Results 1 to 3 of 3

Thread: Stubborn margins

  1. #1
    Join Date
    Jan 2011
    Posts
    4

    Stubborn margins

    I am setting up a simple page to be managed by the owner later. I cannot get rid of a bit of margin showing on the right - http://cbrundage.net/Ron/ I have the red areas both part of tables, coded the same way, but one goes to the edge and the other doesn't. Pertinent coding - (many thanks for any help!) -

    <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN"
    "http://www.w3.org/TR/html4/strict.dtd">
    <html lang="en">
    <head> ....
    <style type="text/css">
    html,body {margin:0;padding:0}
    p {font:10pt "Verdana";color:#ffffff;text-align:leftr;}
    p.black {font:10pt "Verdana";color:#000000;text-align:left;}
    .class1 {position:absolute;
    top:0px;
    width:100%;
    height:80px;
    left:0px;
    z-index:2;
    }
    .class2 {position:absolute;
    top:78px;
    width:100%;
    left:0px;
    z-index:1;
    }
    </style>
    </head>

    <body bgcolor="#ffffff" leftmargin="0px" topmargin="0px" marginwidth="0px" marginheight="0px">

    <div class=class1><table width="100%" height=80px bgcolor="#B8213A">
    <tr>
    <td><center><br><img src="title.gif"></center><br></td>
    </tr>
    </table></div>
    <br><br><br>

    <div class=class2>
    <table width="100%">
    <tr>
    <td width=120px valign=top bgcolor="#B8213A">
    <br><br><blockquote>
    <p>Link<br>
    Link<br>
    Link<br>
    Link<br></blockquote></td>
    <td>
    <td bgcolor="#ffffff" valign=top>
    <table cellpadding=20><tr><td><p class="black">.....</p></td></tr></table>
    </td>
    <td width=150px bgcolor="#ffffff">
    <table cellpadding=20>
    <tr>
    <td><p class="black" valign=top>...</p>
    </td>
    </tr>
    </table>
    </td>
    </tr>
    </table></div>

    </body>
    </html>

  2. #2
    Join Date
    May 2012
    Location
    St. Helens, UK
    Posts
    74
    Use Eric Mayer's Reset CSS stylesheet in addition to your current CSS; I've just tried it, and it eliminated the unwanted margin.

    http://meyerweb.com/eric/tools/css/reset/
    Crisialu Web Design
    Daihuws's Blog

    "There is no human problem which could not be solved if people would simply do as I advise."

  3. #3
    Join Date
    Jan 2011
    Posts
    4
    Many thanks! That did it!! I'm so grateful!
    Christina

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

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



Recent Articles