SitePoint Sponsor

User Tag List

Results 1 to 5 of 5
  1. #1
    gimme the uuuuuuuuuuu duuudie's Avatar
    Join Date
    Feb 2004
    Location
    Switzerland
    Posts
    2,253
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Smile sorry to take over this forum but I have a mozilla alignement problem.

    Hi

    Instead of posting my whole code, here are just the relevent parts The buttons look fine in IE but aren't well aligned when using mozilla.

    css files
    Code:
    .permissionContainer {
     margin: auto;
     width: 450px;
     border: 1px dashed #3e5c92;
    }
    
    .permission {
     float: left;
     width: 150px;
     text-align: center;
    }
    html
    Code:
    <?php
    if ($_SESSION['loggedin'] == 2 ) {
    ?>
    <div class="permissionContainer">
    <h6>admin options</h6>
    <form action="admin/editAdmin.php" method="POST">
    <div class="permission">
    <input type="hidden" name="text" value="<?=$row['pk']?>" />
    <input type="submit" value="edit" />
    </div>
    </form>
    <form action="admin/editDeleteAdmin.php" method="POST">
    <div class="permission">
    <input type="hidden" name="textID[]" value="<?=$row['pk']?>" />
    <input type="submit" value="delete" />
    </div>
    </form>
    <form action="textsHighlightsRecords.php" method="POST">
    <div class="permission">
    <input type="hidden" name="textID" value="<?=$row['pk']?>" />
    <input type="hidden" name="highlighterID" value="<?=$_SESSION['userID']?>" />
    <input type="submit" value="highlight" />
    </div>
    </form>
    </div>
    <?php
    }
    ?>
    thanks a lot if you can help me

  2. #2
    SQL Consultant gold trophysilver trophybronze trophy
    r937's Avatar
    Join Date
    Jul 2002
    Location
    Toronto, Canada
    Posts
    39,021
    Mentioned
    53 Post(s)
    Tagged
    2 Thread(s)
    you should actaully post the url to a sample page so that people can just go there in various browsers

    otherwise, you are expecting them to be able to either spot the problem from your code, or take the time to build a sample page themselves, which hardly anybody really has time to do unless they are, like, totally bored

    did you know that internet explorer and gecko have different interpretations of whether margin and padding should be considered within the total width of an element?
    r937.com | rudy.ca | Buy my SitePoint book: Simply SQL
    "giving out my real stuffs"

  3. #3
    SQL Consultant gold trophysilver trophybronze trophy
    r937's Avatar
    Join Date
    Jul 2002
    Location
    Toronto, Canada
    Posts
    39,021
    Mentioned
    53 Post(s)
    Tagged
    2 Thread(s)
    okay, maybe i'm bored, i got an sql assignment i have to write and i'm procrastinating...

    anyhow i just wanted to apologize for the red herring i suggested, it wasn't the box model problem at all (whether margins are included in width)

    try adding this to your style sheet:
    Code:
    form { margin:0 ; }
    r937.com | rudy.ca | Buy my SitePoint book: Simply SQL
    "giving out my real stuffs"

  4. #4
    The CSS Clinic is open silver trophybronze trophy
    Paul O'B's Avatar
    Join Date
    Jan 2003
    Location
    Hampshire UK
    Posts
    39,868
    Mentioned
    159 Post(s)
    Tagged
    4 Thread(s)
    Hi,

    The problem is that you have floated the divs but placed the form outside the div so it isn't floated and creates a new line.

    You need to move the form inside the div and a clear:both before the closing div tag of the main wrapper.

    e.g.
    Code:
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
    <title>Untitled Document</title>
    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
    <style>
    .permissionContainer {
     margin: auto;
     width: 450px;
     border: 1px dashed #3e5c92;
    }
    .permission {
     float: left;
     width: 150px;
     text-align: center;
    }
    h6 {margin:0 0 10px 0}
    </style>
    </head>
    <body>
    <div class="permissionContainer">
    <h6>admin options</h6>
    <div class="permission">
    <form action="admin/editAdmin.php" method="POST">
    <input type="hidden" name="text" value="<?=$row['pk']?>" />
    <input type="submit" value="edit" />
    </form>
    </div>
    <div class="permission">
    <form action="admin/editDeleteAdmin.php" method="POST">
    <input type="hidden" name="textID[]" value="<?=$row['pk']?>" />
    <input type="submit" value="delete" />
    </form>
    </div>
    <div class="permission">
    <form action="textsHighlightsRecords.php" method="POST">
    <input type="hidden" name="textID" value="<?=$row['pk']?>" />
    <input type="hidden" name="highlighterID" value="<?=$_SESSION['userID']?>" />
    <input type="submit" value="highlight" />
    </form>
    </div>
    <br style="clear:both" />
    </div>
    </body>
    </html>
    Paul

  5. #5
    gimme the uuuuuuuuuuu duuudie's Avatar
    Join Date
    Feb 2004
    Location
    Switzerland
    Posts
    2,253
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    so that was it

    thanks a lot rudy and Paul. Your help is always very appreciated.

    Once again you've solved my problem Paul.


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
  •