+ Reply to Thread
Results 1 to 4 of 4

Thread: Problems with IE 7

  1. #1
    Twinkie is offline Banned Twinkie is an unknown quantity at this point
    Join Date
    Sep 2007
    Location
    Ft. Lauderdale, Florida
    Posts
    1,389

    Problems with IE 7

    I made a pretty decent layout that works in all popular browsers of the latest versions. However, I am facing a float issues in the bottom of the page in IE 7, which is unfortunately the browser that my school uses and therefore my target audience. I can't for the life of me find out why. Please view the link below in IE 8 compatibility mode and notice how it mutilates the bottom bar.

    http://twinkie.pcriot.com/math

    Thank you misson for showing me where I can learn to use floats properly. I read extensively on them, their models, ect. Now, I need to learn to deal with IE and floats....
    Last edited by Twinkie; 01-11-2010 at 08:52 PM. Reason: link malfunction

  2. #2
    misson is offline x10 Spammer misson is a jewel in the rough
    Join Date
    Mar 2008
    Location
    Libertatia
    Posts
    2,506

    Re: Problems with IE 7

    Floated elements are generally positioned to the side of elements that follow them in document order. Place #bottom_right immediately after #bottom_left, before the other content in #bottom.

    An alternative that doesn't depend on document order is to use absolute positioning. Create PNGs with the background color portion visible and the foreground transparent. Make sure you test the colors in the major browsers, which vary in their handling of gamma and color spaces (you might need to include or exclude these in the image). Insert those images as you will (setting them as the backgrounds of four <div>s is the easiest to theme) and absolutely position the elements.

    These are only two of many rounded corner options.
    Last edited by misson; 01-11-2010 at 11:18 PM.
    Be sure to read all pages linked in this post; they have further information that should prove useful. When asking for help, make sure you follow Eric Raymond's and Jon Skeet's guidelines for prompt, accurate responses. Please answer any questions I ask; they're not rhetorical (probably). Any posted code is intended as illustrative example, rather than a solution to your problem to be copied without alteration. Study it to learn how to write your own solution.
    Misson, not Mission.

  3. #3
    Twinkie is offline Banned Twinkie is an unknown quantity at this point
    Join Date
    Sep 2007
    Location
    Ft. Lauderdale, Florida
    Posts
    1,389

    Re: Problems with IE 7

    I don't understand. I did place them in order of how it was to be displayed. How can I put the text after the corners in the document order and still have it display beside them (it did work I am just trying to understand)?

    I thought that the floats were messing up because they were block elements, so I switched the display to inline-block.

  4. #4
    misson is offline x10 Spammer misson is a jewel in the rough
    Join Date
    Mar 2008
    Location
    Libertatia
    Posts
    2,506

    Re: Problems with IE 7

    Quote Originally Posted by Twinkie View Post
    I don't understand. I did place them in order of how it was to be displayed.
    Display order induced by document order is the "flow". The whole point of floating, absolute positioning and fixed positioning is to position elements outside of the flow--to use something other than document order for positioning. Placing elements in the document in the order you want them displayed is precisely what you shouldn't do. You don't want left floated elements, followed by content, followed by right floated elements. You want left & right floated elements followed by content.
    HTML Code:
            <div id="bottom">
                <div id="bottom_left"></div>
        	    <div id="bottom_right"></div>
    	    Visit Number 276162
           </div>
    What's supposed to happen is floated elements get shifted to the left (or right) until they're up against another float. Line boxes are thinned to fit in between floats. Block boxes are unaffected (a block's left margin will be to the left of left-floats). IE 7's behavior is non-compliant, but consistent: floats are placed next to content that follows them and placed below content that's before the float. Specifically, IE violates rule 8 of the float behavior rules, which specifies that floats should be placed as high as possible. It also violates the fourth paragraph of CSS 2.1, § 9.5 Floats:
    Any content in the current line before a floated box is reflowed in the first available line on the other side of the float. In other words, if inline boxes are placed on the line before a left float is encountered that fits in the remaining line box space, the left float is placed on that line, aligned with the top of the line box, and then the inline boxes already on the line are moved accordingly to the right of the float (the right being the other side of the left float) and vice versa for rtl and right floats.
    The standard specifies that if an element has block level children, then inline children are placed in anonymous block boxes (the block boxes don't actually have to be created, but the page must be rendered as if they do). In this case, the anonymous block boxes aren't positioned, so should flow as if the floats didn't exist. IE probably treats the anonymous block box as a block-level element, so the (block level) #bottom_right gets moved underneath the content. That is, IE treats it as:
    HTML Code:
            <div id="bottom">
                <div id="bottom_left"></div>
    	    <div>Visit Number 276162</div>
        	    <div id="bottom_right"></div>
           </div>
    though it shouldn't, because a block box ≠ a block level element.
    Last edited by misson; 01-12-2010 at 04:16 AM.
    Be sure to read all pages linked in this post; they have further information that should prove useful. When asking for help, make sure you follow Eric Raymond's and Jon Skeet's guidelines for prompt, accurate responses. Please answer any questions I ask; they're not rhetorical (probably). Any posted code is intended as illustrative example, rather than a solution to your problem to be copied without alteration. Study it to learn how to write your own solution.
    Misson, not Mission.

+ Reply to Thread

Similar Threads

  1. Paid account.. Will it fix problems?
    By altrock182182 in forum Free Hosting
    Replies: 3
    Last Post: 01-14-2008, 04:23 PM
  2. NOTE: For all problems regarding phpBB3 RC6
    By CrownVictoriaCop in forum Free Hosting
    Replies: 1
    Last Post: 10-14-2007, 03:35 PM
  3. Problems...problems...problems...
    By eternal-empire in forum Free Hosting
    Replies: 4
    Last Post: 09-21-2007, 03:53 PM
  4. problems, problems
    By joandajer in forum Free Hosting
    Replies: 5
    Last Post: 01-29-2006, 04:47 PM
  5. more problems after reseting pass
    By rahul2006 in forum Free Hosting
    Replies: 6
    Last Post: 11-10-2005, 08:06 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
x10hosting free hosting for the masses
dedicated servers