Go Back   CodingForums.com > :: Client side development > HTML & CSS

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 02-17-2008, 02:29 PM   PM User | #1
BubikolRamios
Senior Coder

 
Join Date: Dec 2005
Location: Slovenia
Posts: 1,876
Thanks: 114
Thanked 76 Times in 76 Posts
BubikolRamios is on a distinguished road
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>
BubikolRamios is offline   Reply With Quote
Old 02-17-2008, 02:51 PM   PM User | #2
abduraooft
Supreme Master coder!

 
abduraooft's Avatar
 
Join Date: Mar 2007
Location: N/A
Posts: 14,680
Thanks: 158
Thanked 2,182 Times in 2,169 Posts
abduraooft is just really niceabduraooft is just really niceabduraooft is just really niceabduraooft is just really niceabduraooft is just really nice
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.
__________________
Quote:
The Dream is not what you see in sleep; Dream is the thing which doesn't let you sleep. --(Dr. APJ. Abdul Kalam)
abduraooft is offline   Reply With Quote
Old 02-17-2008, 03:39 PM   PM User | #3
BubikolRamios
Senior Coder

 
Join Date: Dec 2005
Location: Slovenia
Posts: 1,876
Thanks: 114
Thanked 76 Times in 76 Posts
BubikolRamios is on a distinguished road
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.
BubikolRamios is offline   Reply With Quote
Old 02-17-2008, 03:44 PM   PM User | #4
abduraooft
Supreme Master coder!

 
abduraooft's Avatar
 
Join Date: Mar 2007
Location: N/A
Posts: 14,680
Thanks: 158
Thanked 2,182 Times in 2,169 Posts
abduraooft is just really niceabduraooft is just really niceabduraooft is just really niceabduraooft is just really niceabduraooft is just really nice
But to get help through forums, you have to help others by doing all essential work by you AFAP.
__________________
Quote:
The Dream is not what you see in sleep; Dream is the thing which doesn't let you sleep. --(Dr. APJ. Abdul Kalam)
abduraooft is offline   Reply With Quote
Reply

Bookmarks

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 10:38 PM.


Advertisement
Log in to turn off these ads.