1

how to add a link style in a button. So, i have a link style:

a:link {color:#FFFFFF;}
a:visited {color:#FFFFFF;}
a:hover {color:#FFFFFF;}
a:active {color:#FFFFFF;}

how to integrate this style with this button css.

button {
text-decoration: none;
text-shadow: 0 1px 0 #000000;
font: bold 11px Helvetica, Arial, sans-serif;
color: #FFFFFF;
line-height: 17px;
height: 18px;
display: inline-block;
float: left;
margin: 5px;
padding: 5px 6px 4px 6px;
background: #F3F3F3;
border: solid 1px #D9D9D9;
border-radius: 2px;
-webkit-border-radius: 2px;
-moz-border-radius: 2px;
 -webkit-transition: border-color .20s;
 -moz-transition: border-color .20s;
 -o-transition: border-color .20s;
 transition: border-color .20s;
height: 29px !important;
cursor: pointer;
}
3
  • What do you mean exactly ... "integrate"? Commented Dec 14, 2012 at 17:14
  • well, if i use a:link {color:#FFFFFF;} a:visited {color:#FFFFFF;} a:hover {color:#FFFFFF;} a:active {color:#FFFFFF;} in .css file then all links going to be white, but i want to change the color of links only in buttons.. Commented Dec 14, 2012 at 17:16
  • 2
    Change a:link to button a:link { etc. Commented Dec 14, 2012 at 17:16

3 Answers 3

1

If you want to have the same style applied to multiple elements (and type of elements) then you should be using classes.

.link:link {color:#FFFFFF;}
.link:visited {color:#FFFFFF;}
.link:hover {color:#FFFFFF;}
.link:active {color:#FFFFFF;}

.button { all of your button styles }

Then use them together when you need them together:

<input type="button" class="link button" value="I'm a button" />
Sign up to request clarification or add additional context in comments.

Comments

1

Use button a:link, button a:hover, button a:visited, button a:active.

But what's the point of having a link inside a button?

Comments

0

I not understand very well the question but maybe this can serve you:

INPUT:hover {background: yellow;}
INPUT:focus {background: #FF99FF;}
INPUT:focus:hover {background: #99FF99;}

or

INPUT:focus:hover {
text-decoration: none;
text-shadow: 0 1px 0 #000000;
font: bold 11px Helvetica, Arial, sans-serif;
color: #FFFFFF;
line-height: 17px;
height: 18px;
display: inline-block;
float: left;
margin: 5px;
padding: 5px 6px 4px 6px;
background: #F3F3F3;
border: solid 1px #D9D9D9;
border-radius: 2px;
-webkit-border-radius: 2px;
-moz-border-radius: 2px;
 -webkit-transition: border-color .20s;
 -moz-transition: border-color .20s;
 -o-transition: border-color .20s;
 transition: border-color .20s;
height: 29px !important;
cursor: pointer;

}

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.