[CSS] Problem z odstępem w DIV

HTML to podstawy w dziedzinie tworzenia stron WWW, Style CSS warto opanować, bowiem za ich pomocą można dostosować odpowiednio wygląd swojej witryny WWW. Zagłębiamy się dalej i udostępniamy w tym forum możliwość zadawania pytań o JavaScript.
ODPOWIEDZ
arturm
Posty: 1
Rejestracja: pn maja 16, 2005 11:46 am

[CSS] Problem z odstępem w DIV

Post autor: arturm »

Mam problem z odstępem, który pojawia mi się w IE 5.5 oraz 6. W Firefoxie jest OK. Rzeczony odstęp szerokości 2 px pojawia się za końcem zielonego paska przed wyrazem "center...". Pytanie: czy to problem IE, czy coś źle zdefiniowałem?

Oto kod html:

Kod: Zaznacz cały

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-2">
<meta name="DESCRIPTION" content="brak">
<meta name="ROBOTS" content="INDEX,FOLLOW">
<meta name="resource-type" content="document">
<meta http-equiv="expires" content="0">
<meta name="author" content="Testowa">
<title>Test CSS</title>

<link rel="stylesheet" href="kurier_test.css" type="text/css" />
</head>

<body>
		<div id="centerandmain">
			<div id="incolleft">incolleft!<!--ikonki_po_lewej--></div>
			<div id="incolright">incolright!<!--ikonki_po_prawej--></div>center and main!! center and main!! center and main!! center and 

main!! center and main!! center and main!! center and main!! center and main!! center and main!! center and main!! 
		</div>
</body>
</html>
A oto CSS zapisany w kurier_test.css

Kod: Zaznacz cały

* {
	margin: 0;
	padding: 0;
	border: 0;
	}

img	{
	display: block;
	border: 0;
	}

body { 
	margin: 12px 0 0 0;
	font-size: 11px;
	font-family: 'Lucida Grande', Verdana, Arial, Sans-Serif;
	color: #767676;
	}

#incolleft, #incolright {
	text-align: left;
	width: 177px;
	}

#incolleft {
	background: #C0D878;
	float: left;
	}

#incolright {
	background: #F4DE90;
	float: right;
	}

#centerandmain {
	background: #FFFFD0;
	width: 468px;
	text-align: left;
	}
ODPOWIEDZ