another CSS positioning question....

Discussion in 'HTML' started by Leslie, Nov 1, 2003.

  1. Leslie

    Leslie Guest

    re:
    http://www.bessiebee.com/test/soc_studies_standards_STYLESHEET_TEST.HTML

    This is a work in progress in my efforts to implement CSS. I know
    there are things I need to eliminate, like the spacer.gif, but my
    question, this time, is:

    This page validates as both HTML 4.01 Transitional and CSS. However,
    it displays differently in different browsers. I've checked it with
    IE, Opera and Mozilla.

    In both Opera and Mozilla the <div id="container2"> displays right
    where I want it; at the top of the page and 5 px to the right of the
    graphic. In IE, however, the gap between the graphic and div is much
    wider AND I'm getting a horizontal scroll bar because the text doesn't
    wrap.

    Can someone please tell me what I'm doing wrong?

    Thank you!!

    Leslie
     
    Leslie, Nov 1, 2003
    #1
    1. Advertising

  2. Leslie

    Eric Bohlman Guest

    Leslie <> wrote in
    news::

    > In both Opera and Mozilla the <div id="container2"> displays right
    > where I want it; at the top of the page and 5 px to the right of the
    > graphic. In IE, however, the gap between the graphic and div is much
    > wider AND I'm getting a horizontal scroll bar because the text doesn't
    > wrap.
    >
    > Can someone please tell me what I'm doing wrong?


    Trying to specify the horizontal position of an absolutely positioned
    element by using a margin rather than a position. Change "margin-top" to
    simply "top."
     
    Eric Bohlman, Nov 1, 2003
    #2
    1. Advertising

  3. Leslie

    Leslie Guest

    On 1 Nov 2003 22:56:14 GMT, Eric Bohlman <>
    wrote:

    >Leslie <> wrote in
    >news::
    >
    >> In both Opera and Mozilla the <div id="container2"> displays right
    >> where I want it; at the top of the page and 5 px to the right of the
    >> graphic. In IE, however, the gap between the graphic and div is much
    >> wider AND I'm getting a horizontal scroll bar because the text doesn't
    >> wrap.
    >>
    >> Can someone please tell me what I'm doing wrong?

    >
    >Trying to specify the horizontal position of an absolutely positioned
    >element by using a margin rather than a position. Change "margin-top" to
    >simply "top."


    But, "margin-top" is used in "#container1" and I don't use that
    anywhere on the web page. Having an unused style in the stylesheet
    won't affect the web page, will it? And, would that explain why I've
    got a horizontal scroll bar in IE but not Opera or Mozilla?

    Leslie
     
    Leslie, Nov 2, 2003
    #3
  4. Leslie

    Eric Bohlman Guest

    Leslie <> wrote in
    news::

    > On 1 Nov 2003 22:56:14 GMT, Eric Bohlman <>
    > wrote:
    >>Trying to specify the horizontal position of an absolutely positioned
    >>element by using a margin rather than a position. Change "margin-top"
    >>to simply "top."

    >
    > But, "margin-top" is used in "#container1" and I don't use that
    > anywhere on the web page. Having an unused style in the stylesheet
    > won't affect the web page, will it? And, would that explain why I've
    > got a horizontal scroll bar in IE but not Opera or Mozilla?


    My fault. I meant to write "margin-left" and "left."

    If you specify only one dimension when doing positioning, the other one
    defaults to "auto" which gives the browser some discretion in layout, and
    different browsers will come up with different results.
     
    Eric Bohlman, Nov 2, 2003
    #4
  5. Leslie

    Leslie Guest

    On 2 Nov 2003 02:12:51 GMT, Eric Bohlman <>
    wrote:

    >Leslie <> wrote in
    >news::
    >
    >> On 1 Nov 2003 22:56:14 GMT, Eric Bohlman <>
    >> wrote:
    >>>Trying to specify the horizontal position of an absolutely positioned
    >>>element by using a margin rather than a position. Change "margin-top"
    >>>to simply "top."

    >>
    >> But, "margin-top" is used in "#container1" and I don't use that
    >> anywhere on the web page. Having an unused style in the stylesheet
    >> won't affect the web page, will it? And, would that explain why I've
    >> got a horizontal scroll bar in IE but not Opera or Mozilla?

    >
    >My fault. I meant to write "margin-left" and "left."
    >
    >If you specify only one dimension when doing positioning, the other one
    >defaults to "auto" which gives the browser some discretion in layout, and
    >different browsers will come up with different results.


    That did it! Thank you very much!!

    Leslie
     
    Leslie, Nov 2, 2003
    #5
    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 Beckwith

    Absolute Positioning (CSS Question)

    Matt Beckwith, Jul 18, 2003, in forum: HTML
    Replies:
    4
    Views:
    1,863
  2. Pat Traynor
    Replies:
    3
    Views:
    671
    Sid Ismail
    Sep 24, 2003
  3. Leslie

    css positioning question

    Leslie, Oct 11, 2003, in forum: HTML
    Replies:
    23
    Views:
    911
    Fredo Vincentis
    Nov 10, 2003
  4. Spartanicus

    Basic CSS positioning Question??

    Spartanicus, Sep 5, 2004, in forum: HTML
    Replies:
    11
    Views:
    581
  5. Spartanicus
    Replies:
    0
    Views:
    419
    Spartanicus
    Jan 25, 2005
Loading...

Share This Page