Results 1 to 7 of 7

Thread: Border size in Firefox and IE
      
   

  1. #1
    zigzag's Avatar
    zigzag is offline Captain
    Join Date
    Apr 2006
    Location
    Durban, South Africa
    Posts
    206

    Question 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,

  2. #2
    zigzag's Avatar
    zigzag is offline Captain
    Join Date
    Apr 2006
    Location
    Durban, South Africa
    Posts
    206

    Default 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

  3. #3
    navaldesign's Avatar
    navaldesign is offline General & Forum Moderator
    Join Date
    Oct 2005
    Location
    Italy
    Posts
    12,115

    Default 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!


  4. #4
    zigzag's Avatar
    zigzag is offline Captain
    Join Date
    Apr 2006
    Location
    Durban, South Africa
    Posts
    206

    Default 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,

  5. #5
    navaldesign's Avatar
    navaldesign is offline General & Forum Moderator
    Join Date
    Oct 2005
    Location
    Italy
    Posts
    12,115

    Default 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!


  6. #6
    bill2006's Avatar
    bill2006 is offline Lieutenant General
    Join Date
    May 2006
    Posts
    3,422

    Default 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.

  7. #7
    zigzag's Avatar
    zigzag is offline Captain
    Join Date
    Apr 2006
    Location
    Durban, South Africa
    Posts
    206

    Default 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,

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

     

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49