Ver Mensaje Individual
  #1 (permalink)  
Antiguo 09/10/2009, 15:04
Omikron
 
Fecha de Ingreso: septiembre-2009
Mensajes: 13
Antigüedad: 14 años, 7 meses
Puntos: 0
Fondo Y Color De Texto En CSS

Buenas:
Disculpen mi pregunta, ya que me estoy iniciando en esto de la programación en HTML, JAVASCRIPT y CSS y tengo varias dudas. Hoy estaba tratando de realizar una calculadora en JAVASCRIPT y HTML pero cuando en el archivo externo que tengo con .css trato de poner una imagen de fondo no me la toma la página. Y también me gustaría aplicarle dentro del body (del .css), para que el color del texto cambie. No se si alguien me puede ayudar. Epero repuestas. Saludos.

El archivo css es:
body {
background:imagen.png;
}
title {
color:#CCCCCC;
}
input[type=text] {
background-color:#FF0000;
}

Y el código HTML con JAVASCRPT es:
<html>
<head>
<title>
Calculadora
</title>
<link rel="stylesheet" type="text/css" href="estilo1.css" media="screen">
<script language="javascript">
var a = new String ();
var b = new String ();
a=documente.form1.nombre.value <!--En donde esta FORM1 va el nombre del Formulario, más abajo puse: <form action="" method="" name="form1">-><!--En donde puse .NOMBRE., debo poner el nombre del <INPUT>. Por ejemplo (agarrandonos del input que tenemos más abajo), si tengo <input type="text" name="display" value="", etc.>, entonces el nombre va a ser display (como lo indica en la parte del formulario, con el METATAG <[NAME=""]>-->
b=
</script>
</head>
<body text="#A000B0">
<center><h2><b><u>Calculadora:</u></b></h2></center>
<br>
<br>
<br>
<br>
<form action="" method="GET" name="form1"><!--En METHOD="" pude ir GET o POST, o sea que quedaria de esta manera METHOD="GET" O METHOD="POST"-->
<table colspan="1" width="128" height="23" align="center" cellspacing="0" cellpadding="0" border="#cccccc">
<tr>
<td>
<input type="text" name="display" value="0" class="display" readonly="readonly" style="width:128px;height:23px;text-align:right;color:yellow">
</td>
</tr>
<table border="1" colspan="3" align="center" cellspacing="0" cellpadding="0" border="#cccccc" height="25" width="30">
<tr>
<td colspan="3">
<input type="button" name="borrado" value="C" size="width:30px;height:24px">
</td>
<td>
<input type="button" name="borradogeneral" value="CE" size="width:30px;height:24px">
</td>
<td>
<input type="button" name="retr" value="Cejar" size="width:30px;height:24px">
</td>
</tr>
</table>
</table>
<table border="1" colspan="14" align="center" cellspacing="0" cellpadding="0" border="#cccccc" height="100" width="100">
<tr>
<td>
<input type="button" name="1" value="1" style="width:30 height=24">
</td>
<td>
<input type="button" name="2" value="2" style="width:30; height:24">
</td>
<td>
<input type="button" name="3" value="3" style="width:30; height:24">
</td>
<td>
<input type="button" name="coma" value="," style="width:30; height:24">
</td>
</tr>
<td>
<input type="button" name="4" value="4" style="width:30; height:24">
</td>
<td>
<input type="button" name="5" value="5" style="width:30; height:24">
</td>
<td>
<input type="button" name="6" value="6" style="width:30; height:24">
</td>
<td>
<input type="button" name="igual" value="=" style="width:30; height:24">
</td>
</tr>
<tr>
<td>
<input type="button" name="7" value="7" style="width:30; height:24">
</td>
<td>
<input type="button" name="8" value="8" style="widht:30; height:24">
</td>
<td>
<input type="button" name="9" value="9" style="width:30; height:24">
</td>
<td>
<input type="button" name="rest" value="-" style="width:30; height:24">
</td>
</tr>
<tr>
<td>
<input type="button" name="0" value="0" style="width:30; height:24">
</td>
<td>
<input type="button" name="mult" value="*" style="width:30; height:24">
</td>
<td>
<input type="button" name="divi" value="/" style="width:30; height:24">
</td>
<td>
<input type="button" name="suma" value="+" style="width:30; height:24">
</td>
</tr>
</tr>
</table>
</form>
</body>
</html>