Forum Moderators: not2easy
<style type="text/css">
p
{
text-indent: 5%;
}
</style>
Then I've got some headers of different sizes with no indent.
<style type="text/css">
p.header_20
{
text-indent: 0%;
text-size: 20pt;
}
p.header_14
{
text-indent: 0%;
text-size: 14pt;
}
</style>
What I'd like to do is have something like
<style type="text/css">
p
{
text-indent: 5%
}
p.header
{
text-indent: 0%;
}
p.header.20
{
text-size: 20pt;
}
p.header.14
{
text-size: 14pt;
}
</style>
Or in other words, a way to say all basic paragraphs indented 5%, all header paragraphs indented 0%, and the header 20 paragraph text-size: 20pt and the header 14 paragraph text-size: 14pt.
What I'm trying to do is eliminate the text-indent: 0% redundancy in the header tags. But I don't think <p class="header.14" will work. Is there a way to specificy a sub class for the different header tags?
Help!
p {
text-indent: 5%
}
p.header {
text-indent: 0%;
}
p.large {
text-size: 20pt;
}
p.small {
text-size: 14pt;
}
<p class="header small"> ...</p>
Alternatively you can also apply something to more than one class:
p {
text-indent: 5%
}
p.smallheader, p.largeheader {
text-indent: 0%;
}
p.largeheader {
text-size: 20pt;
}
p.smallheader {
text-size: 14pt;
}
But the bigger question might be if you should do this. Why not use (and style <h1>...<h6> headers. It's their function to be a header ...