Problem with firefox and IE

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • kumuda v
    New Member
    • Jul 2007
    • 21

    Problem with firefox and IE

    Hi,

    I am new to web development. I have designed a main page using html and css, I am working in linux OS so I am using firefox. But the problem is with IE, where the entire contents and images is re-positioned . the page looks entirely different. Please anyone can help me in this regard. Here is the css and html code

    home.php
    [html]
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
    <meta name="keywords" content="health y dining restaurants organic grocers farmers market eating out calories nutrition database kilorie">

    <meta name="descripti on" content="Kilori e provides information on healthy dining be it eating out or in. Find information on restaurants, fast food calories, organic grocers, farmers market, and a nutrition database">

    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <link href="slides1.c ss" rel="stylesheet " type="text/css" />
    </head>
    <body>
    <div id="wrapper">
    <div id="banner"></div>

    <div id="header">

    <ul>

    <li id="current">< a href="index.php ">Home </a></li>

    <li><a href="search_re staurants.php"> Restaurants </a></li>

    <li><a href="organics. php">Organics </a></li>

    <li><a href="calories. php">Calories </a></li>

    <li><a href="../phpBB2/index.php">Foru m </a>

    </ul>

    </div>
    <div class="containe r">
    &nbsp;&nbsp;&nb sp;&nbsp;<a href="home.php" >Home></a>
    <!div id="box">
    <div id="box2">
    <div id="content"><b r>
    <b>&nbsp;&nbsp; &nbsp;&nbsp;&nb sp;&nbsp;&nbsp; Kilorie. Healthy dining and nutrition information</b><br><br>
    Kilorie promotes healthy eating by providing information on local restaurants, organic grocers, and farmers' markets.<br><br >
    <b>Recent reviews</b>
    &nbsp;&nbsp;&nb sp;&nbsp;<img src="images/line.gif" width="300" height="3"><br> <br>
    Agnes and Muriels<br>
    &nbsp;&nbsp;&nb sp;“This place has some great/ creative salads…"&nbsp;< a style="text-decoration:none " href="home.php" >More...</a><br><br>
    American Roadhouse<br>
    &nbsp;&nbsp;&nb sp;“Agree with Barbeque, the best brunch place in Atlanta…”&nbsp; <a style="text-decoration:none " href="home.php" >More...</a><br><br>
    <b>What’s news?</b>
    &nbsp;&nbsp;&nb sp;&nbsp;&nbsp; &nbsp;<img src="images/line.gif" width="300" height="3"><br> <br>
    <img align="right" src="images/homeimg1.gif" width="60" height="60">
    <b>Good Calories, Bad Calories</b>&nbsp;By Gna kolata<br>
    Source: NY Times, 10/07/2007
    &nbsp;<a style="text-decoration:none " href="home.php" >More...</a><br><br>
    <b>Work out naturally!</b>&nbsp;By The kilorie team<br>
    Source: Kilorie, 10/07/2007
    &nbsp;<a style="text-decoration:none " href="home.php" >More...</a><br><br>
    <b>Fulton County Restaurant Scores: Inaccessible?</b>&nbsp; By Kilorie<br>
    Source: Kilorie News, 09/24/2007
    &nbsp;<a style="text-decoration:none " href="home.php" >More...</a><br><br>
    <b>Culture matters in the Obesity debate</b> By Kelly D.Brownell<br>
    Source: LA Times, 09/21/2007
    &nbsp;<a style="text-decoration:none " href="home.php" >More...</a>

    </div>
    </div>
    <div id="box1"><br>
    &nbsp;&nbsp;<b> Restaurant of the week</b><br><br>
    &nbsp;&nbsp;<im g align="center" src="images/homeimg2.gif" width="60" height="60">&nb sp;&nbsp;Figo Pasta<br><br>
    &nbsp;&nbsp;Cui sine:Italian<br >
    &nbsp;&nbsp;Foo d : <img src="images/5stars.gif"><br >
    &nbsp;&nbsp;Ser vice : <img src="images/5stars.gif"><br >
    &nbsp;&nbsp;Cle anliness : <img src="images/5stars.gif"><br ><br>
    <p align="center" >Recommandation s: "Artichoke ravivioli with Siciliana Sauce..."
    <a style="text-decoration:none " href="home.php" >More...</a></p>
    </div>
    <div id="box3"><br>
    &nbsp;&nbsp;<b> Did you know?<b>
    &nbsp;&nbsp;<im g align="right" src="images/homeimg3.gif" width="60" height="60">
    </div>
    </div>
    <!/div>

    <div id="footer"><b> <a style="text-decoration:none " href="home.php" >About us</a> | <a style="text-decoration:none " href="home.php" >Privacy</a> | <a style="text-decoration:none " href="home.php" >Advertise with us</a></b></div>
    <?include "track.php" ;?>
    </div>
    </body>
    </html>
    [/html]

    slides.css
    [code=css]
    html, body, ul, ol, li, p, h1, h2, h3, h4, h5, h6, form, fieldset {

    margin: 0;

    padding: 0;

    border: 0;

    }

    body {

    font-family: verdana; /* helvetica, impact, sans-serif;*/

    font-size: 14px;

    color: #ff;

    //background-color: #FF9966; /*#DDCCC2;*/

    //background: url('images/image.jpg') repeat center;

    }

    #banner{

    height: 100px;
    background-image: url(images/banner_v8.jpg);

    background-repeat: no-repeat;

    }

    #wrapper{

    width: 770px;

    /*background-color: #ABFF93; BEF3C0; key color */

    //background: url('bggrad2.jp g') repeat-x;

    margin:10px auto;

    border: 1px solid #000000;
    height:620px auto;
    background-color: #FFFFFF;
    slides.css

    }

    .container{

    width: 770px;
    height:500px auto;

    float: middle;

    //margin-left: 10px;

    //margin-top:10px;

    //background-color: #669933; /*#DDCCC2; key color*/
    }

    #box {
    top: 0px;
    left: 100px;
    margin: 20px;
    padding: 1px;
    //border: 1px solid #000000;
    width: 730px;
    height: 400px;
    }

    #box1 {
    margin: 20px;
    padding: 1px;
    border: 1px solid #000000;
    width: 30%;
    height: 55%
    }
    #box2 {
    margin: 20px;
    padding: 1px;
    border: 1px solid #000000;
    float: right;
    width: 63%;
    height: 90%;
    }
    #box3 {
    margin: 20px;
    padding: 1px;
    border: 1px solid #000000;
    width: 30%;
    height: 31%;
    }



    #header {

    float:left;

    width:100%;

    background:#DAE 0D2 url("images/bg2.gif") repeat-x bottom;

    font-size:93%;

    line-height:normal;

    }

    #header ul {

    margin:0;

    padding:10px 10px 0;

    list-style:none;

    }

    #header li {

    float:left;

    background:url( "images/norm_new_left.g if") no-repeat left top;

    margin:0;

    padding:0 0 0 9px;

    }

    #header a {

    display:block;

    background:url( "images/norm_new_right. gif") no-repeat right top;

    padding:5px 15px 4px 6px;

    text-decoration:none ;

    font-weight:bold;

    color:#765;

    }

    #header a:hover {

    color:#333;

    }

    #header #current {

    background-image:url("imag es/norm_left_on.gi f");

    }

    #header #current a {

    background-image:url("imag es/norm_right_on2. gif");

    color:#333;

    padding-bottom:5px; /* f4ebe7 is best here*/

    }


    #footer{

    border-top: 1px solid #000000;

    background-color: #ec6053;/*#208a25; #003366;*/

    color: #00;

    clear: both;

    height:20px;
    text-align:center;

    width:770px;
    }

    #content {



    margin-left: 15px;

    margin-right: 15px;

    //background-color: #FFF8DC; /*#60D136;*/

    }[/code]
    Last edited by drhowarddrfine; Jan 22 '08, 03:37 PM. Reason: Please use code tags
  • just a feeling
    New Member
    • Aug 2007
    • 86

    #2
    Peace,
    Welcome kumuda,

    A missing Document Type Declaration (DDT) in ur html document causes IE to go into "quirks" mode which affects your presentation.

    At the very begining, write this
    [HTML]<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">[/HTML]

    Then, try to validate ur html and Css for the errors u have.
    http://validator.w3.or g/
    http://jigsaw.w3.org/css-validator/

    and let us know if u still face the same problem.

    Hope that help,
    Rawan.

    Comment

    • kumuda v
      New Member
      • Jul 2007
      • 21

      #3
      Thank u

      Now the page looks similar in both the browsers,
      But the problem is with arranging the boxes horizantally where box1 is of larger dimension and is to the right, box2 and box3 are of smaller dimension to the left of box1 one below the other.
      The code I have used is this.

      test.php

      <div class="containe r"><br>

      <!Box model starts here>

      <div id="box2"> This is box1</div>
      <div id="box1"> This is box2</div>
      <div id="box3"> This is box3</div>




      <!box model ends here>

      </div>

      test.css

      .container{

      width: 700px;

      /*float: right;*/

      margin-left: 10px;

      margin-top:10px;
      margin-right:10px;
      margin-bottom:10px;

      background-color: #CC33FF; /*#DDCCC2; key color*/

      }

      #box1 {
      margin: 10px;
      padding: 1px;
      border: 1px solid #000000;
      width: 200px;
      height: 200px;
      float:top

      }




      #box2 {
      margin: 10px;
      padding: 1px;
      border: 1px solid #000000;
      float: right;
      width: 450px;
      height: 550px;
      }




      #box3 {
      margin: 10px;
      padding: 1px;
      border: 1px solid #000000;
      width: 200px;
      height: 220px;
      }



      The boxes are aligned properly in firefox but in IE they appear one below the other. How to solve this issue. Can u please help me out

      With regards,
      kumuda

      Comment

      • just a feeling
        New Member
        • Aug 2007
        • 86

        #4
        Hi kumuda,

        Just add one pixel to the width of the container (i.e change it to 701) and it should work.

        Best Regards,
        Rawan.

        Comment

        • kumuda v
          New Member
          • Jul 2007
          • 21

          #5
          Hi Rawan,

          Thank you so much, It is working fine in both firefox and IE.

          With regards,
          kumuda

          Comment

          Working...