Por favor, señores Admin/mod
Han tenido que pasar 3 años
NO BORREN EL TEMA ni lo CIERREN
Que Caricatos pueda responder
Cita:
Iniciado por hwelt
Cita:
Iniciado por caricatos Hola:
Los id's se referencian con el prefijo "#" y las clases con "."
Un id debe ser único y una clase puede ser referenciada por muchos elementos, incluso un elemento puede tener 2 clases.
Para aplicar estilos es mejor hacerlo con clases, aunque para casos aislados valen los id's... y además se referencian mejor con javascript.
Me parece que es buena aportacion la tuya
![Aplauso](http://static.forosdelweb.com/fdwtheme/images/smilies/aplausos.gif)
solo que
una observacion muy severa.
Es totalmente lo contrario...
EN SERIO es
ALREVES
fijense esto que encontre en la pagina oficial de www (punto) w3 (punto) org
He aqui...
Código PHP:
Rules for style rule precedences and inheritance depend on the style sheet language.
The following CSS STYLE declaration puts a border around every H1 element in the document and centers it on the page.
<HEAD>
<STYLE type="text/css">
H1 {border-width: 1; border: solid; text-align: center}
</STYLE>
</HEAD>
To specify that this style information should only apply to H1 elements of a specific class, we modify it as follows:
<HEAD>
<STYLE type="text/css">
H1.myclass {border-width: 1; border: solid; text-align: center}
</STYLE>
</HEAD>
<BODY>
<H1 class="myclass"> This H1 is affected by our style </H1>
<H1> This one is not affected by our style </H1>
</BODY>
Finally, to limit the scope of the style information to a single instance of H1, set the id attribute:
<HEAD>
<STYLE type="text/css">
#myid {border-width: 1; border: solid; text-align: center}
</STYLE>
</HEAD>
<BODY>
<H1 class="myclass"> This H1 is not affected </H1>
<H1 id="myid"> This H1 is affected by style </H1>
<H1> This H1 is not affected </H1>
</BODY>