SitePoint Sponsor

User Tag List

Results 1 to 2 of 2
  1. #1
    SitePoint Enthusiast ahmed_tr's Avatar
    Join Date
    Jan 2006
    Posts
    30
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    CSS displays the page fine in IE but in FFox NO!

    the CSS design looks great in IE but in Ffox shows the page differently.
    I don't know how to fix this problem.

    here is the css:
    body {
    margin:0px;
    padding:0px;
    font-family:verdana, arial, helvetica, sans-serif;
    color:#333;
    background-color:white;
    }
    h1 {
    margin:0px 0px 15px 0px;
    padding:0px;
    font-size:28px;
    line-height:28px;
    font-weight:900;
    color:#ccc;
    }
    p {
    font:11px/20px verdana, arial, helvetica, sans-serif;
    margin:0px 0px 16px 0px;
    padding:0px;
    }
    #Content>p {margin:0px; text-indent:30px;}
    a {
    color:#09c;
    font-size:11px;
    text-decoration:none;
    font-weight:600;
    font-family:verdana, arial, helvetica, sans-serif;
    }
    a:link {color:#09c;}
    a:visited {color:#07a;}
    a:hover {background-color:#eee;}
    #Header {
    font-size:24px;
    margin:50px 0px 10px 0px;
    padding:17px 0px 0px 20px;
    /* For IE5/Win's benefit height = [correct height] + [top padding] + [top and bottom border widths] */
    height:33px; /* 14px + 17px + 2px = 33px */
    border-style:solid;
    border-color:black;
    border-width:1px 0px; /* top and bottom borders: 1px; left and right borders: 0px */
    line-height:11px;
    background-color:#eee;
    /* Here is the ugly brilliant hack that protects IE5/Win from its own stupidity.
    Thanks to Tantek Celik for the hack and to Eric Costello for publicizing it.
    IE5/Win incorrectly parses the "\"}"" value, prematurely closing the style
    declaration. The incorrect IE5/Win value is above, while the correct value is
    below. See http://glish.com/css/hacks.asp for details. */
    voice-family: "\"}\"";
    voice-family:inherit;
    height:14px; /* the correct height */
    }
    /* I've heard this called the "be nice to Opera 5" rule. Basically, it feeds correct
    length values to user agents that exhibit the parsing error exploited above yet get
    the CSS box model right and understand the CSS2 parent-child selector. ALWAYS include
    a "be nice to Opera 5" rule every time you use the Tantek Celik hack (above). */
    body>#Header {height:14px;}
    #Content {
    margin:0px 210px 50px 10px;
    padding:10px;
    }
    #Menu {
    position:absolute;
    top:100px;
    right:20px;
    width:172px;
    padding:10px;
    background-color:#eee;
    border:1px dashed #999;
    line-height:17px;
    /* Again, the ugly brilliant hack. */
    voice-family: "\"}\"";
    voice-family:inherit;
    width:150px;
    }
    /* Again, "be nice to Opera 5". */
    body>#Menu {width:150px;}
    #Error {
    color:#FF0033;
    font-size:14px;
    }
    AND HERE IS THE PAGE:<?php # Script 13.1 - header.html
    // This page begins the HTML header for the site.
    // Start output buffering.
    ob_start();
    // Initialize a session.
    session_start();

    // Check for a $page_title value.
    if (!isset($page_title)) {
    $page_title = 'User Registration System';
    }
    ?>
    <!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" xml:lang="en" lang="en">
    <head>
    <meta http-equiv="content-type" content="text/html; charset=iso-8859-1" />
    <title><?php echo $page_title; ?></title>
    <style type="text/css" media="screen">@import "./includes/layout.css";</style>
    </head>
    <body>
    <div id="Header">User Registration</div>
    <div id="Content">
    <!-- End of Header -->
    <!-- End of Content -->
    </div>

    <div id="Menu">
    <a href="index.php">Home</a><br />
    <?php # Script 13.2 - footer.html
    // This page completes the HTML template.

    // Display links based upon the login status.
    // Show LOGIN links if this is the LOGOUT page.
    if (isset($_SESSION['user_id']) AND (substr($_SERVER['PHP_SELF'], -10) != 'logout.php')) {
    echo '<a href="logout.php">Logout</a><br />
    <a href="change_password.php">Change Password</a><br />
    ';
    } else { // Not logged in.
    echo ' <a href="register.php">Register</a><br />
    <a href="login.php">Login</a><br />
    <a href="forgot_password.php">Forgot Password</a><br />
    ';
    }
    ?>
    <a href="#">Some Page</a><br />
    <a href="#">Another Page</a><br />
    </div>
    </body>
    </html>
    <?php // Flush the buffered output.
    ob_flush();
    ?>

  2. #2
    In memoriam gold trophysilver trophybronze trophy Dan Schulz's Avatar
    Join Date
    May 2006
    Location
    Aurora, Illinois
    Posts
    15,476
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Could you post a link to the page in question? CSS doesn't give a hairy rat's back side about PHP, all it cares about is the HTML that is generated (since it's the only thing it can interact with).

    I'll be able to help you better if I can see the page in question.


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
  •