Re: Just a simple centred DIV!

Discussion in 'HTML' started by Nico Schuyt, Jul 21, 2003.

  1. Nico Schuyt

    Nico Schuyt Guest

    Nick Howes wrote:
    > Hi
    > I've got some content in a fixed-width DIV element, which I just
    > want to be horizontally centred on the screen, but the "align=center"
    > DIV property and "text-align:center" style property just centre the
    > contents of the DIV. I really don't want to have to put everything
    > into a single-celled table and centre that :) but I can't find any
    > straightforward way to do this.


    http://david.us-lot.org/www/centre/
    Nico Schuyt, Jul 21, 2003
    #1
    1. Advertising

  2. Nico Schuyt

    Nick Howes Guest

    "Nico Schuyt" <> wrote in message
    news:3f1c4a04$0$28890$...
    > Nick Howes wrote:
    > > Hi
    > > I've got some content in a fixed-width DIV element, which I just
    > > want to be horizontally centred on the screen, but the "align=center"
    > > DIV property and "text-align:center" style property just centre the
    > > contents of the DIV. I really don't want to have to put everything
    > > into a single-celled table and centre that :) but I can't find any
    > > straightforward way to do this.

    >
    > http://david.us-lot.org/www/centre/
    >
    >


    That's great, thanks. I put it all in a DIV with text-align:center, then
    made the inner DIV text-align:left to keep the contents as normal.
    Nick Howes, Jul 21, 2003
    #2
    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. bengee
    Replies:
    2
    Views:
    353
    Lauri Raittila
    Jul 22, 2003
  2. Floortje

    layer in centred table

    Floortje, Apr 13, 2004, in forum: HTML
    Replies:
    1
    Views:
    343
    Spartanicus
    Apr 13, 2004
  3. tHatDudeUK
    Replies:
    6
    Views:
    397
    Richard
    Jan 13, 2005
  4. Luigi Donatello Asero

    Centred headers browsed at Firefox

    Luigi Donatello Asero, Oct 14, 2005, in forum: HTML
    Replies:
    44
    Views:
    1,087
    kchayka
    Oct 17, 2005
  5. Michael Laplante

    Centred image with caption

    Michael Laplante, Aug 8, 2006, in forum: HTML
    Replies:
    6
    Views:
    387
    Beauregard T. Shagnasty
    Aug 9, 2006
Loading...

Share This Page