I have to modify a website that another developer wrote.
I need the font and size from one class, but I need the formatting from another.
html:
<div class="box1">
<div class="box2">
<p class="p1">
The text I need printed
</p>
</div>
</div>
css:
.box1
{
float:left;
width:500px;
padding:10px 0px 10px 15px;
}
.box1 p.p1
{
font-size:15px;
color:#ff00ff;
line-height:22px;
}
...
.box2
{
padding:10px;
}
.box2 p.p1
{
font-size:12px;
color:#ff0000;
line-height:22px;
}
How do I use p1 from box1 while keeping the alignment the same? I would rather not define a new .box2 p.p2 unless that is the only way.
Thanks.