Posted By

Hirmine on 12/09/06


Tagged

links external a ie7 internt exploror ahover href CSS3


Versions (?)

Who likes this?

4 people have marked this snippet as a favorite

Roshambo
oso96_2000
Hirmine
vali29


Detectar automáticamente links externos con CSS, IE7


 / Published in: CSS
 

URL: http://www.webintenta.com/novedades-ie7-detectar-automaticamente-que-links-son-externos-con-css.html

Por ejemplo, haciendo uso del operador ^= (que nos permite seleccionar solo aquellos elementos cuyo atributo especificado coincida, al comienzo de la cadena, con el valor especificado) podremos crear una reglas para determinar el aspecto de nuestros links en función de si son externos o internos. CSS3.

  1. /*ENLACES INTERNOS*/
  2. a {
  3. background-color: #666;
  4. color: #FFF;
  5. font-weight: bold;
  6. text-decoration: none;
  7. padding-bottom: 1px;
  8. }
  9. a:hover {
  10. background-color: #FAF3EC;
  11. color:#666;
  12. }
  13.  
  14. /*ENLACES EXTERNOS*/
  15. a[href^="http:"] {
  16. color: #FFF;
  17. background-color: #F00;
  18. }
  19. a[href^="http:"]:hover {
  20. background-color: #FAF3EC;
  21. color:#666;
  22. }

Report this snippet  

Comments

RSS Icon Subscribe to comments
Posted By: Hirmine on December 11, 2006

For example, using the operator ^ = (that allows us to select only those elements which specified attribute coincides, to the beginning of the chain, with the specified value) we will be able to create one you rule to determine the aspect of our links depending on if they are external or internal. CSS3.

You need to login to post a comment.