Ver Mensaje Individual
  #1 (permalink)  
Antiguo 02/08/2008, 09:52
Avatar de Mort20
Mort20
 
Fecha de Ingreso: junio-2008
Ubicación: Roca Casterly
Mensajes: 141
Antigüedad: 15 años, 10 meses
Puntos: 2
Error con margin CSS

Hola, veréis tengo una web en entorno LAMP, y entre ellos como es lógico hay CSS.
La cuestión es que en la clase del pie de página hay un margen - en el título he puesto margin aunque no estoy seguro que realmente esa sea la propiedad conflictiva - por la derecha sobrante. Y realmente no sé de dónde sale.
La cuestión es que a la hora de incluir el div con el id del pie, todas las demás clases (salvo body, claro) están cerradas.
Además, he probado con cosas que no es lo que quiero que aparezca, poniendo <div style="font-size: 50px;">... por ejemplo, y eso funciona, ¡pero no con la imagen de fondo¡ esa imagen sólo me la carga si uso la clase.
Y con la clase ignora todas las instrucciones que le de de tamaño de fuente - añadiendolo en el style.css, claro -.

He probado mil cosas, y ya no sé cual es el error y la verdad, empieza a ser frustrante. A ver si vosotros me podéis ayudar, este es el CSS - es muy extenso, lo sé pero lo pongo entero por si acaso, que nunca se sabe por dónde está el error -, el #footer está al final del todo:

Código:
/*
Design by Free CSS Templates
http://www.freecsstemplates.org
Released for free under a Creative Commons Attribution 2.5 License
*/

* {
	margin: 0;
	padding: 0;
}

body {
	margin-top: 2%;
	background: #FFFFFF url(images/img01.gif) repeat-x;
	font-family: "Trebuchet MS", Arial, Helvetica, sans-serif;
	font-size: 13px;
	color: #080808;
}

input, textarea {
	background: #FFFFFF url(images/img09.gif) repeat-x;
	border: 1px solid #FFFFFF;
	border-top-color: #A3A3A3;
	border-left-color: #D6D6D6;
	font: normal 1em/normal "Trebuchet MS", Arial, Helvetica, sans-serif;
	color: #6E6E6E;
}

h1, h2, h3 {
	margin-bottom: 1.5em;
	letter-spacing: -0.05em;
	font-family: Georgia, "Times New Roman", Times, serif;
}

h1, h1 a, h2, h2 a {
	text-decoration: none;
	color: black;
}

h1 a:hover, h2 a:hover {
	text-decoration: underline;
}

h1 {
	font-size: 38px;
}

h2 {
	font-size: 28px;
}

h3 {
	font-size: 16px;
	font-weight: normal;
	color: #939292;
}

p, ul, ol {
	margin-top: 1.5em;
	line-height: 190%;
}

ul, ol {
	margin-left: 3em;
}

blockquote {
	margin-left: 3em;
	margin-right: 3em;
}

a {
	color: #346086;
}

a:hover {
	font-style: italic;
	text-decoration: none;
}

a img {
	border: none;
}

img.left {
	float: left;
	margin-right: 20px;
}

img.right {
	float: right;
	margin-right: 20px;
}

hr {
	display: none;
}

/* Logo */

#logo {
	width: 960px;
        height: 150px;
	margin: 0 auto;
        margin-top: 10px;
        margin-bottom: 10px;
	background: #FFFFFF url('images/img04.jpg') no-repeat;
}

#logo h1 {
	padding-top: 10px;
        text-align: center; 
	font-size: 30px;
	font-style: italic;
        color: #000000;
	font-family: Arial, Fantasy, Cursive, Verdana;
}

#logo a {
	text-decoration: none;
}

/* Menu */

#menu {
	width: 960px;
	height: 62px;
	margin: 0 auto;
	background: #252E3A url(images/img02.jpg) no-repeat;
}

#menu ul {
	margin: 0;
	padding: 21px 0 0 30px;
	list-style: none;
	line-height: normal;
	color: #FEFEFE;
}

#menu li {
	float: left;
	padding: 0 20px 0 22px;
	background: url(images/img03.gif) no-repeat left center;
}

#menu li.first {
	background: none;
}

#actual {
	text-decoration: underline;
}

#menu a {
	text-decoration: none;
	font-size: 14px;
	font-weight: bold;
	color: #FFFFFF;
}

#menu a:hover {
	font-style: italic;
        color: #F1F1F1;
}

/* Search */

#search {
	float: right;
	width: 227px;
}

#search fieldset {
	border: none;
}

#search input {
	float: left;
}

#search #s {
	width: 136px;
	margin-right: 7px;
	padding: 2px 5px;
}

#search #x {
	background: none;
	border: none;
}

/* Banner */

#banner {
	width: 960px;
	margin: 0 auto;
	padding: 8px 0;
}

/* Page */

#page {
	width: 900px;
	margin: 0 auto;
	padding: 25px 35px 45px 25px;
	background: url(images/img05.gif) no-repeat;
}

/* Content */

#content {
	float: left;
	width: 603px;
	text-align: justify;
	margin: 0 0 20px 0;
}

.post {
}

.post .title {
	margin: 0;
	padding: 0 0px;
	font-style: italic;
}

.post .entry {
	padding: 0 10px;
}

.post p {
	text-indent: 20px;
}

.post .meta {
	height: 47px;
	margin: 20px 0 10px 0;
	padding: 10px 0 0 0;
        text-indent: 0;
	font-style: italic;
	background: url(images/img07.gif) no-repeat;
	line-height: normal;
}

/* Sidebar */

#sidebar {
	float: right;
	width: 253px;
}

#sidebar ul {
	margin: 0; 
	padding: 0;
	list-style: none;
	line-height: normal;
	color: #6E6E6E;
}

#sidebar li {
	margin-bottom: 40px;
	padding: 0 15px 0 20px;
}

#sidebar li ul {
	padding-left: 16px;
	list-style: square;
}

#sidebar li li {
	margin: 0;
	padding: 5px 0;
	border-bottom: 1px solid #E5E5E5;
}

#sidebar li h2 {
	margin-bottom: 15px;
	font-size: 18px;
}

#sidebar a:hover {
	font-style: normal;
	font-weight: bold;
}

/* Calendar */

#sidebar .caltitle {
	text-align: center;
	font-weight: bold;
	font-family: Helvetica;
	font-size: 20px;
	margin: 0 auto;
}

#sidebar #calendar {
	padding: 0;
	background: url(images/img08.jpg) no-repeat;
	color: #1A1A1A;
}

#calendar caption {
	margin: -20px auto 0 auto;
	text-align: center;
	font-weight: bold;
}

#calendar table {
	margin: 0 auto;
	caption-side: bottom;
}

#calendar thead th {
	width: 31px;
	height: 40px;
	font-weight: bold;
	color: #FFFFFF;
}

#calendar tbody td {
	width: 31px;
	height: 31px;
	text-align: center;
	color: #3E3E3E;
}

   #calendar .today {
	font-weight: 800;
	color: #FF0000;
    }

#calendar tfoot td {
	padding-top: 20px;
	font-weight: bold;
}

#calendar #next {
	text-align: right;
}

/* Footer */

#footer {
	clear: both;
	width: 960px;
	height: 60px;
	background: url(images/img05.gif) no-repeat;
}


#footer p {
	margin: 0;
	line-height: normal;
	color: #B4B4B4;
}

#footer a {
	color: #B4B4B4;
}

#footer .legal {
	float: left;
}

#footer .credit {
	float: right;
}

#footer ul {
	margin-top: 5px;
	text-align: center;
	list-style: none;
}

#footer ul li {
	display: inline;
	padding: 0px 5px 0px 5px;
}
Aquí no hay un margin: 0 auto; en la clase, aunque al principio estaba, pero realmente, como si no estubiera, hace lo mismo. Es impresionante...
El código HTML como es una web modulada lo tengo muy dividido, así que os paso uno con el mínimo texto generado. Lo pongo en otro post, que se me queja de muchos carácteres.

Gracias por adelantado!