css fixed position and scrolling, centering tables

Discussion in 'HTML' started by steffen.mazanek@unibw-muenchen.de, Oct 27, 2003.

  1. Guest

    Hello again,

    I have tried very hard to center a table and still
    stay xhtml conform. But without success. How do
    you reach this? The attribute align="center" is not
    xhtml and margin:auto did not center my table.
    Any hints are appreciated.
    Another problem. Since I use css fixed position I can
    not scroll any more. This is really annoying. What
    can I do against this?
    My page is located at www.steffen-mazanek.de,
    the problem occurs at http://www.steffen-mazanek.de/de/haskell.html.

    Thank you.
    Ciao,
    Steffen
     
    , Oct 27, 2003
    #1
    1. Advertising

  2. steffen.mazanek wrote:

    > Another problem. Since I use css fixed position I can
    > not scroll any more.


    That is kind of the *point* of position:fixed. If you set position:fixed,
    then the position of the element is fixed -- it won't move.

    > This is really annoying. What can I do against this?


    Don't use position:fixed. Try position:absolute instead.

    > the problem occurs at http://www.steffen-mazanek.de/de/haskell.html.


    It is a long time since I did any programming in Haskell. Even longer
    since I did any reading in German. But from what I can make out, your XML
    processing with Haskell looks interesting. Haskell would really be quite a
    natural language to use for XML processing.

    --
    Toby A Inkster BSc (Hons) ARCS
    Contact Me - http://www.goddamn.co.uk/tobyink/?id=132
     
    Toby A Inkster, Oct 27, 2003
    #2
    1. Advertising

  3. Steve Pugh Guest

    wrote:


    >I have tried very hard to center a table and still
    >stay xhtml conform. But without success. How do
    >you reach this? The attribute align="center" is not
    >xhtml


    Yes it is.
    It's in XHTML 1.0 Transitional just the same as it's in HTML 4.01
    Transitional.
    It is not in XHTML 1.0 Strict just the same as it's not in HTML 4.01
    Strict.

    This is not an XHTML vs HTML issue. It is a strict vs transitional, or
    strurctural vs presentational issue.

    >and margin:auto did not center my table.


    It depends on your browser and doctype. It won't work in IE up to 5.5,
    or IE 6 if your doctype triggers quirks mode. It will work in IE6 in
    standards mode and in most other modern browsers.

    margin: 0 auto; is slightly preferred even if in most cases a value of
    auto for top and bottom margins should be the same as a value of zero.

    >Another problem. Since I use css fixed position I can
    >not scroll any more. This is really annoying. What
    >can I do against this?


    Then don't use position: fixed. By definition position: fixed; removes
    the elements in question from any calculation of whether scrolling
    occurs.

    >the problem occurs at http://www.steffen-mazanek.de/de/haskell.html.


    There's nothing on that page with a class="center", which is the only
    style you have with margin: auto;, so obviously nothing will be
    centered.

    Steve

    --
    "My theories appal you, my heresies outrage you,
    I never answer letters and you don't like my tie." - The Doctor

    Steve Pugh <> <http://steve.pugh.net/>
     
    Steve Pugh, Oct 27, 2003
    #3
  4. Guest

    Hello.

    Ok, now I have just the navigation menues as position: fixed and the
    content as position:absolute and I still can not scroll :-(

    #navigation {
    position: fixed;
    top: 0; left: 0; right: 0; height: 2em;
    padding: 5px 5px 5px;
    text-align: center;
    }
    #specmenu {
    position: fixed;
    top: 2.1em; left: 0; bottom: 1.6em; right: 85%;
    }
    #speccontent {
    position: absolute;
    top: 2.1em; right: 0; bottom: 1.6em; left:15%;
    overflow: auto;
    padding: 0 1em;
    }
    #content {
    position: absolute;
    top: 2.1em; bottom: 1.6em; left: 0; right: 0;
    overflow: auto;
    padding: 0 0.5em;
    }

    I think, I need position:fixed for the menues.

    > It is a long time since I did any programming in Haskell.


    :) Time for a restart I would say.

    > Even longer
    > since I did any reading in German. But from what I can make out, your XML
    > processing with Haskell looks interesting. Haskell would really be quite a
    > natural language to use for XML processing.


    Yes, it is fun :)

    Ciao,
    Steffen
     
    , Oct 27, 2003
    #4
  5. Guest

    Hello.

    Steve Pugh <> writes:

    > Yes it is.
    > It's in XHTML 1.0 Transitional just the same as it's in HTML 4.01
    > Transitional.
    > It is not in XHTML 1.0 Strict just the same as it's not in HTML 4.01
    > Strict.


    Hmm.

    > This is not an XHTML vs HTML issue. It is a strict vs transitional, or
    > strurctural vs presentational issue.


    I begin to understand the differences.

    > Then don't use position: fixed. By definition position: fixed; removes
    > the elements in question from any calculation of whether scrolling
    > occurs.


    How can I allow the divs content and speccontent for scrolling and
    still have the menues at fixed positions?

    > There's nothing on that page with a class="center", which is the only
    > style you have with margin: auto;, so obviously nothing will be
    > centered.


    Oh, sorry for the confusion. This page is just an example for
    scrolling.


    Regards,
    Steffen
     
    , Oct 27, 2003
    #5
  6. Guest

    Oh, by the way, parts of the site are translated already, try the
    "English" menu item :)
     
    , Oct 27, 2003
    #6
    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. news.frontiernet.net

    Design Position by tables or CSS: Problem

    news.frontiernet.net, Oct 3, 2003, in forum: HTML
    Replies:
    13
    Views:
    664
    Toby A Inkster
    Oct 5, 2003
  2. Lenny
    Replies:
    1
    Views:
    448
    Andy Holmes
    Oct 16, 2003
  3. ppcguy

    css fixed position

    ppcguy, Jul 23, 2005, in forum: HTML
    Replies:
    12
    Views:
    911
    Leonard Blaisdell
    Jul 24, 2005
  4. Chris
    Replies:
    39
    Views:
    1,267
    Bergamot
    Sep 28, 2006
  5. Doug Miller
    Replies:
    13
    Views:
    424
    Jukka K. Korpela
    Sep 16, 2013
Loading...

Share This Page