SitePoint Sponsor

User Tag List

Results 1 to 6 of 6

Threaded View

  1. #1
    SitePoint Addict
    Join Date
    Dec 2008
    Location
    Brussels
    Posts
    377
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    2 column float problem

    Url: http://bulevardi.be/gloom/guestbook.php

    Works fine in FireFox and Safari, gives wrong layout in IE and Opera.

    The two columns should appear left and right of each other. In IE and Opera they appear under each other.

    PHP Code:
    <body>

    <div id="container2">

    <div id="guestbookleft">
    <?php 
    include ("guestbook_fill.php");
    ?>
    </div>

    <div id="guestbookright">
    <?php 
    include ("guestbook_show.php");
    ?>
    </div>

    <div id="footer">&nbsp;</div>

    </div>

    </body>
    Css:
    Code:
    body {
      background-color: transparent;
      font-family: Arial; color: #CCCCCC; font-size: 3mm; 
    }
    
    #container2 { 
      position: relative;
      width: 798px; height: 472px; 
      margin: 10px auto;
      text-align: center;
      border: 1px solid #333333;
    }
    
    #guestbookleft {
      float: left; display: inline; /* fixes the IE bug for margins */
      width: 290px; height: 432px;
      margin: 20px;
      text-align:left;
    }
    
    #guestbookright {
      float: left; display: inline;
      width: 420px; height: 432px; overflow-y: auto; overflow-x: hidden;
      margin: 20px; 
      text-align:left;
    }
    
    #footer {
      clear: both;
    }
    What am I doing wrong ?
    Last edited by bulevardi; May 6, 2009 at 12:24.


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
  •