Can I override my <p> style, having my class mainbookingleftadditional font style work instead?
code:
<div class="mainbookingleftadditional"><p>Please inform us of anything you... </p></div>
css:
p {font-size:14px;}
.mainbookingleftadditional {
float: left;
width: 228px;
height: auto;
padding: 0px 20px 0px 0px;
font: 8px "Trebuchet MS", "Lucida Sans Unicode", "Lucida Grande", "Lucida Sans", Arial, sans-serif;
color: #FFFFFF;
text-align: left;
vertical-align: top;
clear:both;
}
Regards,
Tea
If you wish to only change the property for every
pinside everymainbookingleftadditional, you can use the following:this will override the regular
pdefinition because it has a higher specificity (more specific)Specificity is what decides which css definitions your element will use, in case some elements have more than one definition.
EDIT:
Seeing the other answers i must add that using !important for such a case is a bad idea.
!important is a very powerful case and should only be used when all other options are depleted.