HELP! Centering problem...

B

brucie

*Basic info:* I'm trying to center the images and such both vertically
and horizontally. I've done this with success in IE, but for some
reason Netscape and Firebird don't place it in the middle, but rather
it's centered vertically, but too low horizontally.
URL?

I'm using the body tags "topmargin=0", "leftmargin=0", and "rightmargin=0".
invalid

I've attached the file

no you haven't and you shouldn't. supply a URL
 
F

frontlines

*Basic info:* I'm trying to center the images and such both verticall
and horizontally. I've done this with success in IE, but for som
reason Netscape and Firebird don't place it in the middle, but rathe
it's centered vertically, but too low horizontally.

*Details:* I'm using Dreamweaver MX 2004, and I'm using the body tag
"topmargin=0", "leftmargin=0", and "rightmargin=0". When I run th
target browser check, it's bringing up a warning that Netscape
doesn't support those tags. Could that be what's throwing off th
alignment? If so, how else would I center this stuff?

Once you view the file, you'll see what I mean by this next part
Should I place all the images inside a nested table in the center
Would that work easier? I just hate messing with nesting if I don'
have to.

I'm kind of a noob to all this, but I've done this on other site
without a problem. I've attached the file so you can see what I'
talking about.

Thanks in advance for all your help

frontline
 
M

Mark Parnell

What's wrong with attaching the file? I'm not sure why it didn't
attach, but if anyone needs it to help, let me know and I'll try to
repost it.

Because this is not really an online forum, it is the alt.html
newsgroup. This is a non-binary group, so you should only post in plain
text, with no attachments.
 
B

Beauregard T. Shagnasty

Quoth the raven named frontlines:
The URL is http://www.frontlinescreative.com/trant.htm

What's wrong with attaching the file? I'm not sure why it didn't
attach, but if anyone needs it to help, let me know and I'll try to
repost it.

You are not posting in a web-based forum. You are posting in a Usenet
newsgroup, a text-only newsgroup, that's why. Here's part of your
header - notice the arrow:

NNTP-Posting-Date: Mon, 12 Jan 2004 21:34:02 -0600
From: frontlines <[email protected]>
Newsgroups: alt.html <-------- see the newsgroup?
Subject: Re: HELP! Centering problem...
Date: Mon, 12 Jan 2004 21:45:17 -0600
Message-ID: <[email protected]>
Organization: Web Design forum
User-Agent: www.Forum4designers.com gateway
X-Newsreader: www.Forum4designers.com gateway
X-Originating-IP: 68.47.198.5


Uh huh.

Somewhat of a sham, isn't it.
 
D

Disco Octopus

frontlines said:
*Basic info:* I'm trying to center the images and such both vertically
and horizontally.

does this work?......

..freakenthing {position:absolute;
top:50%;
left:50%;
}
 
M

Mark Parnell

That's all great.

Now does anyone want to help me figure out how to center this thing? I
would REALLY appreciate it.

To centre it horizontally, set margin: auto; on that element in your CSS
file.

Really the only way to centre it vertically is if you know the height of
the thing you are trying to center (with an image, this shouldn't be an
issue), then you can set the top of it to 50% and the top margin to
negative half the height of the element.

E.g. If the image is 100px high, then set top: 50%; margin-top: -50px;
in your CSS.

But what if my screen is smaller than what you are trying to center?
That's never going to work.

Ultimately, it cannot be done reliably. But really, what purpose would
it serve, anyway?
 
F

frontlines

That's all great.

Now does anyone want to help me figure out how to center this thing?
would REALLY appreciate it.

Thanks

frontline
 
M

Matthias Gutfeldt

brucie said:
in post <frontlines said:




theres a lot of issues with that but i'll decline to help you as i have
not surrendered my copyright on my usenet posts and do not give
permission for them to be used on web sites.

Remember those stupid "CNET HELP" forum posters? Looks like
forum4designers.com is doing this all over again. Yuk.


Matthias
 
L

Lauri Raittila

In said:
To centre it horizontally, set margin: auto; on that element in your CSS
file.
http://dorward.me.uk/www/centre/

Really the only way to centre it vertically is if you know the height of
the thing you are trying to center

With one exeption:
http://www.student.oulu.fi/~laurirai/www/css/middle/#table-cell
E.g. If the image is 100px high, then set top: 50%; margin-top: -50px;
in your CSS.
http://www.student.oulu.fi/~laurirai/www/css/middle/#absolute2

But what if my screen is smaller than what you are trying to center?

With above method, big part of content will be outside window if browser
don't support or you don't supply min-height
That's never going to work.

On MSIE.
Ultimately, it cannot be done reliably.

But it can be made so that it degrades well and works on modern browsers.
(IE6 is not modern browser.)
But really, what purpose would it serve, anyway?

Nothing...
 
R

rf

frontlines said:

That is what is wrong. This web site is nothing more than a portal into the
usenet newsgroups. You are not posting to that web site, you are posting to
alt.html. That web site "pretends" to be a forum but in reality is stealing
its content from the newsgroups.

Obtain a proper newsreader and approach us directly at news://alt.html - you
will get a much better reception.

Cheers
Richard.
 
R

rf

frontlines said:
That's all great.

Now does anyone want to help me figure out how to center this thing? I
would REALLY appreciate it.

Take it over to the validator at http://validator.w3.org and you will find
your error. You are using HTML that is not in the spec and so it is up to
each browser to decide how to handle it.

This also has to be the best advertisement to date on why to NOT use
dreamweaver. The page is nothing but an image. Following is what lynx makes
out of your page which is also roughly what any other non graphical browser,
including aural ones for the blind will display/speak:

<quote>
Trantanella Construction and
Rentals


[trant_01]
[trant_02] [trant_03] [trant_04] [trant_05] [trant_06] [trant_07]
[trant_08]
[trant_09] [trant_10]
[trant_11]
[trant_12]

</quote>

Not a pretty sight is it :)


Stop using this web site. It is not a forum, it steals its content from
usenet.

Cheers
Richard.
 
R

rf

Mark Parnell said:
To centre it horizontally, set margin: auto; on that element in your CSS
file.

Er, Mark, did you have a look at the source? There *is* no CSS file :)

<off topic>
BTW, a while ago you determined that I was close to you (geographically that
is) as I am in the top bit of Castle Hill (near the heritage park). What is
your approximate location? I've been wondering ever since that discussion re
agisting my roo at the koala park which we both know is a load of crok as my
roo is Far Too Big for such a small arena :) Perhaps your dog would like to
play with my roo in the heritage park...
</off>

Cheers
Richard.
 
R

rf

Disco Octopus said:
does this work?......

.freakenthing {position:absolute;
top:50%;
left:50%;
}

Yep, that would center the top left corner of whatever is selected by
..freakenthing directly in the centre of the canvas.

Cheers
Richard.
 
B

brucie

BTW, a while ago you determined that I was close to you (geographically that
is) as I am in the top bit of Castle Hill (near the heritage park). What is
your approximate location? I've been wondering ever since that discussion re
agisting my roo at the koala park which we both know is a load of crok as my
roo is Far Too Big for such a small arena :) Perhaps your dog would like to
play with my roo in the heritage park...
</off>

mark and richard sitting in a tree K-I-S-S-I-N-G
 
M

Matthias Gutfeldt

William said:
nooooo .....




don't. please don't .......

K-I-S-S-I-N-G

yukkie yukkie yukkie. I wish you wouldn't do that (in public).

Yes, right! Kissing in public, what is the world coming to?


Matthias
 

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,766
Messages
2,569,569
Members
45,043
Latest member
CannalabsCBDReview

Latest Threads

Top