← HTML + CSS

Border à volta de botões

Lida 4710 vezes

Offline

João Simões 
Membro
Mensagens 1177 Gostos 5
Feedback +1

Troféus totais: 32
Trófeus: (Ver todos)
Apple User Super Combination Combination Topic Starter 50 Poll Votes 10 Poll Votes Poll Voter Level 5 Level 4 Level 3

Olá amigos



Tenho um site em que em todos os botões desse genero ao clicar fica essa borda à volta. Alguem sabe como retirar-la?

Cumprimentos, João Simões
Offline

cenourinha 
Elite
Mensagens 4094 Gostos 21
Troféus totais: 34
Trófeus: (Ver todos)
Mobile User Apple User Level 6 Super Combination Combination Topic Starter 10 Poll Votes Poll Voter Level 5 Level 4

outline: none; no css
Offline

João Simões 
Membro
Mensagens 1177 Gostos 5
Feedback +1

Troféus totais: 32
Trófeus: (Ver todos)
Apple User Super Combination Combination Topic Starter 50 Poll Votes 10 Poll Votes Poll Voter Level 5 Level 4 Level 3

outline: none; no css

É mesmo isso, obrigado cenouras :)
Offline

Thomato 
Membro
Mensagens 4125 Gostos 3
Feedback +2

Troféus totais: 28
Trófeus: (Ver todos)
Apple User Super Combination Combination Topic Starter 10 Poll Votes Poll Voter Level 5 Level 4 Level 3 Level 2

outline: none; no css
Dá para aplicar isso a todas as imagens de uma vez?
Offline

rtbfreitas 
Equipa
Mensagens 1497 Gostos 9
Feedback +24

Troféus totais: 30
Trófeus: (Ver todos)
Windows User Apple User Super Combination Combination Topic Starter 10 Poll Votes Poll Voter Poll Starter Level 5 Level 4

Dá para aplicar isso a todas as imagens de uma vez?

Sim claro, desde que a tag IMG tenha essas instruções no CSS
Offline

Thomato 
Membro
Mensagens 4125 Gostos 3
Feedback +2

Troféus totais: 28
Trófeus: (Ver todos)
Apple User Super Combination Combination Topic Starter 10 Poll Votes Poll Voter Level 5 Level 4 Level 3 Level 2

.img {
outline: none;
}

Devia funcionar? :P
Offline

Tiago Martins 
Membro
Mensagens 932 Gostos 9
Feedback +4

Troféus totais: 29
Trófeus: (Ver todos)
Apple User Super Combination Combination Topic Starter 10 Poll Votes Poll Voter Level 5 Level 4 Level 3 Level 2

.img {
outline: none;
}

Devia funcionar? :P

Atenção, nao deve levar o "." (ponto), caso seja para a tag img...
Offline

rtbfreitas 
Equipa
Mensagens 1497 Gostos 9
Feedback +24

Troféus totais: 30
Trófeus: (Ver todos)
Windows User Apple User Super Combination Combination Topic Starter 10 Poll Votes Poll Voter Poll Starter Level 5 Level 4

.img {
outline: none;
}

Devia funcionar? :P

Sim, se as tuas imagens tiverem uma classe atribuida com o nome "img"
Offline

João Godinho 
Membro
Mensagens 1755 Gostos 2
Troféus totais: 27
Trófeus: (Ver todos)
Super Combination Combination Topic Starter 10 Poll Votes Poll Voter Level 5 Level 4 Level 3 Level 2 Level 1

Não era para meter o ., assim têm de ter class="img"

img {
outline: none;
}
Offline

Thomato 
Membro
Mensagens 4125 Gostos 3
Feedback +2

Troféus totais: 28
Trófeus: (Ver todos)
Apple User Super Combination Combination Topic Starter 10 Poll Votes Poll Voter Level 5 Level 4 Level 3 Level 2

Continua a não dar :|
Offline

Nuno 
Administrador
Mensagens 7780 Gostos 216
Feedback +2

Troféus totais: 42
Trófeus: (Ver todos)
100 Poll Votes Level 7 Search Mobile User Level 6 Super Combination Combination Topic Starter 50 Poll Votes 10 Poll Votes

Continua a não dar :|

Na img não é outline é border

border: 0px;

ou

border: none;

;)
Offline

Thomato 
Membro
Mensagens 4125 Gostos 3
Feedback +2

Troféus totais: 28
Trófeus: (Ver todos)
Apple User Super Combination Combination Topic Starter 10 Poll Votes Poll Voter Level 5 Level 4 Level 3 Level 2

Nuno, isso é para tirar a borda do link à imagem, mas não tira aquele picotado que aparece no firefox e neste último IE...
Offline

João Godinho 
Membro
Mensagens 1755 Gostos 2
Troféus totais: 27
Trófeus: (Ver todos)
Super Combination Combination Topic Starter 10 Poll Votes Poll Voter Level 5 Level 4 Level 3 Level 2 Level 1

Nuno, isso é para tirar a borda do link à imagem, mas não tira aquele picotado que aparece no firefox e neste último IE...
A mim também aconteceu, tive de meter:
a, a:hover, a:active, a:visited {
   outline:none;
}

;) Testa agora.
Offline

Thomato 
Membro
Mensagens 4125 Gostos 3
Feedback +2

Troféus totais: 28
Trófeus: (Ver todos)
Apple User Super Combination Combination Topic Starter 10 Poll Votes Poll Voter Level 5 Level 4 Level 3 Level 2

É isso mesmo :) Obrigado.

Mas como podemos aplicar a outras variáveis?
Como inputs?

input {
   outline:none;
}

Não funciona
Offline

João Godinho 
Membro
Mensagens 1755 Gostos 2
Troféus totais: 27
Trófeus: (Ver todos)
Super Combination Combination Topic Starter 10 Poll Votes Poll Voter Level 5 Level 4 Level 3 Level 2 Level 1

Nunca vi isto em inputs?
Se estiveres a falar da borders das inputs não é assim.
é
input {
   border:none;
}