Border size in Firefox and IE

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts
  • zigzag
    Captain

    • Apr 2006
    • 206

    Border size in Firefox and IE

    This code is inserted in the html box positioned at 0,0

    <div style= "border:2px solid #8b0000;width:765;height:682px;position:absolute;l eft:2px;top:26px"></DIV>

    The border height and width are correct in IE.
    When using Firefox, the border height is 4 pixels too high and 4 pixels too wide. The x,y start point is correct.

    It looks like Firefox is counting the pixels "inside" the border box, and IE is counting the pixels including the border. I say this because the Firefox 'error' increases if I increase the border width.

    Can someone please give me a workaround, if my assumptions are correct.

    Regards,
    Royden

    www.harrow-art.com
    www.harrow.co.za
  • zigzag
    Captain

    • Apr 2006
    • 206

    #2
    Re: Border size in Firefox and IE

    If there is anyone with both browsers installed please go to my site (using both browsers) to see what I am talking about.

    Thanks
    Royden

    www.harrow-art.com
    www.harrow.co.za

    Comment

    • navaldesign
      General & Forum Moderator

      • Oct 2005
      • 12080

      #3
      Re: Border size in Firefox and IE

      You are correct. FF displays the grey border above the brown one. I suggest you go back in BV and set the grey to be to the back layer, this should solve your problem anyway.
      Navaldesign
      Logger Lite: Low Cost, Customizable, multifeatured Login script
      Instant Download Cart: a Powerfull, Customized, in site, DB driven, e-products Cart
      DBTechnosystems.com Forms, Databases, Shopping Carts, Instant Download Carts, Loggin Systems and more....
      Advanced BlueVoda Form Processor : No coding form processor! Just install and use! Now with built in CAPTCHA!

      Comment

      • zigzag
        Captain

        • Apr 2006
        • 206

        #4
        Re: Border size in Firefox and IE

        Thanks for your interest, navaldesign. I was starting to feel ignored.
        The grey border is intended to be a sort of shadow, and is only on 2 sides.

        I could solve the problem, by creating a rectangle shape with a border, the size that I need. This works, but would cost 5kb. Besides, I am on a mission to get this to work.

        So I am trying to put a variable, depending on the browser, in place of the <div style = "... height:682; ...>

        The top part of this code works. when pasted into the html box.


        <script>
        borderObj=new Object()
        borderObj.style='2px solid #8b0000'
        borderObj.width='765px'
        borderObj.height='100'
        borderObj.position='absolute'
        borderObj.left='2px'
        borderObj.top='26px'

        var browser=navigator.appName
        if (browser==("Microsoft Internet Explorer"))
        {borderObj.height='682'}
        else
        {borderObj.height='678'}
        </script>
        <!-- BORDER -->
        <div style= "border:2px solid #8b0000;width:765;height:682;position:absolute;lef t:2px;top:26px"></DIV>
        <script>
        document.write(borderObj.height)
        </script>

        It's a slow process for me because I have to look up the syntax for every line of code on the internet. Someone with experience may solve the problem in a jiffy. How do I get the contents of borderObj.height (and width) into my <div for the border?

        Regards,
        Royden

        www.harrow-art.com
        www.harrow.co.za

        Comment

        • navaldesign
          General & Forum Moderator

          • Oct 2005
          • 12080

          #5
          Re: Border size in Firefox and IE

          Sorry, i know very little of Javascript. But i think that enyone who uses BV does it because of the ease of use. So i would look for a graphical solution to my problem.Just rearrange your shapes to have excactly what you want without involving coding.
          Navaldesign
          Logger Lite: Low Cost, Customizable, multifeatured Login script
          Instant Download Cart: a Powerfull, Customized, in site, DB driven, e-products Cart
          DBTechnosystems.com Forms, Databases, Shopping Carts, Instant Download Carts, Loggin Systems and more....
          Advanced BlueVoda Form Processor : No coding form processor! Just install and use! Now with built in CAPTCHA!

          Comment

          • bill2006
            Lieutenant General

            • May 2006
            • 3421

            #6
            Re: Border size in Firefox and IE

            Also notice that your scroll bar changes colors from IE6 (brown) to FireFox (light blue) actually like this one more as less distracting - doesn't steal from your site content.
            Bill
            www.blueearthtea.com
            www.ftaaconsulting.com
            www.iaval.com
            www.theemeraldbay.com

            Comment

            • zigzag
              Captain

              • Apr 2006
              • 206

              #7
              Re: Border size in Firefox and IE

              Thanks Guys. I have solved the problem by creating a table with 1 row, 1 cell, and a 2px border. Firefox is OK with this.

              Thanks Bill2006 for pointing out the scroll bar thing. I hadn't noticed, and I think you are correct. I'll go back to the defaults.

              Another quirk of firefox is that my menu moves independantly of the page when you drag one of the side panels and make the page smaller.

              Regards,
              Royden

              www.harrow-art.com
              www.harrow.co.za

              Comment

              Working...
              X