He comenzado un sitio web con un fondo rojo y quiero un poco de blanco en la parte superior.Css div no irá a la parte superior o completamente a los lados
tengo este código:
CSS:
body {
background-color: #ff4d4d;
}
#header {
background-color: #ffffff;
height: 20px;
}
HTML:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>Fat Oblongs</title>
<link href="css/stylesheet.css" rel="stylesheet" type="text/css" media="screen" />
</head>
<body>
<div id="header"></div>
</body>
</html>
que produce:
o * {padding: 0; margin0;} – Mehran
@Narhem, yo no recomendaría el uso de '' * . Sería mejor usar un [restablecimiento de CSS] (http://meyerweb.com/eric/tools/css/reset/), o un selector simple como el mencionado en mi respuesta. –