How to set background color in border in CSS -
.click{ padding: 10px; border: 2px solid #e4910c; border-radius: 200px; transition: background-color 0.1s; } a:hover{ background-color: #e4910c; color: white; }
i tried set everywhere in border #e4910c; text has padding. can set text's background color #e4910c, not everywhere in border. how that? thank in advance
i'm not quiet sure want, let me know if suit you:
- using
a
instead of 2 tags (which understand using)
snipet
a { padding: 10px; border: 2px solid #e4910c; border-radius: 200px; transition: background-color 0.1s; display:inline-block; /* demo purposes - optional */ color:#e4910c; text-decoration:none; } a:hover { background-color: #e4910c; color: white; }
<a href="#">text link</a>
Comments
Post a Comment