Results 1 to 9 of 9

Thread: IE7 problem with center / firefox good???

  1. #1
    Join Date
    Dec 2005
    Posts
    133
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default IE7 problem with center / firefox good???

    https://www.logicweb.com/billing

    This is properly centered in Firefox 2, but not in IE7 and I cannot for the life of me figure out why. The site in general works fine in Firefox and IE7, except the billing area which has its own stylesheet.css file (along with my site's own css files). I do not know where the issue is causing IE7 not to be centered. Any help is appreciated.

    Not only that, the footer appears crushed in IE7 (footer is the blue rectangle area with the text menu, see screenshot).

    Talk Jesus Forums [ Over 100 Fulfilled Prophecies in the Bible ]
    .....................................................................................
    LogicWeb [ Awesome Web Hosting Since 2004 ]

  2. #2
    Join Date
    May 2006
    Location
    Sydney, Australia - Near the coast.
    Posts
    1,995
    Thanks
    0
    Thanked 8 Times in 7 Posts

    Default

    When you align <div>s with IE, you'll need to add margin:0 auto; with text-align:center;
    Peter - alotofstuffhere[dot]com - Email Me - Donate via PayPal - Got spare hardware? Donate 'em to me :) Just send me a PM.
    Currently: enjoying the early holidays :)
    Read before posting: FAQ | What you CAN'T do with JavaScript | Form Rules | Thread Title Naming Guide

  3. #3
    Join Date
    Dec 2005
    Posts
    133
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Thanks for the reply. Could you please explain which code I should fix and what the exact code should be? Unfortunately the original designer of the site left me hanging here and I'm just a learner at this stage.
    Talk Jesus Forums [ Over 100 Fulfilled Prophecies in the Bible ]
    .....................................................................................
    LogicWeb [ Awesome Web Hosting Since 2004 ]

  4. #4
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    30,495
    Thanks
    82
    Thanked 3,449 Times in 3,410 Posts
    Blog Entries
    12

    Default

    Instead, I would recommend using a strict DOCTYPE for that page, replace:

    Code:
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
    with:

    Code:
    <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
    After that, the <br> clear kludge won't work in FF, so change:

    Code:
    <br style="clear:both;" />
    <br />
    
    <div class="f_cc">
    <h4 class="footer-navigation-cc">
    <img alt="Credit Cards" src="/images/accept.gif" width="750" height="50" /></h4>
    </div>
    </div>
    </div>
    
    </body>
    to:

    Code:
    <br />
    <div style="clear:both;height:65px;">
    
    <div class="f_cc">
    <h4 class="footer-navigation-cc">
    <img alt="Credit Cards" src="/images/accept.gif" width="750" height="50" /></h4>
    </div>
    </div>
    </div>
    </div>
    
    </body>
    - John
    ________________________

    Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate

  5. #5
    Join Date
    Dec 2005
    Posts
    133
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Thanks, that helped but with abnormal side effects.

    I tried the doctype that I'm using throughout the site itself and it worked too

    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">


    But, there is one problem now. The graph bars no longer appear (also did not appear with your suggested doctype). Its being conflicted somewhere. The billing system was created a few years ago where things where less 'standard' at the time.
    Talk Jesus Forums [ Over 100 Fulfilled Prophecies in the Bible ]
    .....................................................................................
    LogicWeb [ Awesome Web Hosting Since 2004 ]

  6. #6
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    30,495
    Thanks
    82
    Thanked 3,449 Times in 3,410 Posts
    Blog Entries
    12

    Default

    What page is that from? Anyways, in standards mode, most browsers require that units in style for width, height, margins, padding, top and left be specified. That old outmoded DOCTYPE would let you use:

    Code:
    #someId {
    width:30;
    }
    In standards mode, you need:

    Code:
    #someId {
    width:30px;
    }
    This is also true of inline style, and scripted style changes or assignments, but not for element attributes.

    So, actually, the advice given by tech_support might not be so bad in this case, because unless you are willing to go and debug that other stuff, you will have to stick with quirks mode.

    To follow tech_support's advice, you must find where margins are set to auto, and either center that element via its style or its parent's style, if no parent exists, one must be written into the code. Like:

    Code:
    #header{
    
    margin:auto;
    
    width:834px;
    
    }
    Becomes:

    Code:
    #header{
    
    margin:auto;
    text-align:center;
    width:834px;
    
    }
    OR, if that doesn't work, a container division must be placed entirely around the header element with its text-align property set to center. If there is already a container, you may set its text-align property to center.
    - John
    ________________________

    Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate

  7. #7
    Join Date
    Dec 2005
    Posts
    133
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    This is very confusing. You see, everything works fine in Firefox.

    In IE7, this odd is that the login page is properly centered BUT once you login, it is left aligned again???

    I tried using these and they were left aligned in IE

    <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 3.2//EN" "http://www.w3.org/TR/html3/strict.dtd">

    <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">

    (this one even screwed up firefox within the billing system after login)


    text-align:center; messed up the top menu by aligning them center which I do not want either.
    Talk Jesus Forums [ Over 100 Fulfilled Prophecies in the Bible ]
    .....................................................................................
    LogicWeb [ Awesome Web Hosting Since 2004 ]

  8. #8
    Join Date
    Dec 2005
    Posts
    133
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    This method works but has one major issue which oddly affects firefox only (go figure)

    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">


    See attached. The first image is the top of the menu, then there is a HUGE almost entire body of white below it, then the client profile is stacked on top of the footer. Its crazy.

    I've attached the php file that involves this.
    Talk Jesus Forums [ Over 100 Fulfilled Prophecies in the Bible ]
    .....................................................................................
    LogicWeb [ Awesome Web Hosting Since 2004 ]

  9. #9
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    30,495
    Thanks
    82
    Thanked 3,449 Times in 3,410 Posts
    Blog Entries
    12

    Default

    Quote Originally Posted by Chadi View Post
    text-align:center; messed up the top menu by aligning them center which I do not want either.
    Well, once you've begun aligning things to center:

    HTML Code:
    <div style="text-align:center;">
    This is in the center.
    </div>
    Everything in there will be centered, unless you change it:

    HTML Code:
    <div style="text-align:center;border:2px solid red;">
    <div style="text-align:left;width:50%;margin:0 auto;border:2px solid green;">
    This is aligned left and, since its width is less than its parent,
    it's in the center of its centering parent.
    </div>
    This is in the center.
    </div>
    - John
    ________________________

    Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate

Bookmarks

Posting Permissions

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