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 4 of 4
  1. #1
    Senior Coder
    Join Date
    Dec 2005
    Location
    Slovenia
    Posts
    1,959
    Thanks
    120
    Thanked 76 Times in 76 Posts

    IE7 div jumps to the right

    Trying to center some stuff ....

    If anyone see how to fix this, in FF works ok. In IE jumps to right after 'c'

    Code:
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
    "http://www.w3.org/TR/html4/loose.dtd"> 
    
    
    <html>
      <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <title>JSP Page</title>
        <style type="text/css">
          * 
          {
          font-family:tahoma,verdana,arial,helvetica;
          font-size:15px;
          border:0px;
          margin: 0 0 0 0;
          padding: 0 0 0 0;
          }
         
          
          .krneki
          {
            width:100%;
            margin-left:40%;
            clear:both;/*has to be for ff*/
          }  
        </style>
        
        
      </head> 
      <body>
      
          <DIV class = 'krneki'>
            a
          </DIV> 
          
          <DIV class = 'krneki'>
            <DIV style = 'float:left;'>
              b
            </DIV> 
            <DIV style = 'float:left;'>
              c
            </DIV
          </DIV> 
          
          <DIV class = 'krneki'>
            d
          </DIV>  
    
          <DIV class = 'krneki'>
            d
          </DIV>      
      </body>
    
    </html>

  • #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
    Please always use strict DOCTYPE
    Code:
    <!DOCTYPE html 
         PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
         "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
    and then validate your code using http://validator.w3.org, before posting to forum.
    The Dream is not what you see in sleep; Dream is the thing which doesn't let you sleep. --(Dr. APJ. Abdul Kalam)

  • #3
    Senior Coder
    Join Date
    Dec 2005
    Location
    Slovenia
    Posts
    1,959
    Thanks
    120
    Thanked 76 Times in 76 Posts
    Thanks for pointing that out.

    However a man developing in FF, geting right result could't of have the slightest idea that the syntax is wrong. From time to time I bump at that sort of wierdness -- ff works ok even if syntax is wrong.

  • #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
    But to get help through forums, you have to help others by doing all essential work by you AFAP.
    The Dream is not what you see in sleep; Dream is the thing which doesn't let you sleep. --(Dr. APJ. Abdul Kalam)


  •  

    Posting Permissions

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