float:left in IE5

Discussion in 'HTML' started by chlori, Apr 17, 2004.

  1. chlori

    chlori Guest

    chlori, Apr 17, 2004
    #1
    1. Advertising

  2. chlori wrote:
    > Hi
    >
    > URL:
    > http://stuff.arto.ch/layout.php
    > http://stuff.arto.ch/style.css
    >
    > The content div should be on the right of the menu div. But it's below
    > it instead.
    >
    > In Mozilla it looks ok, but IE5 (Win) not. Is that a browser bug or a
    > mistake I made...?
    >
    > Something wrong with float:left;?


    What happens when you add float: right in #content?
    --
    Edwin van der Vaart
    Edwin van der Vaart, Apr 17, 2004
    #2
    1. Advertising

  3. chlori

    chlori Guest

    Edwin van der Vaart schrieb am 17.04.2004 22:10:
    > What happens when you add float: right in #content?


    The content jumps to the right.

    http://stuff.arto.ch/layout.php

    chlori
    chlori, Apr 17, 2004
    #3
  4. chlori wrote:
    > Edwin van der Vaart schrieb am 17.04.2004 22:10:
    >
    >> What happens when you add float: right in #content?

    >
    >
    > The content jumps to the right.
    >
    > http://stuff.arto.ch/layout.php


    Hmmm. It seems that the content have a conflict with the margins of
    #content.
    So my suggestion is to replace the margins for a width.
    Like:
    #contentcontainer{
    width: 95%;
    background-color: white;
    }

    #content {
    width: 60%;
    float: right;
    padding: 1em;
    }

    #sidebar {
    float: left;
    padding: 1em;
    margin 0;
    width: 30%;
    color: #000;
    background-color: gray;
    }

    Also a suggestion to use percentage or em for the heights and widths,
    that way you have a scalable design.
    --
    Edwin van der Vaart
    Edwin van der Vaart, Apr 17, 2004
    #4
  5. chlori

    Richard Guest

    chlori wrote:

    > Hi


    > URL:
    > http://stuff.arto.ch/layout.php
    > http://stuff.arto.ch/style.css


    > The content div should be on the right of the menu div.
    > But it's below it instead.


    > In Mozilla it looks ok, but IE5 (Win) not. Is that a
    > browser bug or a mistake I made...?


    > Something wrong with float:left;?


    > Thanks
    > chlori


    What you need is my fix for that. Maybe not "my" creation, but it keeps the
    divisions from breaking down like that.

    www.1-large-world.com/samples/sample1.html


    Remove the "float:right;" from the "content" division. It's not needed.

    For text presentation within a division, use padding, not margin.
    Not sure why you want such a huge value for the margin-left in #content
    anyway.
    Richard, Apr 18, 2004
    #5
  6. chlori

    Neal Guest

    On Sat, 17 Apr 2004 20:54:53 +0200, chlori <> wrote:

    > Hi
    >
    > URL:
    > http://stuff.arto.ch/layout.php
    > http://stuff.arto.ch/style.css
    >
    > The content div should be on the right of the menu div. But it's below
    > it instead.
    >
    > In Mozilla it looks ok, but IE5 (Win) not. Is that a browser bug or a
    > mistake I made...?
    >
    > Something wrong with float:left;?


    Something quirky with how IE5 handles widths, most likely. The width of
    the float and/or the content div are likely being miscalculated, leaving
    no room for the content next to the float.

    Google search on IE Box Model Hack.
    Neal, Apr 18, 2004
    #6
  7. chlori

    Richard Guest

    Neal wrote:

    > On Sat, 17 Apr 2004 20:54:53 +0200, chlori <> wrote:


    >> Hi
    >>
    >> URL:
    >> http://stuff.arto.ch/layout.php
    >> http://stuff.arto.ch/style.css
    >>
    >> The content div should be on the right of the menu div. But it's below
    >> it instead.
    >>
    >> In Mozilla it looks ok, but IE5 (Win) not. Is that a browser bug or a
    >> mistake I made...?
    >>
    >> Something wrong with float:left;?


    > Something quirky with how IE5 handles widths, most likely. The width of
    > the float and/or the content div are likely being miscalculated, leaving
    > no room for the content next to the float.


    > Google search on IE Box Model Hack.


    Simple fix to that problem. See my sample posted in the other reply.
    Richard, Apr 18, 2004
    #7
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Fredo Vincentis

    float problems in IE5/Mac

    Fredo Vincentis, Nov 22, 2003, in forum: HTML
    Replies:
    2
    Views:
    415
  2. Tom
    Replies:
    0
    Views:
    1,019
  3. bd
    Replies:
    0
    Views:
    605
  4. Carsten Fuchs
    Replies:
    45
    Views:
    1,505
    James Kanze
    Oct 8, 2009
  5. Cylix

    Problem on float menu in Mac IE5+

    Cylix, Jun 13, 2006, in forum: Javascript
    Replies:
    2
    Views:
    69
    Cylix
    Jun 13, 2006
Loading...

Share This Page