help with image way off to the right

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • timmyb

    help with image way off to the right

    I have an image that is supposed to be in a centered div in the center
    of a page. It looks fine in IE7. But in Firefox, the image is pushed
    way over to the right.



    I've tried adding display:block; directives to the div, to the div
    above it and to the containing div, to no avail.

    I've also tried clearing below the navigation bar and that hasn't
    helped either.

    As background, the page is identical to

    except that the index1-test.php page uses a different navigation bar.
    The index1.php, with the old nav bar, looks fine in both IE7 and
    Firefox.

    What might be causing Firefox to push the image so far off to the
    right?

    Thanks for any help.

    Tim

  • dorayme

    #2
    Re: help with image way off to the right

    In article
    <1190945999.077 337.174310@k79g 2000hse.googleg roups.com>,
    timmyb <tbarmann92@gma il.comwrote:
    I have an image that is supposed to be in a centered div in the center
    of a page. It looks fine in IE7. But in Firefox, the image is pushed
    way over to the right.
    >

    >
    I've tried adding display:block; directives to the div, to the div
    above it and to the containing div, to no avail.
    >
    I've also tried clearing below the navigation bar and that hasn't
    helped either.
    You could try a bigger dimension for bottom margin in

    #menuh-container
    {
    font-size: 1em;
    position: relative;
    top:0;
    left: 5%;
    width: 90%;
    margin: 10px 10px *60px* 10px;
    display:block;
    }

    (btw ems would be better than px for scalability... )

    --
    dorayme

    Comment

    • Safalra

      #3
      Re: help with image way off to the right

      On Fri, 28 Sep 2007 02:19:59 -0000, timmyb wrote:
      [...]
      >

      >
      [...]
      >
      As background, the page is identical to

      except that the index1-test.php page uses a different navigation bar.
      The index1.php, with the old nav bar, looks fine in both IE7 and
      Firefox.

      An addition to the image problem, there are two issues with your navigation
      bar that you might want to correct. In Firefox the 'Gallery' link only
      displays the rollover colour when the mouse if over its top half. In IE6
      the gallery submenu doesn't show up at all.


      --
      Safalra (Stephen Morley)

      Comment

      • timmyb

        #4
        Re: help with image way off to the right

        Hi Dorayme,
        That did solve the problem, but created another: the page looks fine
        in FF, but in IE7, the picture is too far down below the nav bar. In
        any event, I think I figured out what I was doing wrong -- for my
        clearer class, I was using a span instead of a div. Using a div seems
        to have solved the problem. (Though there are still differences in the
        the way IE7 and FF render the bottom margin you suggested changing.)

        Thanks for your help!

        Comment

        • timmyb

          #5
          Re: help with image way off to the right

          Hi Stephen,
          An addition to the image problem, there are two issues with your navigation
          bar that you might want to correct. In Firefox the 'Gallery' link only
          displays the rollover colour when the mouse if over its top half.
          I don't follow what you mean. I don't see a difference between FF and
          IE7 in how the menu/submenu behaves. I am using FF v. 2.0.0.7 to test.

          In IE6
          the gallery submenu doesn't show up at all.
          Not good. Any idea why that might be? I don't have IE6 handy, but
          will later on today.

          Thanks for your help.
          Tim

          Comment

          • Safalra

            #6
            Re: help with image way off to the right

            On Fri, 28 Sep 2007 12:58:58 -0000, timmyb wrote:
            Hi Stephen,
            >
            >An addition to the image problem, there are two issues with your navigation
            >bar that you might want to correct. In Firefox the 'Gallery' link only
            >displays the rollover colour when the mouse if over its top half.
            >
            I don't follow what you mean. I don't see a difference between FF and
            IE7 in how the menu/submenu behaves. I am using FF v. 2.0.0.7 to test.

            I'm also using Firefox 2.0.0.7. When I move over the 'Galleries' link its
            background changes to grey as you intend, but only if the pointer is more
            than about half way up the text - the grey background disappears if I move
            the pointer into the lower half of the grey area. This does not happen with
            the other links, where I can move the pointer to the bottom of the grey
            area before the background resets to black.


            --
            Safalra (Stephen Morley)

            Comment

            • Jonathan N. Little

              #7
              Re: help with image way off to the right

              timmyb wrote:
              Hi Stephen,
              >
              >An addition to the image problem, there are two issues with your navigation
              >bar that you might want to correct. In Firefox the 'Gallery' link only
              >displays the rollover colour when the mouse if over its top half.
              >
              I don't follow what you mean. I don't see a difference between FF and
              IE7 in how the menu/submenu behaves. I am using FF v. 2.0.0.7 to test.
              >
              In IE6
              >the gallery submenu doesn't show up at all.
              >
              Not good. Any idea why that might be? :
              Yep. As you know MSIE does not support :hover on element other than A
              with HREF attributes, i.e., links. So you are using a csshover.htc

              You csshover.htc does seem to work for MSIE6 and a bit complicated. I
              have a much simpler htc solution your can see at:


              Amberlithe Ibizan Hounds Dog Profiles

              Where I use in on the left-hand Profile Index menu. The hover is on a DIV

              all you have to do is as a special class named 'hover' for what ever
              your have a hover on.

              From the modern browser version:
              li.special:hove r {...}

              to add MSIE support:
              li.special:hove r,
              li.special.hove r {...}

              then attach the HTC:
              li.special { behavior: url(IEFixes.htc ); }

              Here is IEFixes.htc:
              //--------------------------start cut --------------------
              <public:compone nt>
              // For MSIE use JScript to attach JS functions to compensate
              // for missing pseudo-class support
              // from Vladdy http://www.vladdy.net/Demos/IEPseudoClassesFix.html
              // updated for html4.01 jnl 3/06
              <public:attac h event="onmouseo ver" onevent="DoHove r()">
              <public:attac h event="onmouseo ut" onevent="Restor eHover()">
              <public:attac h event="onmoused own" onevent="DoActi ve()">
              <public:attac h event="onmouseu p" onevent="Restor eActive()">
              <script type="text/jscript">
              function DoHover(){
              element.classNa me += ' hover';
              }
              function DoActive(){
              element.classNa me += ' active';
              }
              function RestoreHover(){
              element.classNa me = element.classNa me.replace(/\shover\b/,'');
              }
              function RestoreActive() {
              element.classNa me = element.classNa me.replace(/\sactive\b/,'');
              }
              </script>
              </public:componen t>
              //-------------------------- end cut ---------------------

              I don't have IE6 handy, but
              will later on today.
              Well why don't you install it? I have version 4-7 installed. Unless you
              have Vista.

              A world community for web developers, evolt.org promotes the mutual free exchange of ideas, skills and experiences.

              evolt.org - Browser Archive



              --
              Take care,

              Jonathan
              -------------------
              LITTLE WORKS STUDIO

              Comment

              • timmyb

                #8
                Re: help with image way off to the right

                I'm also using Firefox 2.0.0.7. When I move over the 'Galleries' link its
                background changes to grey as you intend, but only if the pointer is more
                than about half way up the text - the grey background disappears if I move
                the pointer into the lower half of the grey area. This does not happen with
                the other links, where I can move the pointer to the bottom of the grey
                area before the background resets to black.
                I see what you mean. I can live with that, even though I don't
                understand why it's doing that.

                Thanks for pointing this out.
                Tim

                Comment

                • Jonathan N. Little

                  #9
                  Re: help with image way off to the right

                  timmyb wrote:
                  Not good. Any idea why that might be? I don't have IE6 handy, but
                  will later on today.
                  BTW another way you can help yourself with MSIE is dump the XHTML. Use
                  HTML 4.01 strict because your currently only transitional serving your
                  XHTML as text/html. If you did it properly you'd lose all MSIE support!

                  --
                  Take care,

                  Jonathan
                  -------------------
                  LITTLE WORKS STUDIO

                  Comment

                  • Bergamot

                    #10
                    Re: help with image way off to the right

                    timmyb wrote:
                    Safalra wrote:
                    >I'm also using Firefox 2.0.0.7. When I move over the 'Galleries' link its
                    >background changes to grey as you intend, but only if the pointer is more
                    >than about half way up the text
                    >
                    I see what you mean. I can live with that, even though I don't
                    understand why it's doing that.
                    Learn how to use the Web Developer Extension for Firefox. It is an
                    invaluable debugging tool. If you don't have it, go get it right now.

                    Turn on Outlines for Positioned elements, then put the mouse cursor over
                    the Galleries link. You'll see for yourself what the problem is.
                    Correcting it is something else, of course. ;)

                    --
                    Berg

                    Comment

                    • Blinky the Shark

                      #11
                      Re: help with image way off to the right

                      Bergamot wrote:
                      timmyb wrote:
                      >Safalra wrote:
                      >>I'm also using Firefox 2.0.0.7. When I move over the 'Galleries' link its
                      >>background changes to grey as you intend, but only if the pointer is more
                      >>than about half way up the text
                      >>
                      >I see what you mean. I can live with that, even though I don't
                      >understand why it's doing that.
                      >
                      Learn how to use the Web Developer Extension for Firefox. It is an
                      invaluable debugging tool. If you don't have it, go get it right now.
                      Isn't that one a beaut? I gave it another workout tonight dealing with
                      some positioning changes. Huge help. I give it five shark fins out of
                      five.


                      --
                      Blinky RLU 297263
                      Killing all posts from Google Groups
                      The Usenet Improvement Project - http://improve-usenet.org

                      Comment

                      • Ian Hobson

                        #12
                        Re: help with image way off to the right

                        timmyb wrote:
                        >I'm also using Firefox 2.0.0.7. When I move over the 'Galleries' link its
                        >background changes to grey as you intend, but only if the pointer is more
                        >than about half way up the text - the grey background disappears if I move
                        >the pointer into the lower half of the grey area. This does not happen with
                        >the other links, where I can move the pointer to the bottom of the grey
                        >area before the background resets to black.
                        >
                        I see what you mean. I can live with that, even though I don't
                        understand why it's doing that.
                        Its the margin and padding on the pop-down menu element.

                        If you change the

                        #menuh ul ul

                        entry to be

                        padding: 0;
                        margin: 0;

                        it looks OK in Firefox.

                        What it would do in IE6 I can't tell.

                        Ian

                        Comment

                        Working...