jorgens escribió:Si nos lo explicas mejor, mejor podremos ayudarte. Por lo que entiendo a ver si consigo responderte bien..
Con la hoja de estilo defines cómo han de ser determinados elementos como tablas, celdas, imagenes, vinculos, etc.
Una vez que defines las propiedades de los elementos que desees cambiar, has de indicar en la web (en la página HTML) de qué tipo ha de ser cada elemento.
Por ejemplo tomemos las tablas como un elemento. Si queremos una tabla con fondo rojo, hemos de ir a la hoja de estilo y definir un tipo de tabla que llamaremos, por ejemplo "tabla-roja" (los nombres de los estilos no pueden nunca empezar por un número ni tener guiones bajos, ni espacios en blanco, ni acentos ni cosas "raras"...)
Para definir en la hoja de estilo el tipo tabla-roja y decirle que es de color rojo su fondo, ponemos esto:
.tabla-roja {background-color: red ; }
Y guardamos la hoja de estilo. Ya hemos creado un tipo de estilo. Ahora, si tenemos una tabla ya creada en la página html, hemos indicar que esa tabla es de ese tipo, en caso contrario, cómo sabe el navegador que ha de tener color rojo?
Si tenemos una tabla en una página HTML, eñ código se vería algo así:
<table>
<tr>
<td>esta es mi tabla</td>
</tr>
</table>
Obviamente no sale con color rojo, pues no le he indicado qué tipo de estilo es. A continuación te enseño lo que hay que poner para que el navegador SI sepa que ha de ser de tipo tabla-roja:
<table class="tabla-roja">
<tr>
<td>esta es mi tabla</td>
</tr>
</table>
Ahora si saldría con color rojo (claro, siempre que en el código HTML le hayamos incluido la línea que hace referencia al archivo de la hoja de estilo llamada por ejemplo estilo.css.....)
Lo mismo puedes hacer con muchos otros elementos, como párrafos
, celdas <TD>, columnas <TR>, enlaces <A>, etc, etc, etc.
Espero haberte dado un poco de luz. Comentanos cualquier duda que te surja, oki?
Un abrazo! :wink:
Es que no entiendo, realmente nose q hacer, nose si soy ñope o que, pero no entiendo :cry:
Por ejemplo, mi hoja html es asi:
<!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><SCRIPT LANGUAGE="JavaScript">
<!--
window.defaultStatus="Meitantei Conan | ¡Todo sobre Conan y sus amigos!";
//-->
</SCRIPT>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<meta name="description" content="Un portal donde todo trata de nuestra serie favorita, descargas, imágenes y muchisimo más en www.meitanteiconan.com.ar">
<meta name="keywords" content="www.meitanteiconan.com.ar, detective conan, detective, conan, Shinichi Kudo, Ran Mouri,conan
edogawa,Descargas, imagenes, roms, emuladores, roms, juegos, capitulos,
peliculas, kaito kid, anime, manga, peliculas, capitulos, episodios, descargas,
download, imagenes, fotos, informacion, juegos, noticias, detective conan,
gosho aoyama, japon, japan, games, kogoro, ayumi, kenta, genta, megure, mp3,
midis, free mp3,wallpaper, free games, free music downloads, animatios,
shinichi and ran, ebay, detektiv conan, clothing, detective boys, japanese
animation, ran, minami takayama, meitantei conan, pictures, download detective
conan rom, detective conan lemons, emu, gba roms, hentai, gba emu, conan, game
detective conan, yaoi, game boy, films, games, play station, play station 2,
screenshots">
<title>Meitantei Conan | ¡Todo sobre Conan y sus amigos!</title>
<style type="text/css">
<!--
body {
background-color: #999999;
}
body,td,th {
font-family: Verdana, Arial, Helvetica, sans-serif;
font-size: 10px;
color: #FFFFFF;
}
a {
font-size: 10px;
color: #CCCCCC;
}
a:link {
text-decoration: none;
}
a:visited {
text-decoration: none;
color: #CCCCCC;
}
a:hover {
text-decoration: underline;
color: #CCCCCC;
}
a:active {
text-decoration: none;
color: #CCCCCC;
}
-->
</style></head>
<body>
<div align="center">
<table width="95%" height="65" border="0" cellpadding="0" cellspacing="0">
<tr>
<td bgcolor="#000000"><div align="center"> [img]imagenes/bannerhome.png[/img]
<script language="JavaScript">
</script>
</div></td>
</tr>
</table>
<table width="95%" height="16" border="0" cellpadding="0" cellspacing="0">
<tr>
<td bgcolor="#000000"><div align="center">[url="home.html"]Home[/url] | [url="galerias.htm"]Galerías[/url] | [url="descargas.htm"]Descargas[/url] | [url="laserie.htm"]La Serie[/url] | [url="tuseccion.htm"]Tu Sección[/url]</div></td>
</tr>
</table>
<table width="95%" height="27" border="0" cellpadding="0" cellspacing="0">
<tr>
<td bgcolor="#000000"><div align="left"><u>Staff</u>:
<table width="95%" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td><div align="left">[img]imagenes/avatarjuanxo.png[/img]
<u>Nick</u>: Juanxo
<u> Nombre</u>: Juan Ignacio S.
<u> Edad</u>: 14
<u>Fecha de nacimiento</u>: 1/11/92
<u>Ocupación</u>: Estudiante
<u>Sexo</u>: Masculino
<u>Cargo en el proyecto</u>: Diseño web, administración foros, administración general
[img]imagenes/avatarcirus.gif[/img]
<u>Nick</u>: Cirus
<u>Nombre</u>: Nahuel Lihué D. B.
<u>Edad</u>: 19
<u>Fecha de nacimiento</u>: 30/10/87
<u>Ocupación</u>: Estudiante
<u>Sexo</u>: Masculino
<u>Cargo en el proyecto</u>: Material web, administración foros
</div></td>
</tr>
</table>
</div></td>
</tr>
</table>
<table width="95%" height="73" border="0" cellpadding="0" cellspacing="0">
<tr>
<td bgcolor="#000000"><div align="left">[email="[correo eliminado]"]Contacto[/email] | [url="ayudanos.htm"]Ayúdanos[/url] | [url="publicidad.htm"]Publicidad[/url] | [url="promocion.htm"]Promoción[/url] | [url="staff.htm"]Staff[/url]
Prohibido robar y/o tomar prestados contenidos de meitanteiconan.com.ar sin previo aviso.
Web realizada por y para fans, si quieres tomar algo prestado solo pídelo, no robes.
© 2007 - Todos los derechos reservados
<a href="http://miarroba.com" alt="Google PageRank" title="crea tu medidor de PageRank™ GRATIS">
</a></div></td>
</tr>
</table>
<table width="95%" border="0" cellpadding="0" cellspacing="0" bgcolor="#000000">
<tr>
<td><div align="center">[url="http://miarroba.com"][img]http://pagerank.miarroba.com/ver.php?url=www.meitanteiconan.com.ar&estilo=1[/img][/url]
<script language="JavaScript" type="text/javascript">
/* Find In Page Script- By Mike Hall ([correo eliminado]) */
var NS4 = (document.layers); // Which browser?
var IE4 = (document.all);
var win = window; // window to search.
var n = 0;
function findInPage(str) {
var txt, i, found;
if (str == "")
return false;
// Find next occurance of the given string on the page, wrap around to the
// start of the page if necessary.
if (NS4) {
// Look for match starting at the current point. If not found, rewind
// back to the first match.
if (!win.find(str))
while(win.find(str, false, true))
n++;
else
n++;
// If not found in either direction, give message.
if (n == 0)
alert("Not found.");
}
if (IE4) {
txt = win.document.body.createTextRange();
// Find the nth match from the top of the page.
for (i = 0; i <= n && (found = txt.findText(str)) != false; i++) {
txt.moveStart("character", 1);
txt.moveEnd("textedit");
}
// If found, mark it and scroll it into view.
if (found) {
txt.moveStart("character", -1);
txt.findText(str);
txt.select();
txt.scrollIntoView();
n++;
}
// Otherwise, start over at the top of the page and find first match.
else {
if (n > 0) {
n = 0;
findInPage(str);
}
// Not found anywhere, give message.
else
alert("Not found.");
}
}
return false;
}
</script>
</noscript>
</div></td>
</tr>
</table>
</div>
</body>
En css como sería? :$