Forum Moderators: open

Message Too Old, No Replies

Huge Space at top of page..

why ..?

         

natty

3:00 pm on Aug 9, 2004 (gmt 0)

10+ Year Member



hi all,

im generating a page with asp, dont worry, ill just post the html here..
bascially its outputting a table, quite a large one, with a form on each line.
but the more lines the table has, the bigger the space at the top of the page is..


<body>
<table width="600" border="0" cellpadding="2" cellspacing="0">
<thead>
<tr>
<th>Name</th>
<th>Position</th>
<th>Ext</th>
<th>Email</th>
<th>Mobile</th>
<th>Edit</th>
</tr>
<tr>
<td colspan="6" bgcolor="#000000"></td>
</tr>
</thead>
<tbody>
<form name="form96" ><tr>
<input type="hidden" name="id" value="96" /><input type="hidden" value="1" name="code" />
<td><input type="text" name="name" value="**** ****xx" /></td>
<td><input type="text" name="position" value="Position" /></td>
<td><input type="text" name="ext" value="0" size="4" maxlength="4" /></td>
<td><input type="text" name="email" value="" /></td>
<td><input type="text" name="mobile" value="" maxlength="12" size="13" /></td>
<td><input type="button" value="Update" onclick="updateCurrent(this.form);" /><input type="button" value="Del" onclick="removeCurrent(this.form);" /></td>
</tr>
</form>

etc.

any ideas?
doctype is XHTML 1.0 Transitional

tia

nat

encyclo

3:13 pm on Aug 9, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Could you post the relevant CSS relating to the table? It sounds as if a top margin is getting out of control somewhere.

Try commenting out all the margin rules in the CSS to check.

natty

4:15 pm on Aug 9, 2004 (gmt 0)

10+ Year Member



no margin-top on the table..

im thinking it may have something to do with the amount of forms on the page, being as it doestn actually validate, saying that 'oooh, you cant put form tags there, or inputs there..'

but shouldnt make that happen, besides , its fine in firefox, just IE that is being problematic.

still here is the css


body{padding: 10px; font: normal 0.8em Verdana;}
.heading{font-weight:bold;}
.odd{background-color:#EfEfEf;color:#000000;}
.even{background-color:white;color:black;}
table{border: 1px solid black;margin-left:auto;margin-right:auto;}
input{font: normal 0.8em Verdana;}

ps tried doing a margin-top:0; with no luck

pageoneresults

4:34 pm on Aug 9, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



body, html{margin: 0; padding:0; font: normal 0.8em Verdana;}
form{display: inline;}

The above might cure most of the issues.

im thinking it may have something to do with the amount of forms on the page, being as it doestn actually validate, saying that 'oooh, you cant put form tags there, or inputs there...' but shouldnt make that happen, besides , its fine in firefox, just IE that is being problematic.

No, that is not IE being problematic. It is improper markup that is going to cause problems with other browsers too. It may also be part of the problem now.

natty

6:02 pm on Aug 9, 2004 (gmt 0)

10+ Year Member



hi again,
ok, i take that on board.
but the reason they werent in teh right place to start with was that when i did put them where they are supposed to go :

Contained in APPLET, BLOCKQUOTE, BODY, CENTER, DD, DEL, DIV, FIELDSET, IFRAME, INS, LI, MAP, NOFRAMES, NOSCRIPT, OBJECT, TD, TH

the whole row gains some invisible height and screws up the table.

i was doing <tr><td>form, hidden inputs, first text input</td><td> ....</td....<td>last input </form></td></tr>
but that doesnt work either, surely i cant be expected to fit my whole form in 1 table cell?

is there a way around this..?
as i am keen on getting my pages to validate..

tia

tbeach

2:01 am on Aug 12, 2004 (gmt 0)

10+ Year Member



<<surely i cant be expected to fit my whole form in 1 table cell>>

You might want to rethink that.

natty

11:17 am on Aug 12, 2004 (gmt 0)

10+ Year Member



meaning, yes i am expected to do that?