mik3cap: (Default)
[personal profile] mik3cap
So, I have a table on a page. I'd like to make it so that there's no space above or below the table... it should just start at the edge of the browser at the top and bottom. How do I do that? Your answer will earn my undying gratitude! And maybe a grilled cheese sandwich.

on 2007-11-13 07:04 pm (UTC)
Posted by [identity profile] bronzite.livejournal.com
I don't have the time to test it right now, but I bet setting table height: 100% and zeroing the border, padding, and margin will do the job.

on 2007-11-13 07:20 pm (UTC)
Posted by [identity profile] mikecap.livejournal.com
I've got a requirement for an exact table height - all other attributes are set to zero, but there's still a small space on the page at top and bottom.

on 2007-11-13 08:21 pm (UTC)
Posted by [identity profile] toddius.livejournal.com
stupid question in return - have you tried it in different browsers? because I seem to recall a browser issue with doing this. But I make one web page a year so you can perhaps ignore me.

on 2007-11-13 08:52 pm (UTC)
Posted by [identity profile] mikecap.livejournal.com
I think you're probably right, but I'm willing to do whatever it takes to make sure it's got no spaces cross-browser.

on 2007-11-13 08:57 pm (UTC)
Posted by [identity profile] kitteridge.livejournal.com
I don't know if this fully solves anything, but if you just can't get that one space to disappear, then make it an invisible character and give that character the smallest font size possible to completely minimize the spacing. That doesn't flush it, I know, but it does make it smaller.

Secondarily, put a clear.gif in the space that won't go away and resize it to 1x1 pixel.

After that, I got nothin'. My web coding skills stop just around tables.

on 2007-11-13 09:07 pm (UTC)
Posted by [identity profile] mikecap.livejournal.com
I'd pat myself on the back for learning how to use some CSS in this little project, if it wouldn't make me feel like a doof for not knowing it before I started...

Try FireBug...

on 2007-11-13 11:54 pm (UTC)
Posted by [identity profile] timothy-tim.livejournal.com
It's a firefox plugin and lets you see the boxes (like seeing the fnords, 'cept different).

Check border, margin and padding of the table, the td, tr and the body tags. I bet the body is tripping you up in this case...

Failing that. You can specify negative numbers for margin to scoot stuff around.

-ben

Re: Try FireBug...

on 2007-11-14 04:54 am (UTC)
Posted by [identity profile] mikecap.livejournal.com
You were correct sir! Well done. Body margin 0 was needed.

Profile

mik3cap: (Default)
mik3cap

June 2010

S M T W T F S
  12345
6 7891011 12
131415 16 171819
20212223242526
27282930   

Most Popular Tags

Style Credit

Expand Cut Tags

No cut tags
Page generated Jan. 6th, 2026 01:13 pm
Powered by Dreamwidth Studios