center issue using <div>

Discussion in 'HTML' started by Mr. X., Sep 23, 2008.

  1. Mr. X.

    Mr. X. Guest

    Hello.
    I work by centering the elements on the browser using <div>

    The following code doesn't center the elements, on IE 5.5 and lower.
    Is there any technique to center the elements ?

    <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN"
    "http://www.w3.org/TR/html4/strict.dtd">
    <html>
    <head>
    <link rel="stylesheet" type="text/css" href="test_nav.css" />
    <SCRIPT SRC="Main.js" type="text/javascript">
    </SCRIPT>
    </head>
    <body bgcolor = "lightblue">
    <div id = "wrap">
    </div>
    </body>
    </html>

    test_nav.html
    =========
    #wrap
    {
    top:0;
    height:850px;
    width:760px;
    margin:auto;
    background-color:red;
    }

    Thanks :eek:)
     
    Mr. X., Sep 23, 2008
    #1
    1. Advertising

  2. Mr. X.

    dorayme Guest

    In article <gba59n$1sp$>,
    "Mr. X." <no_spam_please@nospam_please.com> wrote:

    > The following code doesn't center the elements, on IE 5.5 and lower


    Why worry about IE5? You do not mention that it does not centre in IE6,
    a browser still in significant use.

    --
    dorayme
     
    dorayme, Sep 23, 2008
    #2
    1. Advertising

  3. Mr. X.

    Mr. X. Guest

    Should I worry about IE 5.5 ?
    People still using it ? What the IE 5.5 usage popularity ?

    It works on IE 6.0.

    Thanks :)
     
    Mr. X., Sep 23, 2008
    #3
  4. Mr. X.

    dorayme Guest

    In article <gba7sf$beu$>,
    "Mr. X." <no_spam_please@nospam_please.com> wrote:

    > It works on IE 6.0.


    It does? How can we know?

    How can we know what is in your

    <SCRIPT SRC="Main.js" type="text/javascript">
    </SCRIPT>

    when you simply quote this without a real URL.

    --
    dorayme
     
    dorayme, Sep 23, 2008
    #4
  5. Mr. X.

    Els Guest

    Mr. X. wrote:

    > I work by centering the elements on the browser using <div>


    <div> does not center anything. The CSS styles that apply to whichever
    div you choose do.

    > The following code


    No code. URL please.

    > doesn't center the elements, on IE 5.5 and lower.


    As dorayme says, why worry about IE5.

    > Is there any technique to center the elements ?


    Yes.
    http://locusmeus.com/html-css/centeringpage.html

    This is the last time I reply to any of your questions if you don't:
    - provide a URL up front
    - reply to something with a quote of the text you are replying to.

    (just so you know :))

    --
    Els http://locusmeus.com/
     
    Els, Sep 23, 2008
    #5
  6. Mr. X.

    richard Guest

    On Tue, 23 Sep 2008 10:21:57 +0300, "Mr. X."
    <no_spam_please@nospam_please.com> wrote:

    >Hello.
    >I work by centering the elements on the browser using <div>
    >
    >The following code doesn't center the elements, on IE 5.5 and lower.
    >Is there any technique to center the elements ?
    >


    Do you know of anyone still using windows 95 or 98?
    That's about the time IE5 came out.
    I'd just worry about how things work in the more modern browsers.
    The way I see it, if it works in the four most popular browsers, why
    worry about the others? It ain't my problem that a user won't upgrade.
     
    richard, Sep 23, 2008
    #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. Matt White

    DIV inside DIV overflow issue

    Matt White, Feb 25, 2009, in forum: HTML
    Replies:
    6
    Views:
    3,107
    Chaddy2222
    Feb 26, 2009
  2. K Viltersten

    <div ... /> and <div ...></div>

    K Viltersten, Mar 30, 2009, in forum: ASP .Net
    Replies:
    4
    Views:
    750
  3. Dwayne Madsen

    Q: Div A inside Div B is larger than Div B

    Dwayne Madsen, Jun 1, 2005, in forum: Javascript
    Replies:
    1
    Views:
    191
    David Dorward
    Jun 1, 2005
  4. mscir
    Replies:
    3
    Views:
    315
    Martin Honnen
    Jun 26, 2005
  5. Gernot Frisch

    center div over another div

    Gernot Frisch, Mar 16, 2006, in forum: Javascript
    Replies:
    1
    Views:
    183
    Randy Webb
    Mar 16, 2006
Loading...

Share This Page