Welcome Guest ( Log In | Register )

Outline · [ Standard ] · Linear+

 Remove the gap, need help in HTML table

views
     
TSpeacelover
post Feb 22 2006, 12:36 AM, updated 19y ago

Getting Started
**
Junior Member
119 posts

Joined: Jan 2003



there is a gap between my table and the top edge of the page, how can i put my table all the way up to the edge?

user posted image

somebody help me
lmcckl
post Feb 22 2006, 12:49 AM

Getting Started
**
Junior Member
50 posts

Joined: Dec 2005
From: KL


try this, i am using css for position, simple but not recomened

CODE

<html>
<div style="position:absolute; top:0px; left:0px">
<table bgcolor="yellow">
<tr><td>Hello World</td></tr>
</table>
</div>
<html>


btw, why you don't want the gap?
TSpeacelover
post Feb 22 2006, 01:13 AM

Getting Started
**
Junior Member
119 posts

Joined: Jan 2003



QUOTE(lmcckl @ Feb 22 2006, 12:49 AM)
try this, i am using css for position, simple but not recomened

CODE

<html>
<div style="position:absolute; top:0px; left:0px">
<table bgcolor="yellow">
<tr><td>Hello World</td></tr>
</table>
</div>
<html>


btw, why you don't want the gap?
*
it look more neat to align all the way to top, but one thing when i use position : absolute, my table no longer align in the center of the page, and the table become smaller since i use 65% for width in table....
silverhawk
post Feb 22 2006, 01:17 AM

I'm Positively Lustrous
Group Icon
Elite
4,738 posts

Joined: Jan 2003


use this
CODE

body {
   margin-top: 0px;
}

TSpeacelover
post Feb 22 2006, 01:34 AM

Getting Started
**
Junior Member
119 posts

Joined: Jan 2003



thanks silverhawk.... problem solved tongue.gif

 

Change to:
| Lo-Fi Version
0.0131sec    0.47    5 queries    GZIP Disabled
Time is now: 29th March 2024 - 02:09 PM