I was just wondering if you don’t change the values, do hover, active and focus automatically inherit settings from the standard a tag?
For example:
.wrapper .left .main .row .holder .more a,
#content .wrapper .left .main .row .holder .more a:visited
{
width: 92px;
min-width: 92px;
max-width: 92px;
height: 23px;
min-height: 23px;
max-height: 23px;
display: block;
margin: 0px auto;
background: #fff url(../images/more-info-btn.png) top left no-repeat;
}
#content .wrapper .left .main .row .holder .more a:hover {
width: 92px;
min-width: 92px;
max-width: 92px;
height: 23px;
min-height: 23px;
max-height: 23px;
display: block;
margin: 0px auto;
background: #fff url(../images/more-info-btn.png) bottom left no-repeat;
}
Would the below do the same thing?
#content .wrapper .left .main .row .holder .more a,
#content .wrapper .left .main .row .holder .more a:visited
{
width: 92px;
min-width: 92px;
max-width: 92px;
height: 23px;
min-height: 23px;
max-height: 23px;
display: block;
margin: 0px auto;
background: #fff url(../images/more-info-btn.png) top left no-repeat;
}
#content .wrapper .left .main .row .holder .more a:hover {
background: #fff url(../images/more-info-btn.png) bottom left no-repeat;
}
Yes thats correct, pseudo states inherit values.
For consistency purposes, it is best to only declare the styles which you are changing in your psuedo state rules.
With the following code, the text will always be
font-size:1.9em, withpadding-top:10pxregardless of:hoverstate:— SEE EXAMPLE —