Move Table to Extreme Top of Page

T

Tha RagMan

Up front let me once again admit to being far behind the learning
curve and still using tables with Netscape Composer to handle my
little web sites. I know that I should get up to speed with CSS but
just haven't made it yet. My problem is when I create a page and add a
table that I want at the extreme top of the page I always end up with
a pretty good space at the top of the page that I seem not to be able
to overcome. Take a look at one of my sights and you can see the space
I am talking about at the top of the page. http://www.BRPPISAFETY.COM
What can I do to move my table to the extreme top of page in place of
this default space I always get?

Thanks so much for any help offered.

A Safe and Happy Holiday Season to All ! ! !
Tha RagMan
 
B

Beauregard T. Shagnasty

Tha said:
Up front let me once again admit to being far behind the learning
curve and still using tables with Netscape Composer to handle my
little web sites. I know that I should get up to speed with CSS but
just haven't made it yet. My problem is when I create a page and add
a table that I want at the extreme top of the page I always end up
with a pretty good space at the top of the page that I seem not to be
able to overcome. Take a look at one of my sights and you can see the
space I am talking about at the top of the page.
http://www.BRPPISAFETY.COM What can I do to move my table to the
extreme top of page in place of this default space I always get?

Add this in the <head> section:

<style type="text/css">
body,table { margin: 0; padding: 0; }
</style>

and remove that errant &nbsp; between the <body> and the <table>.
 
T

Tha RagMan

Add this in the <head> section:

<style type="text/css">
body,table { margin: 0; padding: 0; }
</style>

and remove that errant &nbsp; between the <body> and the <table>.

Beauregard T. Shagnasty;
You are my absolute HERO for the day! Your suggestion worked perfectly
and solved my space problem. Many Many thanks for taking the time to
offer up the solution.
Happy Holidays and thanks again for the helping hand.
Tha RagMan
 
B

Beauregard T. Shagnasty

Tha said:
Beauregard T. Shagnasty;
You are my absolute HERO for the day! Your suggestion worked perfectly
and solved my space problem. Many Many thanks for taking the time to
offer up the solution.
Happy Holidays and thanks again for the helping hand.
Tha RagMan

Oh, but wait!

I just had another look at your page. Bad boy, no donut. You have:

body,table { margin: 0; padding: 4; }

4 what? Donuts? Automobiles? [Hobnobs?]

You said you wanted to remove all the space above the table, so that
would be zero. Anything other than zero requires units. 4px ... 4em ...
and "padding: 4px;" will add it all 'round. If you only want it on the
sides, use: "padding-left: 4px; padding-right: 4px;"

(Yeah, I know the shorter way, but I don't want to confuse Ragman.)

See: http://htmldog.com/guides/cssbeginner/
 
T

Tha RagMan

Tha said:
Beauregard T. Shagnasty;
You are my absolute HERO for the day! Your suggestion worked perfectly
and solved my space problem. Many Many thanks for taking the time to
offer up the solution.
Happy Holidays and thanks again for the helping hand.
Tha RagMan

Oh, but wait!

I just had another look at your page. Bad boy, no donut. You have:

body,table { margin: 0; padding: 4; }

4 what? Donuts? Automobiles? [Hobnobs?]

You said you wanted to remove all the space above the table, so that
would be zero. Anything other than zero requires units. 4px ... 4em ...
and "padding: 4px;" will add it all 'round. If you only want it on the
sides, use: "padding-left: 4px; padding-right: 4px;"

Shag;
Thanks for the heads up. I saw the 0 and just took it I could play
with any digit. I experimented a bit and found that 4 did pretty much
what I had in mind. I went back and added the px but I can't see where
it made any difference. I actually was not overly concerned with the
sides as much as I was the space at the top which your fix has cured.
I do have one question if you have the time. I noticed when I alter
both the margin and/or the padding it also effects the space between
the two tables I have. Is there a way to keep these butted against
each other and still be able to control how much space is displayed at
the top? It's not really a big deal but would be nice if I had that
control.

Thanks again for your response and help.
WR
 
B

Beauregard T. Shagnasty

Thomas said:
I don't. what is it ?

/* margin and padding: top right bottom left */
/* If there is only one value, it applies to all sides. If there are two
values, the top and bottom margins are set to the first value and the
right and left margins are set to the second. If there are three
values, the top is set to the first value, the left and right are set
to the second, and the bottom is set to the third. If there are four
values, they apply to the top, right, bottom, and left, respectively.
*/

padding: 0 4px 0; or whatever fits these rules.
 
B

Beauregard T. Shagnasty

Tha said:
Shag;
Thanks for the heads up. I saw the 0 and just took it I could play
with any digit. I experimented a bit and found that 4 did pretty much
what I had in mind. I went back and added the px but I can't see
where it made any difference.

Depends on the browser. Real conforming browsers have the option to
ignore any incorrect rules. Some others attempt to guess at what you
really meant.
I actually was not overly concerned with the sides as much as I was
the space at the top which your fix has cured. I do have one question
if you have the time. I noticed when I alter both the margin and/or
the padding it also effects the space between the two tables I have.
Is there a way to keep these butted against each other and still be
able to control how much space is displayed at the top? It's not
really a big deal but would be nice if I had that control.

This should work:

body { margin: 0; padding: 0; }
table { margin: 4px 0 0; }

I just did that to your page, and it looks ok. 'Course I don't know why
you want to do this, or if that is eggzactly what you want.

How did I do it to your page? The Firefox Web Developer's Toolbar.
http://chrispederick.com/work/webdeveloper/
and while viewing your page, I typed Control+Shift+E
and .. my gosh .. I can play with your CSS! [1]
Thanks again for your response and help.

Am I gonna be a HERO again? :-D

[1] Just in my own browser, of course.
 
T

Tha RagMan

Tha said:
Shag;
Thanks for the heads up. I saw the 0 and just took it I could play
with any digit. I experimented a bit and found that 4 did pretty much
what I had in mind. I went back and added the px but I can't see
where it made any difference.

Depends on the browser. Real conforming browsers have the option to
ignore any incorrect rules. Some others attempt to guess at what you
really meant.
I actually was not overly concerned with the sides as much as I was
the space at the top which your fix has cured. I do have one question
if you have the time. I noticed when I alter both the margin and/or
the padding it also effects the space between the two tables I have.
Is there a way to keep these butted against each other and still be
able to control how much space is displayed at the top? It's not
really a big deal but would be nice if I had that control.

This should work:

body { margin: 0; padding: 0; }
table { margin: 4px 0 0; }

I just did that to your page, and it looks ok. 'Course I don't know why
you want to do this, or if that is eggzactly what you want.

How did I do it to your page? The Firefox Web Developer's Toolbar.
http://chrispederick.com/work/webdeveloper/
and while viewing your page, I typed Control+Shift+E
and .. my gosh .. I can play with your CSS! [1]
Thanks again for your response and help.

Am I gonna be a HERO again? :-D

You are absolutely my Hero and have earned elite status for getting me
working. I have purchased a book on CSS and am going to dive in to it
soon so maybe I can get up to speed with the rest of the web building
world. I'm a bit ashamed to make it public but I currently have about
35 commerical web sites up and running and am still working in a world
that's no less then 7-10 years ago. My sites are pretty basic and
handle the customers needs so I have gotten to be a bit complacent and
have failed to keep current with the design trends. I'm going to do
some more playing with the code info you gave me to see how it affects
the pages. Please know how much I sincerely appreciate your time and
talent in helping me out.
Thanks again.
Tha RagMan
 
B

Beauregard T. Shagnasty

Tha said:
You are absolutely my Hero and have earned elite status for getting me
working.

Uhoh. I gotta find another frame.
I have purchased a book on CSS and am going to dive in to it
soon so maybe I can get up to speed with the rest of the web building
world.

Well, go play with it for awhile, then come back and tell us what you
learned. <g>
Please know how much I sincerely appreciate your time and
talent in helping me out.
Thanks again.
Tha RagMan

You're welcome.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,484
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top