...

View Full Version : IE7 div jumps to the right



BubikolRamios
02-17-2008, 03:29 PM
Trying to center some stuff ....

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



<!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>

abduraooft
02-17-2008, 03:51 PM
Please always use strict DOCTYPE

<!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.

BubikolRamios
02-17-2008, 04:39 PM
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.

abduraooft
02-17-2008, 04:44 PM
But to get help through forums, you have to help others by doing all essential work by you AFAP.



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum