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 9 of 9
  1. #1
    Senior Coder
    Join Date
    Dec 2005
    Location
    Slovenia
    Posts
    1,963
    Thanks
    120
    Thanked 76 Times in 76 Posts

    float within margin 0 auto

    Obviously need image of flag and text floated left within yellow box.

    http://agrozoo.net/jsp/Galery_list_o...ses.jsp?p1=500

    And it turns out good in IE but not in FF and GC.
    Any tip ?
    Found a flower or bug and don't know what it is ?
    agrozoo.net galery
    if you don't spot search button at once, there is search form:
    agrozoo.net galery search

  • #2
    Regular Coder
    Join Date
    Jan 2009
    Posts
    193
    Thanks
    0
    Thanked 20 Times in 20 Posts
    Link doesn't work for me.

  • #3
    Senior Coder
    Join Date
    Jun 2008
    Location
    New Jersey
    Posts
    2,536
    Thanks
    45
    Thanked 259 Times in 256 Posts
    Any particular reason you float the text? If you want it to appear just right of the flag, give it a left margin.

    Also, it doesn't work in IE, nor should it. As the container div has no height (floated content does not contribute to the height of a parent), it appears at its minimum height.

    You can add something with a clear at the bottom (<br style="clear: both">) or give the text a left margin instead of floating it, and it'll work fine.

  • #4
    Senior Coder
    Join Date
    Dec 2005
    Location
    Slovenia
    Posts
    1,963
    Thanks
    120
    Thanked 76 Times in 76 Posts
    It does work in IE 7.0 for me.

    give it a left margin.
    Or pos absolute ... Then I have to adyust thing on each text change.

    The reason: want to nicely verticaly align flags.

    EDIT: will try the left margin thing ....
    Last edited by BubikolRamios; 07-09-2010 at 07:16 AM.
    Found a flower or bug and don't know what it is ?
    agrozoo.net galery
    if you don't spot search button at once, there is search form:
    agrozoo.net galery search

  • #5
    Senior Coder
    Join Date
    Dec 2005
    Location
    Slovenia
    Posts
    1,963
    Thanks
    120
    Thanked 76 Times in 76 Posts
    Nope. This is how it should look and it does work in ie 7.

    Found a flower or bug and don't know what it is ?
    agrozoo.net galery
    if you don't spot search button at once, there is search form:
    agrozoo.net galery search

  • #6
    Supreme Master coder! abduraooft's Avatar
    Join Date
    Mar 2007
    Location
    N/A
    Posts
    14,855
    Thanks
    160
    Thanked 2,223 Times in 2,210 Posts
    Blog Entries
    1
    Set overflow:auto to that outer div.

    PS: Excessive use of inline styles is really very bad!
    The Dream is not what you see in sleep; Dream is the thing which doesn't let you sleep. --(Dr. APJ. Abdul Kalam)

  • #7
    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
    Quote Originally Posted by BubikolRamios View Post
    Nope. This is how it should look and it does work in ie 7.

    Yes it does work in IE but it shouldn't. The floats are taken out of flow. It should fail. Any other browser and it doesn't work. They all behave the same except IE. The suggestion of overflow:auto; will work fine. Basically you just need to clear your floats.
    ||||If you are getting paid to do a job, don't ask for help on it!||||

  • #8
    Senior Coder
    Join Date
    Dec 2005
    Location
    Slovenia
    Posts
    1,963
    Thanks
    120
    Thanked 76 Times in 76 Posts
    I give up, doh I designed something acceptable.

    overflow:auto - it results, in best case, in img ocupying single line at top.

    PS: Excessive use of inline styles is really very bad!
    (-: , I allways wait until design looks good.
    Found a flower or bug and don't know what it is ?
    agrozoo.net galery
    if you don't spot search button at once, there is search form:
    agrozoo.net galery search

  • #9
    Kor
    Kor is offline
    Red Devil Mod Kor's Avatar
    Join Date
    Apr 2003
    Location
    Bucharest, ROMANIA
    Posts
    8,478
    Thanks
    58
    Thanked 379 Times in 375 Posts
    Quote Originally Posted by BubikolRamios View Post
    (-: , I allways wait until design looks good.
    And what might do wrong the CSS classes? You would save a lot of time if using classes instead of local styles.
    KOR
    Offshore programming
    -*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*


  •  

    Posting Permissions

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