Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 4 of 4
  1. #1
    New to the CF scene
    Join Date
    Jul 2007
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Angry Shrinking Divs in IE6 (fine in FF)

    I am working on a "blog"-type project for different committees of the University I am working for. The "blog" allows the various committees to post updates on the status of their committee. All the posts for a particular academic year are listed on one page. (The actual posts are stored in a MySQL database and retrieved with PHP).

    The project is nearly complete except for a disturbing visual problem in IE6. On pages that have multiple posts on them, the div container that holds posts is repeated for each post. In Firefox these containers appear correctly. In IE6, the containers get thinner (ie: the width seems to shrink) with each repetition, until the text begins to bleed out of the container on both sides. Obviously since a decent number of people still use IE6 this is unacceptable.

    I have run W3C validators on both my XHTML and CSS and both validate. I have visually checked my XHTML, CSS, PHP, and even the contents of my database multiple times to look for errors and can't find anything that would cause this.

    At this point I do not know what else to check. If anyone could give me any suggestions it would be GREATLY appreciated.

    You can see an example of the problem here: https://webapptst.lasalle.edu/stu_af...&year=2004&m=1
    Last edited by Kirsehn; 07-18-2007 at 04:22 PM. Reason: Forgot to give link

  • #2
    Supreme Master coder! _Aerospace_Eng_'s Avatar
    Join Date
    Dec 2004
    Location
    In a place far, far away...
    Posts
    19,291
    Thanks
    2
    Thanked 1,043 Times in 1,019 Posts
    Hmm remove any whitespace before your doctype including blank lines. Anything above the doctype will cause IE6 to go into quirks mode causing it to render some things incorrectly. If that doesn't work then look into the box model problem.
    http://css.maxdesign.com.au/listamat...t-boxmodel.htm

    Using an XHTML Strict doctype seems to fix the problem.
    Last edited by _Aerospace_Eng_; 07-18-2007 at 06:53 PM.
    ||||If you are getting paid to do a job, don't ask for help on it!||||

  • #3
    New to the CF scene
    Join Date
    Jul 2007
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Smile

    Thanks for the reply

    I actually came back to post that I have found a solution to the problem.

    After doing some reading I realized that the problem could be related to the "hasLayout" property in Internet Explorer. The "post" DIV I was using had no width or height defined so might "have a layout." To set "hasLayout" to true I set a height: 1% on the post DIV and the problem disappeared.

    More information can be found here:

    http://www.satzansatz.de/cssd/onhavinglayout.html

  • #4
    Supreme Master coder! _Aerospace_Eng_'s Avatar
    Join Date
    Dec 2004
    Location
    In a place far, far away...
    Posts
    19,291
    Thanks
    2
    Thanked 1,043 Times in 1,019 Posts
    Rather than use a hack you can use a strict doctype and the problem is also fixed.
    ||||If you are getting paid to do a job, don't ask for help on it!||||


  •  

    Posting Permissions

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