HELP! Centering problem...

Discussion in 'HTML' started by brucie, Jan 13, 2004.

  1. brucie

    brucie Guest

    in post <news:4designers.com>
    frontlines said:

    > *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

    --
    brucie
     
    brucie, Jan 13, 2004
    #1
    1. Advertising

  2. brucie

    frontlines Guest

    *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
    -----------------------------------------------------------------------
    Posted via http://www.forum4designers.co
    -----------------------------------------------------------------------
    View this thread: http://www.forum4designers.com/message31798.htm
     
    frontlines, Jan 13, 2004
    #2
    1. Advertising

  3. brucie

    frontlines Guest

    frontlines, Jan 13, 2004
    #3
  4. brucie

    Mark Parnell Guest

    On Mon, 12 Jan 2004 21:45:17 -0600, frontlines declared in alt.html:
    >
    > 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.

    --
    Mark Parnell
    http://www.clarkecomputers.com.au
     
    Mark Parnell, Jan 13, 2004
    #4
  5. 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 <4designers.com>
    Newsgroups: alt.html <-------- see the newsgroup?
    Subject: Re: HELP! Centering problem...
    Date: Mon, 12 Jan 2004 21:45:17 -0600
    Message-ID: <4designers.com>
    Organization: Web Design forum
    User-Agent: www.Forum4designers.com gateway
    X-Newsreader: www.Forum4designers.com gateway
    X-Originating-IP: 68.47.198.5


    > Thanks.


    Uh huh.

    > ------------------------------------------------------------------------
    > Posted via http://www.forum4designers.com


    Somewhat of a sham, isn't it.

    --
    -bts
    -This space intentionally left blank.
     
    Beauregard T. Shagnasty, Jan 13, 2004
    #5
  6. brucie

    brucie Guest

    in post <news:4designers.com>
    frontlines said:

    > The URL is http://www.frontlinescreative.com/trant.htm


    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.

    --
    brucie
     
    brucie, Jan 13, 2004
    #6
  7. frontlines wrote:
    > *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%;
    }
     
    Disco Octopus, Jan 13, 2004
    #7
  8. brucie

    Mark Parnell Guest

    On Tue, 13 Jan 2004 00:18:18 -0600, frontlines declared in alt.html:

    > 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?

    --
    Mark Parnell
    http://www.clarkecomputers.com.au
     
    Mark Parnell, Jan 13, 2004
    #8
  9. brucie

    Mark Parnell Guest

    On Tue, 13 Jan 2004 05:51:53 GMT, Disco Octopus declared in alt.html:

    > frontlines wrote:
    >> *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%;
    > }


    No. That centres the top left hand corner of the image or whatever.

    --
    Mark Parnell
    http://www.clarkecomputers.com.au
     
    Mark Parnell, Jan 13, 2004
    #9
  10. brucie

    frontlines Guest

    That's all great.

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

    Thanks

    frontline
    -----------------------------------------------------------------------
    Posted via http://www.forum4designers.co
    -----------------------------------------------------------------------
    View this thread: http://www.forum4designers.com/message31798.htm
     
    frontlines, Jan 13, 2004
    #10
  11. brucie wrote:
    > in post <news:4designers.com>
    > frontlines said:
    >
    >
    >>The URL is http://www.frontlinescreative.com/trant.htm

    >
    >
    > 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
     
    Matthias Gutfeldt, Jan 13, 2004
    #11
  12. In article Mark Parnell wrote:
    > On Tue, 13 Jan 2004 00:18:18 -0600, frontlines declared in alt.html:
    >
    > > 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.


    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...

    --
    Lauri Raittila <http://www.iki.fi/lr> <http://www.iki.fi/zwak/fonts>
    Saapi lähettää meiliä, jos aihe ei liity ryhmään, tai on yksityinen
    tjsp., mutta älä lähetä samaa viestiä meilitse ja ryhmään.
     
    Lauri Raittila, Jan 13, 2004
    #12
  13. brucie

    rf Guest

    "frontlines" <4designers.com> wrote in message
    news:4designers.com...
    >
    > The URL is http://www.frontlinescreative.com/trant.htm
    >
    > What's wrong


    > Posted via http://www.forum4designers.com


    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.
     
    rf, Jan 13, 2004
    #13
  14. brucie

    rf Guest

    "frontlines" <4designers.com> wrote in message
    news:4designers.com...
    >
    > 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 :)


    > Posted via http://www.forum4designers.com


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

    Cheers
    Richard.
     
    rf, Jan 13, 2004
    #14
  15. brucie

    rf Guest

    "Mark Parnell" <> wrote in message
    news:kaljs4kgqzzk.19kd8ju3d8pxv$...
    > On Tue, 13 Jan 2004 00:18:18 -0600, frontlines declared in alt.html:
    >
    > > 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.


    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.
     
    rf, Jan 13, 2004
    #15
  16. brucie

    rf Guest

    "Disco Octopus" <> wrote in message
    news:ZHLMb.21$...
    > frontlines wrote:
    > > *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%;
    > }


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

    Cheers
    Richard.
     
    rf, Jan 13, 2004
    #16
  17. brucie

    brucie Guest

    in post <news:4GRMb.10299$>
    rf said:

    > 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


    --
    brucie
     
    brucie, Jan 13, 2004
    #17
  18. William Tasso wrote:
    > brucie wrote:
    >
    >>mark and richard

    >
    >
    > nooooo .....
    >
    >
    >>sitting in a tree

    >
    >
    > 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
     
    Matthias Gutfeldt, Jan 13, 2004
    #18
  19. brucie wrote:
    > in post <news:4GRMb.10299$>
    > rf said:
    >
    >> BTW, a while ago you determined that I was close to you
    >>...
    >> Perhaps your dog would like to play with
    >> my roo in the heritage park...

    >
    > mark and richard


    nooooo .....

    > sitting in a tree


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

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

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

    --
    William Tasso - http://WilliamTasso.com
     
    William Tasso, Jan 13, 2004
    #19
  20. brucie

    brucie Guest

    in post <news:bu0qpa$c3hq9$-berlin.de>
    William Tasso said:

    >>> Perhaps your dog would like to play with
    >>> my roo in the heritage park...


    >> mark and richard


    > nooooo .....


    >> sitting in a tree


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


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


    > yukkie yukkie yukkie.


    i feel sorry for the poor innocent doggy and roo used as a pretence just
    so mark and richard can have a date.

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


    its not me, its them ---> <points at mark and rf/>

    --
    brucie
     
    brucie, Jan 13, 2004
    #20
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Sunny

    Centering problem in IE

    Sunny, Feb 28, 2006, in forum: HTML
    Replies:
    2
    Views:
    466
    BootNic
    Mar 1, 2006
  2. Brian
    Replies:
    7
    Views:
    2,184
    Acmeous
    Oct 31, 2008
  3. Andrew

    Need help centering menu bar

    Andrew, Sep 25, 2006, in forum: HTML
    Replies:
    6
    Views:
    434
    Andrew
    Sep 25, 2006
  4. Replies:
    2
    Views:
    347
    Jim Moe
    Dec 5, 2006
  5. Applebrownbetty

    Centering a PopUp Window Help

    Applebrownbetty, Nov 1, 2004, in forum: Javascript
    Replies:
    16
    Views:
    187
    Randy Webb
    Nov 3, 2004
Loading...

Share This Page