Anchoring table to top of page

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • adweaver
    New Member
    • Oct 2009
    • 20

    #1

    Anchoring table to top of page

    Hi,

    I'm trying to figure out why my top table is leaving a gop between it and the top of the screen.

    Code:
    </head>
    
    
    
    <body onload="MM_preloadImages('images/bttn_hover.gif','images/bttn-hover.jpg')">
    
    <form action="https://www.fooshenergytrial.com/orderpage.php" method="post" name="frmSignUp" id="frmSignUp">
    
    <table align="center"><td><table  align="center" vspace="0" width="972" cellspacing="0" cellpadding="0">
    
      <tr>
    
        <td scope="row" valign="top"><img src="images/topBanner.gif" /></td>
    
      </tr>
      
      <tr>
      
      <td scope="row"><img src="images/header.gif" /></td>
      
      </tr>
    U have my vspace set to 0, but that doesn't seem to be doing it. I looked through the rest of the commands suggested by dreamweaver and I can't see any that would apply.

    I don't understand why it won't allow me to use valign"top", like I do with the following image, for controlling the top of the table.

    Any advice would be appreciated. Slowly but surely I'm starting to understand the structure of all this (trying to understand the code that was written for me on a site I paid to get designed).

    Thanks for your help.

    Andrew
  • Dormilich
    Recognized Expert Expert
    • Aug 2008
    • 8694

    #2
    check the paddings and margins of the elements before (there arfe also browser defaults). and using tables for image layout is outdated for long.

    Comment

    • adweaver
      New Member
      • Oct 2009
      • 20

      #3
      thanks Dorm. I'm still fighting with it. trying to adjust paddings and stuff.

      Table layout works well for this application. Site is pretty simple and the entire thing is created as images in Illustrator.

      It was built for me, so I'm trying to stay within the framework I was given. Certainly learning a lot along the way.

      Thanks for your help.

      Andrew

      Comment

      • drhowarddrfine
        Recognized Expert Expert
        • Sep 2006
        • 7434

        #4
        How big a gap is it? About 10px? Which browser?

        Add this to the body tag and see if it's the solution:
        <body style="margin:0 " ...

        Comment

        • adweaver
          New Member
          • Oct 2009
          • 20

          #5
          Thanks fort he suggestion. I actually had 2 similar pages, and one was flush with the top (the other, which I was fighting with, I had made other changes to that I didn't want to lose).

          In the end, I started from scratch and built a page that was chunks of each. Even copy and pasting all the relevant from the one that worked wouldn't fix it. Still not sure what the problem was, but I have moved onto my next problem (for another post).

          Thanks for the help.

          Comment

          Working...