Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Table moving down page 1

Status
Not open for further replies.

gav12345

Programmer
Dec 4, 2003
198
GB
Hi all,

Quite a newbie to HTML so this may be an obvious question. I have a simple page comprising 3 frames. Top frame is just for display. Clicking on a link on a menu in the left frame results in a list of links being displayed in the right (main) frame. - You get the idea.

Anyway, as long as I just list the links in the main frame I have no problem, the results are listed from the top of the page down. However, as soon as I put a table round the list of links, they move about 3-4 inches down the page. I can't see any reason why this is happening.

Since there is some ASP in there, and this is an HTML forum, I'll just post the 'View Source' results directly from the browser:

Code:
<html>
<head>
<title>Untitled</title>
<link rel="stylesheet"
type="text/css" href="stylesMain.css" />
</head>
<body>
<h3>Reports</h3>
<br>

<table border=1 width=850 cellspacing = 0><tr><td><a href=[URL unfurl="true"]http://trastest21/viewrpt.cwr?id=58373&apsname=trastest21&apsuser=Administrator&apspassword=&apsauthtype=secEnterprise[/URL] target="_blank"><h5>######</h5></a></td> <td><h6>  ##### </h6></td></tr><br><tr><td><a href=[URL unfurl="true"]http://trastest21/viewrpt.cwr?id=58373&apsname=trastest21&apsuser=Administrator&apspassword=&apsauthtype=secEnterprise[/URL] target="_blank"><h5>#####</h5></a></td> <td><h6>  ##### </h6></td></tr><br><tr><td><a href=[URL unfurl="true"]http://trastest21/viewrpt.cwr?id=58373&apsname=trastest21&apsuser=Administrator&apspassword=&apsauthtype=secEnterprise[/URL] target="_blank"><h5>#####</h5></a></td> <td><h6>  ##### </h6></td></tr><br><tr><td><a href=[URL unfurl="true"]http://trastest21/viewrpt.cwr?id=58373&apsname=trastest21&apsuser=Administrator&apspassword=&apsauthtype=secEnterprise[/URL] target="_blank"><h5>#####</h5></a></td> <td><h6>  #####</h6></td></tr><br><tr><td><a href=[URL unfurl="true"]http://trastest21/viewrpt.cwr?id=58373&apsname=trastest21&apsuser=Administrator&apspassword=&apsauthtype=secEnterprise[/URL] target="_blank"><h5>#####</h5></a></td> <td><h6>  ##### </h6></td></tr><br><tr><td><a href=[URL unfurl="true"]http://trastest21/viewrpt.cwr?id=58373&apsname=trastest21&apsuser=Administrator&apspassword=&apsauthtype=secEnterprise[/URL] target="_blank"><h5>#####</h5></a></td> <td><h6> ##### </h6></td></tr><br><tr><td><a href=[URL unfurl="true"]http://trastest21/viewrpt.cwr?id=58373&apsname=trastest21&apsuser=Administrator&apspassword=&apsauthtype=secEnterprise[/URL] target="_blank"><h5>#####</h5></a></td> <td><h6>  #####</h6></td></tr><br><tr><td><a href=[URL unfurl="true"]http://trastest21/viewrpt.cwr?id=58373&apsname=trastest21&apsuser=Administrator&apspassword=&apsauthtype=secEnterprise[/URL] target="_blank"><h5>#####</h5></a></td> <td><h6>  #####</h6></td></tr><br><tr><td><a href=[URL unfurl="true"]http://trastest21/viewrpt.cwr?id=58373&apsname=trastest21&apsuser=Administrator&apspassword=&apsauthtype=secEnterprise[/URL] target="_blank"><h5>#####</h5></a></td> <td><h6> ##### </h6></td></tr><br><tr><td><a href=[URL unfurl="true"]http://trastest21/viewrpt.cwr?id=45078&apsname=trastest21&apsuser=Administrator&apspassword=&apsauthtype=secEnterprise[/URL] target="_blank"><h5>#####</h5></a></td> <td><h6>  #####</h6></td></tr><br></table>
   


</body>
</html>

...essentially just 10 repeating rows in a pretty simple table, so I'm pretty puzzled why the table isn't just appearing at the top of the page.

If the above isn't clear, let me know and I'll post the full source code incl ASP.

Any suggestions? Many thanks, Gavin
 
It kind of depends on what is in your css file...

Greg
"Personally, I am always ready to learn, although I do not always like being taught." - Winston Churchill
 
Ah, should have mentioned - I commented out the reference to the css file altogether, and had the same problem....but I will post the css tomorrow anyway, just in case I've missed something - very possible (in the UK so now home for the evening!)
 
It's the break <br> tags between your table rows. They absolutely do not belong there.

Greg
"Personally, I am always ready to learn, although I do not always like being taught." - Winston Churchill
 
traingamer is right. Because you have line breaks (<br />) where they should not be, they are all rendered above the table. Other thing, it could be the default gap of the body element. Make sure you nullify body margins and padding via css.
 
Many thanks guys, removing the <br> did it.

Gavin
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top