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 7 of 7
  1. #1
    New to the CF scene
    Join Date
    Nov 2009
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts

    internet explorer bug, html & css

    hi, i have made a webpage, that works fine in Chrome and Firefox, but when I open it in IE7 and 8 it is bugged. There's one tiny line of code that screws it up.. a simple <div style="text-align:left">.

    here's my full HTML code;
    Code:
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
    "http://www.w3.org/TR/html4/loose.dtd">
    <html>
    <head>
    <title>Teenagers &amp; The Law</title>
    <link rel="stylesheet" type="text/css" href="stylesr-r.css">
    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
    <style type="text/css">
    <!--
    .style3 {font-size: 12px; font-family: Arial, Helvetica, sans-serif;}
    .style4 {font-family: Arial, Helvetica, sans-serif}
    .style5 {font-size: 12px}
    .style6 {font-size: 18px}
    -->
    </style>
    </head>
    <center>
    <div id="container">
    <br><br><br><br>
    <div id="main">
    
    <div id="navigation">
    <table width="100%">
    <tr>
    <td width="99%"><link rel="stylesheet" type="text/css" href="anylinkmenu.css" />
    
    <script type="text/javascript" src="menucontents.js"></script>
    
    <script type="text/javascript" src="anylinkmenu.js">
    
    /***********************************************
    * AnyLink JS Drop Down Menu v2.0- © Dynamic Drive DHTML code library (www.dynamicdrive.com)
    * This notice MUST stay intact for legal use
    * Visit Project Page at http://www.dynamicdrive.com/dynamicindex1/dropmenuindex.htm for full source code
    ***********************************************/
    
    </script>
    
    <script type="text/javascript">
    
    //anylinkmenu.init("menu_anchors_class") //Pass in the CSS class of anchor links (that contain a sub menu)
    anylinkmenu.init("menuanchorclass")
    
    </script>
    <!--1st anchor link-->
    
    <p align="right"><a class="menuanchorclass style4 style6" rel="anylinkmenu1">Main Menu</a></p>
    
    
    
    </td>
    <td width="1%" align="right"><font face="Arial"></a></font></td>
    </tr>
    </table>
    </div>
    
    <div id="contentmid">
    <div style="text-align:left">
    <table width="93%" align="left">
    <tr>
    <td width="100%">
      <p>&nbsp;</p>
      <p><font face="Arial" size="6" style="color:#ec14e8">Teenagers &amp; The Law </font><br />
      </p>
      <p class="style3">From the ages of 14, if charged with a criminal offence, it is not neccessary for the court to prove that the child was aware or his or her actions. If proven guilty, the child will be prosecuted. </p>
      <p class="style3">The rights of a teenager in Australia are heavily restricted, and a majority of influence/power lies in the parent(s)/guardian(s), e.g. teenagers and children cannot apply for a passport without Parent or Guardian signature. </p>
      <p class="style3">As a teenager, many aspects are restricted, and as teenagers, many rights are taken away and put in the hands of the parent/guardian, e.g. alcohol and cigarettes are restricted from teenagers. Teenagers are also subject to compulsory education, and truancy is punishable by law - repeat offenders are taken to court and given an official warning. </p>
      <p class="style3">To work, all teenagers must have a tax file number - even if  exempt from taxes; otherwise, the government are able to tax you at various rates as they do not have records of your income. </p>
      <p><span class="style3"><strong>Arrest: </strong>as a ciizen of Australia, you do not have the right to resist arrest - resisting arrest is a chargeable offence. However, under arrest, you are not obliged to say anything, as anything you do say, will be written down as evidence and used against you. Citizens no longer have the right to a phone call - however if you ask politely, they may allow it. </span></p>
      <p><span class="style4"><span class="style5"><strong>Interogations: </strong>A person in Australia cannot be forced to answer questions - even if posed by the police. This is known as the 'right to silence'.</span></span></p>
      <p class="style3"><strong>Fingerprints: </strong>if charged with an offence, that carries a term of imprisonment, it is now mandatory that you, as a citizen, give your fingerprint. If you refuse, police habe the power to use force in order to attain it.</p>
      <p class="style3"><strong>Identification Parades: </strong>when suspects are lined up, for the victime or witness to identify the criminal, depending on the seriousness of the crime, you have the right to refuse participation. </p>
      <p class="style3"><strong>Searches</strong>: Police have the power to complete a 'frisk' search of the person's body, clothing, car or house if they have reasonable grounds to believe that the law has been broken. </p>
      <p class="style3"><strong>Home Search: </strong>Police can only search your home or private property if you consent, or if they have a 'search warrant' from a Magistrate. However, the police can enter your house without permission if an offencer has been committed.</p>
      <p class="style3"><strong>Body Samples: </strong>Body samples can only be taken with your consent, or with court order. Samples may include: hair, saliva, dental impressions, body fluids or blood. These samples are taken from the suspect and comparred with the sample found at the scene of the crime to confirm guilt or innocence. </p>  
      </td>
    </tr>
    <tr>
      <td>&nbsp;</td>
    </tr>
    </table>
    </div>
    <div id="contentbot">
    <div style="text-align:left">
    <table width="50%" align="left">
    <tr>
    <td width="50%"><p><br />
        <font face="Arial" size="6" style="color:#ec14e8">Reporting a Crime </font></p>
      <p class="style3">When reporting a crime, the following steps are important;</p>
      <ol>
        <li class="style3"> Write down the facts as soon as possible - while it is still fresh in your mind. </li>
        <li class="style3"> Include a description of people involved, age, nationality, gender, etc.</li>
        <li class="style3"> Include essential information, colour and make of a car, number plates etc.</li>
        <li class="style3"> Make a summary of the event you witnessed.</li>
        <li class="style3"> Contact the police quickly with this information. </li>
      </ol>
      <p>&nbsp;</p>
      <p><br />
        </p></td>
    </tr>
    </table>
    <table width="50%" align="right">
    <tr>
    <td width="50%"><p>&nbsp;</p>
      <p><img src="images/crime.jpg" width="250" height="250"></p></td>
    </tr>
    </table></div>
    
    </div><div id="footer"></div>
    
    </div> <!-- This is closing that "container" DIV that we created at the top -->
    </center>
    </body>
    </html>
    CSS code:
    Code:
    /* CSS Document */
    /*Uprising Tokyo*/
    A:link  {
    color:#FFFFFF;
    text-decoration:none;
    }
    A:visited  {
    color:#FFFFFF;
    text-decoration:none;
    }
    A:active  {
    color:#FFFFFF;
    text-decoration:none;
    }
    A:hover  {
    color:#FF00FF;
    text-decoration:none;
    }
    body {
    	background-color: #ec14e8;
    	background-image: url();
    	background-repeat: no-repeat;
    	margin-top: 0px;
    	margin-left: 0px;
    	margin-right: 0px;
    	margin-bottom: 0px;
    }
    #container {
      margin:auto;
      width:auto;
      background:url(images/background.png) center no-repeat;
      background-position:top;
    }
    #logo {
       width:800px;
       font-size:12px;
       font:arial;
       padding-top:34px;
       padding-left:100px;
       color:#FFFFFF;
    }
    #navigation {
       width:744px;
       font-size:12px;
       padding-top:30px;
       padding-left:35px;
       padding-right:30px;
       color:#FFFFFF;
    }
    #contentmid {
       width:800px;
       font-size:11px;
       padding-left:30px;
       padding-right:30px;
       color:#FFFFFF;
    }
    #contentbot {
       width:794px;
       font-size:11px;
       padding-top:200px;
       padding-left:30px;
       padding-right:30px;
       color:#FFFFFF;
    }
    #main {
       width:800px;
       height:900px;
       background:url(images/testbg.png) center repeat-y;
    }
    #footer {
       clear:both;
       width:auto;
       height:100px;
    }
    screenshots:
    this is with that line;
    http://img262.imageshack.us/i/29309615.png/
    http://img265.imageshack.us/i/25964097.png/
    http://img337.imageshack.us/i/53981299.png/

    this is without that line. as you can see, the text aligns to center without it. but i want it on the left.
    http://img44.imageshack.us/i/38679062.png/

    the bottom image, is how i want it to be, but with the text aligned to the left.

    cheers in advance!!

  • #2
    Supreme Master coder! abduraooft's Avatar
    Join Date
    Mar 2007
    Location
    N/A
    Posts
    14,849
    Thanks
    160
    Thanked 2,223 Times in 2,210 Posts
    Blog Entries
    1
    I'd recommend your to practice standard coding. For that, change your DOCTYPE to a Strict one,
    Code:
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
    and then validate your code and remove all deprecated tags and attributes.
    The Dream is not what you see in sleep; Dream is the thing which doesn't let you sleep. --(Dr. APJ. Abdul Kalam)

  • #3
    New to the CF scene
    Join Date
    Nov 2009
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts
    can you please elaborate? I'm not much of an expert on HTML.

  • #4
    Supreme Master coder! abduraooft's Avatar
    Join Date
    Mar 2007
    Location
    N/A
    Posts
    14,849
    Thanks
    160
    Thanked 2,223 Times in 2,210 Posts
    Blog Entries
    1
    Your current DOCTYPE at the top of your document is
    Code:
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
    "http://www.w3.org/TR/html4/loose.dtd">
    . Replace it with the one given above and validate your markup using http://validator.w3.org/#validate_by_input for finding the errors in it.
    Last edited by abduraooft; 11-07-2009 at 09:05 AM.
    The Dream is not what you see in sleep; Dream is the thing which doesn't let you sleep. --(Dr. APJ. Abdul Kalam)

  • #5
    New to the CF scene
    Join Date
    Nov 2009
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts
    no luck, the error still remains.

  • #6
    Supreme Master coder! abduraooft's Avatar
    Join Date
    Mar 2007
    Location
    N/A
    Posts
    14,849
    Thanks
    160
    Thanked 2,223 Times in 2,210 Posts
    Blog Entries
    1
    Have you fixed the errors in your markup, given by the validator? If so, please post your current code.
    The Dream is not what you see in sleep; Dream is the thing which doesn't let you sleep. --(Dr. APJ. Abdul Kalam)

  • #7
    New to the CF scene
    Join Date
    Nov 2009
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Code:
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
    <html>
    <head>
    <title>Teenagers &amp; The Law</title>
    <link rel="stylesheet" type="text/css" href="stylesr-r.css">
    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
    <style type="text/css">
    <!--
    .style3 {font-size: 12px; font-family: Arial, Helvetica, sans-serif;}
    .style4 {font-family: Arial, Helvetica, sans-serif}
    .style5 {font-size: 12px}
    .style6 {font-size: 18px}
    -->
    </style>
    </head>
    <center>
    <div id="container">
    <br><br><br><br>
    <div id="main">
    
    <div id="navigation">
    <table width="100%">
    <tr>
    <td width="99%"><link rel="stylesheet" type="text/css" href="anylinkmenu.css">
    
    <script type="text/javascript" src="menucontents.js"></script>
    
    <script type="text/javascript" src="anylinkmenu.js">
    
    /***********************************************
    * AnyLink JS Drop Down Menu v2.0- © Dynamic Drive DHTML code library (www.dynamicdrive.com)
    * This notice MUST stay intact for legal use
    * Visit Project Page at http://www.dynamicdrive.com/dynamicindex1/dropmenuindex.htm for full source code
    ***********************************************/
    
    </script>
    
    <script type="text/javascript">
    
    //anylinkmenu.init("menu_anchors_class") //Pass in the CSS class of anchor links (that contain a sub menu)
    anylinkmenu.init("menuanchorclass")
    
    </script>
    <!--1st anchor link-->
    
    <p align="right"><a class="menuanchorclass style4 style6" rel="anylinkmenu1">Main Menu</a></p>
    
    
    
    </td>
    <td width="1%" align="right"><font face="Arial"></font></td>
    </tr>
    </table>
    </div>
    
    <div id="contentmid">
    <div style="text-align:left">
    <table width="93%" align="left">
    <tr>
    <td width="100%">
      <p>&nbsp;</p>
      <p><font face="Arial" size="6" style="color:#ec14e8">Teenagers &amp; The Law </font><br>
      </p>
      <p class="style3">From the ages of 14, if charged with a criminal offence, it is not neccessary for the court to prove that the child was aware or his or her actions. If proven guilty, the child will be prosecuted. </p>
      <p class="style3">The rights of a teenager in Australia are heavily restricted, and a majority of influence/power lies in the parent(s)/guardian(s), e.g. teenagers and children cannot apply for a passport without Parent or Guardian signature. </p>
      <p class="style3">As a teenager, many aspects are restricted, and as teenagers, many rights are taken away and put in the hands of the parent/guardian, e.g. alcohol and cigarettes are restricted from teenagers. Teenagers are also subject to compulsory education, and truancy is punishable by law - repeat offenders are taken to court and given an official warning. </p>
      <p class="style3">To work, all teenagers must have a tax file number - even if  exempt from taxes; otherwise, the government are able to tax you at various rates as they do not have records of your income. </p>
      <p><span class="style3"><strong>Arrest: </strong>as a ciizen of Australia, you do not have the right to resist arrest - resisting arrest is a chargeable offence. However, under arrest, you are not obliged to say anything, as anything you do say, will be written down as evidence and used against you. Citizens no longer have the right to a phone call - however if you ask politely, they may allow it. </span></p>
      <p><span class="style4"><span class="style5"><strong>Interogations: </strong>A person in Australia cannot be forced to answer questions - even if posed by the police. This is known as the 'right to silence'.</span></span></p>
      <p class="style3"><strong>Fingerprints: </strong>if charged with an offence, that carries a term of imprisonment, it is now mandatory that you, as a citizen, give your fingerprint. If you refuse, police habe the power to use force in order to attain it.</p>
      <p class="style3"><strong>Identification Parades: </strong>when suspects are lined up, for the victime or witness to identify the criminal, depending on the seriousness of the crime, you have the right to refuse participation. </p>
      <p class="style3"><strong>Searches</strong>: Police have the power to complete a 'frisk' search of the person's body, clothing, car or house if they have reasonable grounds to believe that the law has been broken. </p>
      <p class="style3"><strong>Home Search: </strong>Police can only search your home or private property if you consent, or if they have a 'search warrant' from a Magistrate. However, the police can enter your house without permission if an offencer has been committed.</p>
      <p class="style3"><strong>Body Samples: </strong>Body samples can only be taken with your consent, or with court order. Samples may include: hair, saliva, dental impressions, body fluids or blood. These samples are taken from the suspect and comparred with the sample found at the scene of the crime to confirm guilt or innocence. </p>  
      </td>
    </tr>
    <tr>
      <td>&nbsp;</td>
    </tr>
    </table>
    </div>
    <div id="contentbot">
    <div style="text-align:left">
    <table width="50%" align="left">
    <tr>
    <td width="50%"><p><br>
        <font face="Arial" size="6" style="color:#ec14e8">Reporting a Crime </font></p>
      <p class="style3">When reporting a crime, the following steps are important;</p>
      <ol>
        <li class="style3"> Write down the facts as soon as possible - while it is still fresh in your mind. </li>
        <li class="style3"> Include a description of people involved, age, nationality, gender, etc.</li>
        <li class="style3"> Include essential information, colour and make of a car, number plates etc.</li>
        <li class="style3"> Make a summary of the event you witnessed.</li>
        <li class="style3"> Contact the police quickly with this information. </li>
      </ol>
      <p>&nbsp;</p>
      <p><br>
        </p></td>
    </tr>
    </table>
    <table width="50%" align="right">
    <tr>
    <td width="50%"><p>&nbsp;</p>
      <p><img src="images/crime.jpg" width="250" height="250"></p></td>
    </tr>
    </table></div>
    
    </div><div id="footer"></div>
    
    </div> <!-- This is closing that "container" DIV that we created at the top -->
    </center>
    </html>


  •  

    Posting Permissions

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